Get started

Connect your agents. Check one change.

Free & MIT-licensed. Runs entirely on your machine. No account or telemetry. Reads your code; never executes it.

Requires Node.js ≥ 22. Zero required dependencies; optional parsers can improve extraction.

1. Map your project

Run this package command from the project directory. It creates .codeweb/graph.json and a supporting .codeweb/report.html.

npx -y @ghostlygawd/codeweb .

For a temporary evaluation, use this npx command without a permanent installation.

2. Choose your client

Select the client that your agents use. Add the displayed entry to its configuration; preserve your other server entries.

Claude Code

Add the json entry to .mcp.json. Merge it with existing settings.

{
  "mcpServers": {
    "codeweb": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@ghostlygawd/codeweb",
        "codeweb-mcp"
      ]
    }
  }
}

Cursor

Add the json entry to .cursor/mcp.json. Merge it with existing settings.

{
  "mcpServers": {
    "codeweb": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@ghostlygawd/codeweb",
        "codeweb-mcp"
      ]
    }
  }
}

Windsurf

Add the json entry to ~/.codeium/windsurf/mcp_config.json. Merge it with existing settings.

{
  "mcpServers": {
    "codeweb": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@ghostlygawd/codeweb",
        "codeweb-mcp"
      ]
    }
  }
}

Gemini CLI

Add the json entry to .gemini/settings.json. Merge it with existing settings.

{
  "mcpServers": {
    "codeweb": {
      "command": "npx",
      "args": [
        "-y",
        "-p",
        "@ghostlygawd/codeweb",
        "codeweb-mcp"
      ]
    }
  }
}

Codex

Add the toml entry to ~/.codex/config.toml. Merge it with existing settings.

[mcp_servers.codeweb]
command = "npx"
args = ["-y","-p","@ghostlygawd/codeweb","codeweb-mcp"]

You can print the same recipe locally with npx -y @ghostlygawd/codeweb setup --client claude. The setup command does not write or replace configuration.

Claude Code plugin alternative

The plugin adds the /codeweb command, automatic pre-edit impact cards, and all 28 tools.

/plugin marketplace add GhostlyGawd/codeweb
/plugin install codeweb

Restart Claude Code, then run /codeweb in the project.

3. Check local setup

npx -y @ghostlygawd/codeweb doctor

Local success: Node is compatible, the local MCP server initializes, and the graph is present and fresh. The check does not confirm an editor connection.

For an explicit configuration check, supply the selected client and file. This inspects the entry without running commands from that file.

npx -y @ghostlygawd/codeweb doctor --client claude --config .mcp.json

If the graph is missing or stale, repeat step 1. If a required check fails, follow the named remedy and run doctor again.

4. Ask your agents one caller question

Restart your client or reload its MCP servers. In that client, ask:

Use codeweb_brief to inspect this project. Choose a function with callers.
Use codeweb_callers to list its callers with source locations.

Connection success: your client shows a successful codeweb_callers tool result with real source locations. Check one location against your source; a local doctor result alone cannot establish this connection.

For a controlled first query, create a temporary caller-check.mjs in an empty directory with this content, map that directory, and ask for the callers of greet.

export function greet(name) { return 'Hello ' + name; }
export function welcome() { return greet('Ada'); }

The expected caller is welcome. No target code is executed.

The supporting call graph in the generated CodeWeb report
A supporting map of the source relationships. Select the image to inspect the live demo.

5. Review your change

From your Git project, use the package commands to inspect changed symbols and callers, then run the structural gate against a base ref that exists locally.

npx -y @ghostlygawd/codeweb .
npx -y @ghostlygawd/codeweb review .codeweb/graph.json --range origin/main --html .codeweb/review.html
npx -y @ghostlygawd/codeweb gate --base origin/main --target . --report-only

Open .codeweb/review.html to inspect the result. Without a prior graph supplied with --before, the review marks structural delta analysis as incomplete. The gate builds both snapshots from the Git base and working tree.

Report-only records the finding verdict without blocking on findings. Setup and analysis errors still fail; remove --report-only to block on structural regressions.

A passing check does not prove the program works. Inspect analysis limits and run the relevant tests. See gate setup.

Teach your agents the edit loop

Paste this into AGENTS.md, GEMINI.md, or your client's rules file.

## codeweb — ask the map before and after every edit
This repo is mapped by codeweb (a deterministic call/import graph; 28 read-only MCP tools).
- Orient once per session: codeweb_brief. No symbol name yet? codeweb_find "<concept>".
- BEFORE touching a symbol: codeweb_explain, then codeweb_context or codeweb_impact.
  Use codeweb_dependents to inspect mapped users across edge types.
- Before writing a new function: codeweb_find_similar and codeweb_placement.
- AFTER editing: codeweb_refresh {snapshot:true}, then codeweb_diff {}.
  Inspect new findings and incomplete analysis before you continue.
- A stale answer names codeweb_refresh; "no graph found" names codeweb_map. Follow the remedy.
Source checkout alternative

For contributors who work from this repository, clone CodeWeb and run its engine with an explicit target path.

git clone https://github.com/GhostlyGawd/codeweb.git
node codeweb/scripts/run.mjs /path/to/your/project

Package users can use the commands above. To map a directory named review, setup, doctor, or gate, use ./review, an absolute path, or codeweb -- review.