Installation & configuration

Docs

Three ways to install. Drop-in template, Pi-mono extension, or MCP server. Pick the one that matches your workflow.

01 · Drop-in template

Copy one folder into any repository.

No CLI, no runtime, no dependencies. The core is structured Markdown and YAML. Works with any LLM that can read and write files.

Step 1: Copy the template
cp -r /path/to/CodeCartographer/.codecarto /path/to/your-repo/
Step 2: Pick a pipeline (optional)

Edit .codecarto/workflow/status.yaml and set the pipeline field. Defaults to the 7-phase full analysis with a split defect scan.

# Available pipeline paths:
pipeline: workflow/pipeline-full-with-deep-audit.yaml  # 7-phase (default)
pipeline: workflow/pipeline-full-with-audit.yaml       # 6-phase
pipeline: workflow/pipeline.yaml                       # 5-phase
pipeline: workflow/pipeline-defect-scan.yaml           # 2-phase
pipeline: workflow/pipeline-lite.yaml                  # 3-phase
pipeline: workflow/pipeline-architecture-only.yaml     # 1-phase
Step 3: Point an LLM at the guide
Read .codecarto/GUIDE.md and begin the analysis.

The LLM reads the guide, checks status.yaml for progress, and starts the next phase automatically. Each phase produces a validated output in .codecarto/findings/.

Works in Claude Code, OpenCode, Cursor, Windsurf, Aider, and any IDE copilot with file read/write access.

02 · Pi-mono extension

Slash commands, widgets, and tool gating.

Install the package directly into Pi-mono. Phase sub-agents run in parallel widgets with live token tracking and file-backed session transcripts.

Install
pi install npm:codecartographer-pi
# or, from a local checkout:
pi install /absolute/path/to/CodeCartographer
# or, from a git URL:
pi install git:github.com/your-user/CodeCartographer
Available commands

/codecarto-init

Copy .codecarto/ into the current repository and select a pipeline.

/codecarto-next

Spawn the next eligible phase as a sub-agent. Optional --llm-steer flag for customized seed prompts.

/codecarto-status

Show current phase progress and pipeline state.

/codecarto-validate

Run validation against the current phase output.

/codecarto-complete

Atomically mark a phase complete after validation passes.

/codecarto-phase

Force a specific phase even out of pipeline order.

/codecarto-skill

Run a post-pipeline skill once all phases are complete.

/codecarto-usage

Show cumulative and per-phase token usage from local phase runs.

03 · MCP server

Seven tools for any MCP-compatible host.

The same core primitives exposed as a Model Context Protocol server. Wire it into Claude Code, Claude Desktop, or any MCP host.

Install
npm install --global codecartographer-pi
# or, in a project:
npm install codecartographer-pi
Host configuration

Add to your MCP host config. Claude Code uses ~/.config/claude-code/config.json; Claude Desktop uses claude_desktop_config.json.

{
  "mcpServers": {
    "codecartographer": {
      "command": "codecarto-mcp"
    }
  }
}

The server exposes seven tools mirroring the Pi commands: codecarto_init, codecarto_status, codecarto_next, codecarto_phase, codecarto_validate, codecarto_complete, and codecarto_skill. Each accepts an absolute cwd for the target repository.

04 · Deploy to Namecheap cPanel

Upload the static bundle and point the domain at it.

This site is plain HTML, CSS, and JavaScript. Drop it into public_html on your cPanel host and it is live.

  1. Open Namecheap cPanel and navigate to File Manager.
  2. Open the document root for codecarto.dev. For a primary domain this is public_html/. For an addon domain it is the folder assigned as that domain's document root.
  3. Upload the entire contents of this website/ folder into that document root.
  4. Confirm index.html sits at the top of the document root.
  5. Enable AutoSSL for the domain in cPanel.
  6. Force HTTPS with the included .htaccess file or the cPanel domain settings.
  7. Visit https://codecarto.dev/ and hard refresh.
Files to upload
  • index.html
  • features.html
  • docs.html
  • showcase.html
  • site.css
  • colors_and_type.css
  • script.js
  • .htaccess
  • robots.txt
  • sitemap.xml
05 · Token usage and cost

What to expect on your first run.

CodeCartographer reads your source code multiple times across phases and produces thousands of words of structured output. The fixed template overhead is about 27,000 tokens across a 6-phase run. Source code reading is the dominant variable cost.

Medium codebase (~100k tokens)

A full 5-phase run costs roughly $2 to $4 in API fees. Larger codebases scale linearly. Start with architecture-only to test output quality before committing.

Tips to reduce cost

Use one session per phase for fresh context windows. The lite pipeline gives 80% of the value for understanding. Skip the defect scan on weaker models.