A Claude Code plugin that indexes a repository in TypeScript, Go, Java, Python, C#, Rust or Clojure (see Languages) into a structural graph (workspaces, folders, files, functions, and the imports, calls and renders between them) and shows it in a local browser app: a 2D project map, a caller graph for any function, a list of duplicated code, the blast radius of a branch or pull request, and (just for fun) a 3D landscape of settlements joined by roads. Monorepos come first (pnpm, npm/yarn workspaces, Nx, Turborepo, packages linked only by tsconfig project references, or a repo with no workspace tool, where every directory with a package.json is a workspace).
This is early development. The indexer, the command line and the explorer views below work today. Descriptions written by a model exist in two forms: the optional pre-commit describer, and the server side for whole-repo describing (see MCP server). The plugin package with its Claude Code hooks (duplicate and undeclared-import notes after each edit) installs from a local path and has passed its in-session check (see Status). The command, package scope, MCP server name, plugin id and data directory use the short identifier codeplumb.
The screenshots on this page are the real app. The larger ones come from the explorer's mock API with a synthetic "large monorepo" scenario (made-up workspace names, about 3,700 functions); the small ones come from the real server running on fixtures/pnpm-turbo in this repo. Nothing here comes from a private repository. Re-create them with pnpm readme:media (the PNGs are deterministic; the GIFs are rewritten only with --gif).
Boxes are workspaces and their area is their function count. A line goes from the workspace that imports to the workspace it imports from, in the importing workspace's color; the number on it is how many files import across that link, and thicker means more. Double-click a box to look inside. When a codeplumb-workspace.json lists several repos, each repo is a labeled group around its workspaces, links between repos are dashed, and a Repos level shows one box per repo.
The Folders level draws each workspace's folders inside its box, sized by function count.
Zoom in and the boxes become files. A breadcrumb above the canvas names the workspace and folder at the center (here api › services), and the numbered circles mark the largest files, matching the list on the left.
A small real repo (fixtures/pnpm-turbo, served by the real server) at Files level:
There is also a dark theme, which follows the browser's color scheme:
Pick a function with search (Cmd/Ctrl+K) and the graph puts it in the center with its callers on the left and what it calls on the right. When one side is large, callers are grouped by workspace, folder and file; click a group to open it. The number on each group is how many callers it holds. Here the mock's DataTable has 221 callers in 3 workspaces.
On the pnpm-turbo fixture, the same view for Button (the real server, one caller, with the inspector open):
Groups of functions that are copies of each other, biggest first (number of copies times lines of code). Each row says how alike the copies are in plain words: Identical (also when only the function's own name differs), Nearly identical or Similar code (renamed or rewritten copies, found with embeddings). Matches by meaning alone are not grouped yet. A strip above the list counts the groups, the functions and roughly how many lines are duplicated, and splits the groups by workspace: groups that span several workspaces are the ones worth moving into a shared package. Pick a group to see its copies as cards (file and line, workspace, whether it is exported, how many functions call it, how much of it matches the copy to keep), the copy it suggests keeping and why (a function in a shared package, exported and used the most), and a side-by-side comparison of the source with the lines that differ marked. "Not a duplicate" hides a pair for good, including from the duplicate check; "Show callers" and "Open in project map" jump to the other views. The screenshot is the mock's synthetic scenario with 22 groups.
Without codeplumb embed only identical and nearly identical code is found: copies that were renamed or rewritten are found by the vector tier, which needs the embeddings, and the page says so in a banner until they exist. The page cannot undo a dismissal yet.
Give a range of commits (main...feature) or a pull request and the review is drawn on the project map you already know: every node stays exactly where it sits on the plain map, the code the range did not touch fades back to gray, the changed code takes the color of its change (added green, modified amber, signature changed magenta, renamed or moved blue, removed red, at its file when the file is still there), the code that uses it directly gets a clear violet tint with a solid line to the changed code it uses, and the code that uses those, two or three steps out, gets a softer tint with a dashed line to the node one step nearer the change, all in the color of that change and without selecting anything. Affected files and functions show their names where they have room, and hovering one gives its hop and its path to the change ("posts.$postId.tsx → index.ts → queries.ts"). "Show" in the left panel picks how far the chain goes: "Changed only", "+ Directly affected" or "+ Potentially affected" (the default); the panel counts both ("Directly affected 5 · Potentially affected 6") and the legend explains the tints and the solid and dashed lines. Pick the level in the left panel: lines run workspace to workspace, folder to folder, file to file or function to function. "3D map" draws the same layer on the settlements, one building per file, with arcs between the buildings. "Rings" is the second mode: what changed in the center and one ring per step out ("Call the changed code directly", "2 calls away", "3 calls away"), each labeled with its count, the nodes on a ring grouped by file, arrows from caller to callee, and hovering a node keeps its own path to the center; when the change reaches further, one outer ring, "4 or more calls away", holds everything past the third step, with each hub (a node many others use) as one node that expands into its consumers when you click it, and the left panel lists the same under "Reachable" with a row per hub. The left panel shows the risk score with the rules that fired, the changed symbols and files, the places the change crosses a package, app or client/server boundary, and notes (removed exports still used, new undeclared imports, new duplicates); click any of them to focus it on the map and open it in the inspector, which shows the signature before and after. Each changed symbol or file also lists its consumers, everything that uses it, in two groups: "Directly affected" (code that calls, renders, extends, implements, references or imports the changed item itself, or a route that serves it) and "Potentially affected" (code that uses those, two or three steps out, with the direct consumer it goes through). Select a change and its list opens in the left panel, grouped by file with how each one uses it and whether it crosses a boundary, and in the inspector under "Used by"; the map then shows only that change's consumers, the direct ones strongly and the potential ones softly, and fades the rest. Click a consumer to select it and zoom to it. It reads git and the index as they are: nothing is re-indexed. Open it with codeplumb review <base>...<head> --open, from Claude Code with /codeplumb:review, or type a range in the left panel. Here the pnpm-turbo fixture with a branch that adds a size prop to Button, a new slugifyAll and a change to the body of getPost, with nothing selected:
On a checkout that has joined a team (see Joining a team), the project map's toolbar gets a Team switch. It shows every open pull request of the repo at once: each area that holds changed code carries a marker with the owners' initials and how many open changes touch it, and a side panel lists the pull requests with their owner, number and counts of changed code, directly affected, potentially affected and reachable code. Pick one and the markers give way to its colors on the map, drawn the way the review draws them: the changed code, solid lines from the code that uses it directly, tinted areas for what is affected, and dashed outlines for what is only reachable. The panel shows its blast radius as rings and its changed code in a list (a click opens the inspector). Each person keeps one color on the markers and in the list. The People filter narrows the list and the markers to the people you tick; nobody is ranked.
Open work is not only pull requests. A Show filter above the list (All, Pull requests, Branches, Sessions) narrows it to one kind, and it combines with the People filter. Sessions lists the agent sessions of teammates who have turned on team.upload.working on their machines: a session row says the owner, the branch, how many nodes the session has changed and how long ago it last updated (just now, 5 min ago, 2 h ago). A session quiet for more than 30 minutes reads 45 min ago · idle and is muted. Picking a session draws its changed tiles with a dashed outline, so work that is not pushed yet reads differently from a pull request's solid outline, and shows its rings as for any change. The ages are worked out from when the cache was pulled, not from your clock, so the same cache always reads the same; with no session in the cache, Sessions says so and how a developer turns them on. Nothing is live: you refresh to see a newer pull.
When two open changes step on each other, the layer says so and how strongly. Each colliding row carries a badge per collision, with the tier written on it (direct: both change the same node; potential: one changes a node the other's change reaches within three calls; reachable: further out, or via hub when only a collapsed hub links them) and the other change's branch beside it, and a pin with a warning icon and a count marks the first changed tile of each side. The picked change lists its collisions first in the panel: the other change's branch and owner and up to three shared node names (and 2 more), and No collisions with other open changes when there are none. A collision row picks the other change. Collisions are computed on your machine from the team cache, they warn and never block, and they are as old as the last pull.
The layer reads only the local team cache, so the explorer makes no request to a team server and the data is as of the last pull. The panel says so (Team data pulled 12 min ago, in a warning color after 24 hours); Refresh re-reads the cache, and codeplumb team status --pull fetches new data. Without a cache the switch does not appear and the map is unchanged. Titles and owner names come from outside your machine and are shown as plain text. The map in the screenshot is the explorer's synthetic mock, not a real repo.
Five views follow a feature across the stack, from the TanStack Router page through the client calls to the endpoints (oRPC procedures, Hono routes, TanStack Start server functions) and the Drizzle tables their handlers read or write. Their tabs are enabled only when the adapters found routes, endpoints or tables; on a repo without them the tabs stay grayed out and say why. Lines that read a table are blue and lines that write one orange; a dashed line is an uncertain match (a name or a fetch URL rather than a resolved import). In a workspace of several repos a call links to the handler in another repo when its URL is known statically, and a path two other repos both serve is shown as undecided. Hover a line to see what it stands for, double-click a page or endpoint to follow its whole path, a table to see who touches it. Selecting an endpoint shows its method and path, its handler, its middleware and the tables it reads and writes; a table shows its columns and its readers and writers.
Endpoints: every endpoint grouped by kind (rpc, http, server fn), with the middleware it passes through, the code that handles it and the services that code calls. Filter by workspace, kind, method or path prefix.
Page → API: pages on the left, endpoints on the right. A line gathers every request the page's component tree, loader and hooks make to that endpoint; hovering it says how many places make the call and names them.
API → tables: endpoints, the code that makes the database call, and the tables, reads blue and writes orange. "Every service function on the way" expands the middle column to the whole call chain.
Feature path: pick a page or an endpoint and see its whole path in swimlanes, page, client code, endpoints, services and tables, with the places where the trace stops listed on the left.
Table usage: pick a table and see the code that writes it (on top), the code that reads it, and their callers out to the endpoints and pages, as a tree with the table on the right.
Open any node and the inspector offers three actions. Rename gives the node a name of your own (up to 80 characters; an empty name takes it back) and the inspector keeps the original name under it. Hide takes the node out of every view. Group adds it to a group you made (New group… starts one with this node in it). The left panel's Curation section lists every name, hidden part and group with an undo for each: remove a name, Show again for a hidden part, rename or delete a group, and a group shows how many of its members the current view has. Hovering a group marks its first file on the map, with the highlight the "Largest files" list uses; only that one file is marked, not every member.
In the top bar, Saved view switches between the views you saved. Save view… stores the view, level, focus and filters of what you are looking at under a name, and choosing a saved view opens #/<view>?saved=<id>. Reset curation… (after a confirmation) clears every name, hidden part, group and saved view. All of it is stored with the index, so it is still there after a reload. A name or group member you picked on a function follows it when its file is moved or renamed, and when the function is renamed in place with the same body (codeplumb heal, index, init, the explorer's Refresh and the other commands that re-index re-attach it by the function's body; a hook never does). A function that is renamed and moved at once, or whose body also changed, is not followed: its entry is listed as unresolved. Claude can open a saved view with codeplumb_open_view's saved_view.
You need Node 26 and pnpm 10.31.0. To use CodePlumb inside Claude Code, install it as a local plugin from a clone (the /codeplumb:init, /codeplumb:sync, /codeplumb:explain, /codeplumb:overview, /codeplumb:map and /codeplumb:review skills, the model-invoked reuse-first skill, the background describer agent and the read-only explainer agent): see docs/INSTALL.md. To use only the command line, run it from a clone:
git clone https://github.com/jbknick/codeplumb.git
cd codeplumb
pnpm install && pnpm buildThen, inside a git repository in one of the languages listed under Languages (<path> is this clone; no language needs its compiler, interpreter or build tool installed, because files are read from syntax):
node <path>/plugin/dist/cli.js init
node <path>/plugin/dist/cli.js mapinit indexes the repo and prints a summary: files indexed and the time taken, then counts of symbols, function-like symbols, edges, unresolved imports and parse errors, and the data directory. On the small fixture that is 22 files in under 100 ms. If the repo's tsconfig files extend one that a workspace package provides (for example @acme/config-typescript), that tsconfig is read from the package's folder, so its paths apply before the repo's dependencies are installed. A base tsconfig from a package outside the repo is found only through node_modules: if the repo's tsconfig files extend one, install the dependencies first, or its paths are lost and many imports stay unresolved. map starts the explorer on 127.0.0.1 on a free port, prints its URL (with an access token in the query string) and opens it in your browser. Pass --no-open to only print the URL, and --port <n> to pick the port. Stop it with Ctrl+C.
In the explorer, open a node to rename it, hide it or add it to a group, save the current picture with Save view… in the top bar and switch between saved views there; the Curation section of the left panel lists what you changed and undoes it, and everything is still there after a reload.
The explorer's panels, bars and controls are built from SmoothUI components with free Hugeicons icons, in light and dark, and honor reduced motion. The explorer does not watch your files. After you save, the status bar says "Out of date (n files)" on the next request (switching back to the explorer's tab counts as one). Press Refresh in the top bar to re-index just those files and reload the view in place: the camera and everything outside the files you changed stay where they were, and new or changed functions get an amber outline until the next refresh. On a repo of about 1,500 files, refreshing after 20 edited files took about 1.3 s from the click to the new code on screen (see docs/milestones/M4.md).
To get a comment on every pull request instead of running commands, add the GitHub Action described in "Pull request comment" below to your repository's workflow.
The index lives outside your repo, in repos/<hash>/ (or workspaces/<hash>/ for repos listed in a workspace file) under the plugin's data directory (~/.claude/plugins/data/codeplumb-codeplumb-dev/ when installed from the local marketplace; the skills, the hooks and the MCP server all use it). A terminal run from a clone, which has no plugin directory, uses ~/.codeplumb/data/repos/<hash>/; with a plugin directory nothing under ~/.codeplumb/data is read or written. Commands that only read (backlog, usage, heal) and the session-start hook create no data directory for a repo that has no index. Lookups (search, node, trace) do: on a repo that has no index yet they run a full index first and create its data directory. Nothing is written into the repo's working tree. The one exception is codeplumb hooks install, which you run yourself and which writes git hooks under .git/hooks/ (or sets a local core.hooksPath if you already use one); It also writes a small launcher outside the repo, ~/.codeplumb/bin/codeplumb, which the git hooks call and which points at the build it was run from. hooks uninstall and uninstall put the repo back as it was; the launcher stays, because every repo with CodePlumb hooks shares it. The index also reads one file from your repo: .codeplumb/recipe.json, the recipe that says where routes, pages and endpoints are declared (see recipe check below). A repo without one is indexed as before and nothing is printed about it; a recipe that is present but invalid is reported on stderr, rule by rule. You write the recipe by hand, check it with codeplumb recipe check --nodes and commit it: CodePlumb never writes or commits it.
If your project is several repos (a web app in one, its API in another), list them once in a codeplumb-workspace.json in a directory above them, by local path (relative to the file, or absolute):
{
"repos": [{ "path": "./web" }, { "path": "./api", "repo": "acme/api" }]
}Each path must be the root of a git work tree; a URL is rejected, because only repos on this machine are supported. repo is optional and renames the repo in the index (the default is the owner and name of the origin remote, else the folder name); names must be different. Run init in any of the repos: CodePlumb walks up from the repo (as far as your home directory) to find the first file that lists it, and indexes every repo in the file into one index, with each workspace and file marked with its repo. Running init or index in another repo of the file uses the same index and gives the same result. The index lives in workspaces/<hash>/ under the data directory, where <hash> comes from the folder that holds the file. A repo that no file lists is indexed by itself, as before. To use a file that is not above the repo, pass it to init, index, heal or map with --workspace <file>. Take a repo out of the file and the next index drops its rows and keeps the rest.
This makes one index of several repos. Search and the function index cover every repo: each hit names its repo, and search --repo <name> limits a search to one. Duplicates find copies in a sibling repo too: the end-of-turn note, the pre-commit line and codeplumb_find_similar name the match as <repo>:<path>:<line>, say that the code is in that repo instead of suggesting an import that cannot work (unless a package of that repo is already a dependency), and the Duplicates view shows each copy's repo (always within one language). An import of a package that another repo of the workspace publishes (@acme/contracts in a web repo, published by an api repo) opens that repo's source, so callers, go-to-source, trace and impact follow it across repos; a package that two repos publish is reported as ambiguous, and one that no repo publishes resolves as before. A fetch, axios or ky call in one repo that matches an endpoint of another repo links to it, so trace goes from a page in the web repo to the handler and tables in the api repo (and from a table up to the pages), each step led by its repo, and the Feature path view labels its nodes with theirs. The hooks work in every repo of the workspace, each against that repo's own changes; the project map still works from the repo you run it in.
Each repo updates on its own: a checkout, commit or merge in one repo re-indexes only that repo, an edit in one repo is seen from the others without re-indexing them, and hooks install puts the git hooks into every repo of the workspace (hooks uninstall removes them from all).
TypeScript and Clojure have their own indexers. Every other language is a language pack: a description of the language's syntax that one shared engine reads, parsed with a tree-sitter grammar and with no compiler, interpreter or build tool installed. A pack makes symbols, imports, the workspaces its manifests name and calls, extends and implements edges. Calls carry a level that says which resolver made the edge. Level 1 is a name resolver (the one function of that name the caller can see); no pack uses it today, because each pack has a type resolver that replaces it, and Clojure's own resolver is level 1. Level 2 reads declared types: it follows a receiver's declared type to its method and gives no edge where no type is known, so a call on a value of unknown type has no edge. Level 3 reads the values assigned in the code where no type is declared, and every edge it makes is low confidence. Duplicates are compared within one language only.
- TypeScript (
.ts,.tsx,.mts,.cts): its own indexer with import resolution and the workspace tools listed above. Its call edges carry no level. What was measured is parsing and import resolution (the Status table's M1 row); its call edges are not covered by the packs proof. - Go (
.go, one workspace pergo.mod): a pack. Call edges are level 2 and high confidence, an interface satisfied by method names is a low-confidenceimplementsedge. Not measured: the report indocs/milestones/M12.mdwas made with the Go resolver that the pack replaced, so it does not count for the current one. - Java (
.java, Mavenpom.xmland Gradle projects): a pack. Call edges are level 2; a call with one candidate method is high confidence, one with several overloads of that arity is one low-confidence edge for each. Measured against SCIP truth on two public repos, bar not met: mybatis-3 meets every bar (high-confidence call precision 99.80%, call recall 88.64% against 85%), jackson-databind does not (call recall 83.79% against 85%, high-confidence precision 99.78%). - Python (
.py,.pyi; a folder with apyproject.toml,setup.cfgorsetup.pyis a workspace): a pack. Call edges are level 2 and high confidence where an annotation or a declaration settles the target, and level 3 and low confidence where only an assigned value does; no Python edge is level 1. Measured against SCIP truth on two public repos, bar not met: precision is met (high-confidence call precision 99.35% on django and 99.38% on prefect against 99%, low-confidence (level 3) precision per call site 96.64% and 98.84%, against 90%), call recall is not (65.02% and 66.60% against 70%), and symbol recall is below the 97% bar for functions, methods and classes on both, mostly because definitions nested in the body of a function are not symbols. - C# (
.cs, one workspace per.csproj): a pack. Call edges are level 2 only and every one is high confidence; a call that several overloads fit has no edge, and a call has no edge where the type of its receiver is not known. Not measured against a compiler-backed truth. - Rust (
.rs, one workspace perCargo.tomlthat has a[package]): a pack. Call edges are level 2 only and every one is high confidence, and a call has no edge where the type of its receiver is not known. Not measured against a compiler-backed truth. - Clojure (
.clj,.cljs,.cljc; a folder with aproject.clj,deps.edn,shadow-cljs.ednorbb.ednis a workspace): its own indexer, a reader written by hand (there is no tree-sitter grammar for it among the approved packages), with no JVM or Clojure tooling installed. Every top-level defining form is a symbol (customdefmacros included), plus protocol methods, record constructors anddefmethods. Call edges are level 1: a reference to a var, called or passed as a value, is resolved by name through thensform's aliases and refers, then the file's own namespace (high confidence), then a namespace referred whole (low confidence), with local bindings hiding vars. Measured against clj-kondo (not SCIP, and with no bar) on ring, clojure-lsp and status-mobile: symbol precision and recall 100%, call precision at least 99.96% and call recall 98.55% to 100%. Not covered: re-frame registrations and keyword dispatch, Java interop, precise mode.
The measured figures, the bars and how each was scored are in docs/packs-proof.md. A figure that is below its bar is a miss there and here.
Precise mode is opt-in and off by default. When you give it a SCIP index of your repo, the call, render, hook and type edges of the files the index covers come from the index instead of from inference, at high confidence. You make the index with your own indexer for the language; CodePlumb never runs an indexer or a toolchain. The command and the rules for a stale index are under Precise mode in Commands.
claude plugin update compares the version in plugin/.claude-plugin/plugin.json with the installed one. A new build with the same version reads as "already up to date", so every release bumps it (pnpm release, see CONTRIBUTING.md). To pick up a new version:
git pull # in your clone, when you installed from one
claude plugin marketplace update codeplumb-dev
claude plugin update codeplumb@codeplumb-devRestart Claude Code afterwards. Uninstalling the plugin deletes its data directory, and every index in it, so update in place (/plugin update, or reinstall over the same marketplace). If no index is found for a repo, a fresh one is built and codeplumb init says so in one line. Run codeplumb --version (or node <path>/plugin/dist/cli.js --version) to see the version of a build. A reinstall (/plugin install codeplumb@codeplumb-dev again over the same marketplace; an uninstall first would delete the indexes) is only needed when an update still says "already up to date" because the clone is at a commit with no version bump (a build from a branch between releases), or after you moved the clone. Run pnpm build in the clone first: the plugin ships plugin/dist/, which is not committed.
Each tagged release carries two tarballs, each with its own checksum file. codeplumb-<version>.tgz (checksum codeplumb-<version>.tgz.sha256) holds the bundled CLI and MCP server and a lockfile for the native dependencies (SQLite, the parser, the embedding runtime); it is the same file for every platform: npm ci fetches the native binaries for the machine it runs on. CodePlumb is not published to a package registry. On a runner with Node 26, set V to the version of a release that has the tarball and run:
V=<version>; B=https://github.com/jbknick/codeplumb/releases/download/v$V; curl -fsSLO $B/codeplumb-$V.tgz && curl -fsSLO $B/codeplumb-$V.tgz.sha256 && sha256sum -c codeplumb-$V.tgz.sha256 && tar -xzf codeplumb-$V.tgz && (cd codeplumb && npm ci --omit=dev --no-audit --no-fund) && ./codeplumb/bin/codeplumb --versionThe last command prints the version. npm ci installs only the third-party native dependencies from the lockfile in the tarball; nothing else is downloaded. On macOS use shasum -a 256 -c in place of sha256sum -c. To build the tarball yourself, run pnpm build && pnpm release:pack: it writes dist/codeplumb-<version>.tgz, dist/codeplumb-protocol-<version>.tgz (the @codeplumb/protocol package, described in docs/INSTALL.md) and a .sha256 file for each, and two runs on the same commit give the same bytes.
A GitHub Action that you add to your own repository (this repository has no workflow of its own, and CodePlumb never writes one into yours). On each pull request it installs the release tarball by version and checksum, indexes the checkout, runs codeplumb review <base>...<head> --json and codeplumb duplicates --since <base> --json, and posts one comment with the risk, the symbols the pull request changes, what consumes them directly and through other code, the boundaries it crosses, and the duplicates it adds. The comment is updated in place on every push, so there is never more than one. No model calls; exact and near duplicate tiers by default, and the code-vector tier only with embed: true.
name: codeplumb
on: pull_request
permissions:
contents: read
pull-requests: write
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: jbknick/codeplumb/action@v<version>
with:
version: "<version>"
sha256: "<the checksum in codeplumb-<version>.tgz.sha256>"The comment is a summary, capped well below GitHub's 65,536-character limit, never the raw review JSON. Without a committed .codeplumb/recipe.json the comment says the radius is structural only. A pull request from a fork gets no comment (its token is read-only); the same text goes to the job summary and the job stays green, and so does any run whose token is refused. The Action fails open: if the install, the checksum check, the index or the review goes wrong, the step logs a warning and exits 0, and the pull request's one comment is updated to say the analysis failed and why (a checksum mismatch is logged as an error and the tarball is never run). A cold index takes about a minute per 1,000 files on a standard runner (about 5 to 6 minutes at 10,000 files). Inputs, behavior and limits are in action/README.md.
The same Action can also send the graph to a team server, when you set the three inputs team-server, team-org and team-token (all empty by default, so nothing is uploaded): a push to the default branch uploads the graph of that branch, a pull request event uploads its change set, a closed pull request tells the server it closed and whether it merged, and a pull request from a fork uploads nothing. With a fourth input, team-branches: push (default off), a push to another branch also uploads that branch as an in-progress change set until its pull request opens, and deleting the branch closes it. A failed upload is one warning line and never fails the job. What is sent is listed under What is uploaded and what is not; the workflow is in action/README.md. With the same three inputs the comment also gets a Team boundaries section (see Shared views and team boundaries).
Run as node <path>/plugin/dist/cli.js <command>. Every command below exists today (--help on each shows its options).
| Command | What it does |
|---|---|
init [--estimate] [--exports-first] [--embed] [--workspace <file>] |
Create the data directory and run a full deterministic index of the current repo. On a machine linked to a team it first fetches the descriptions the team already has, so the describer only gets what nobody has described. --estimate also prints how many functions would need a description and the projected token cost; it makes no model calls. --embed also fills the local embedding vectors afterwards (see embed). It also records similar_to links between functions that are exact or near copies of each other (shown by node). With a codeplumb-workspace.json that lists the repo (found above it, or given with --workspace) it indexes every repo of the file into one index (see Several repos). |
embed [--limit n] [--budget-ms n] [--json] |
Fill the local embedding vectors used by the two vector tiers of duplicate detection, in resumable batches with progress on stderr. Runs a local model on the CPU; nothing is sent anywhere. init never does this on its own. |
index [--files <paths...>] [--layer main|working] [--dump] [--scip <file>] [--workspace <file>] |
Run the deterministic index and refresh the similar_to links (main layer). --scip <file> is precise mode (see below). --dump prints the sorted graph as JSON. --dump adds a repo to every workspace and file and a top-level repos list (names only), for a single repo too. |
heal [--from <sha>] [--workspace <file>] |
Bring the index up to the current HEAD (incremental, or a full re-index for a very large diff, or once after an upgrade that changes what indexing writes) and refresh the similar_to links. In a workspace it heals each repo in turn, each against its own HEAD; --from applies to the repo you are in. In a repo with no index it says so and creates nothing. |
search <q> [--kind <kind...>] [--lang <lang>] [--repo <name>] [--limit <n>] [--json] |
Hybrid search: keywords over symbol names, paths and stored descriptions, plus meaning when the embedding model is cached (never downloaded by search). Higher score is better. In a workspace of several repos every hit carries its repo ([<repo>] before the name in the table) and --repo keeps one. |
node <target> [--json] |
Show a symbol or file and its neighbors by edge kind. The target is a node id, path:line or a file path. |
usage [--json] |
Model usage grouped by task and model (rows come from the pre-commit describer; empty until it has run). It creates nothing in a repo with no index. |
describe --staged [--json] |
Describe the staged functions that have no description with the headless claude -p worker (Haiku by default; functions that fail the checks are retried once on Sonnet). Only runs when precommit.mode is timeboxed (stops at precommit.budgetMs, default 20000, and queues the rest) or strict (no deadline); the default off does nothing. The worker needs claude logged in (set worker.binary in the config if it is not on PATH); otherwise everything is queued. Every call is logged for usage. The pre-commit hook runs this itself in those two modes and always exits 0. |
backlog [--json] [--failed] [--retry-failed] |
Counts of the description backlog by status (pending, claimed, failed) and by priority, the number of fallback descriptions written without a model (fallback), the data directory they come from (data_dir), and whether init built a backlog there (indexed). --failed lists each failed function with the rule name of its last rejection (never the description text); --retry-failed puts them all back to pending. No model calls; it creates nothing in a repo with no index. |
config get [key], config set <key> <value> |
Read or write project config by dotted key. |
team login, team link --server <url> --org <slug>, team status [--json], team logout |
Connect this checkout to a team server (see Joining a team). login signs in with a code, link records the server and organization for this repo on this machine, status shows the connection and the team cache (status --pull refreshes the cache first) and exits 1 when it is not linked, not signed in or not reachable, logout removes the stored sign-in. Nothing is uploaded. |
team sync-descriptions [--json] |
Fill in the descriptions your team already has for functions this machine has none for (see Uploading). Prints filled <n> of <m> functions without a description (--json: {"asked":<m>,"filled":<n>}); a description you already have is never replaced. Exit 1 with not linked to a team when there is no server, organization or sign-in. |
team publish view|group <id> [--json], team unpublish view|group <id> [--json] |
Send a local saved view or group to the team, or remove one from it (see Shared views and team boundaries). Exit 1 with the server's message when it refuses, 2 when the id is not a local view or group. Nothing but that one view or group is sent. |
team boundaries --base <sha> --head <sha> [--json] |
List the edges of the changed functions and files that use a group their own team group does not list (see Shared views and team boundaries). Reads the team's groups from the server, one request, and the index as it is. Exit 0 with or without findings, 1 when no team is linked or the server cannot be reached. --json prints {"crossings":[...],"total":<n>}. The Action runs it for the pull request comment. |
upload [--pr <n> ... [--collisions <file>] | --branch [<name>] [--base-branch <name>]] [--close [--merged]] [--descriptions] [--force-main] [--dry-run [--summary]] [--json] |
Send the graph of main, or the change set of a pull request or of a pushed branch that has no pull request yet (--branch), to the team server, or tell it a pull request is closed (or, with --branch <name> --close, that a branch is deleted), or (--descriptions) send the descriptions written on this machine (see Uploading). With no server and organization it sends nothing and says so. |
changes [<target>] [--json] |
Which open changes of your team touch a function, a file or a pull request, and which of them collide. The target is a node id, path:line, a repo-relative path or pr:<number> (which answers for that pull request from any checkout); with none it answers for the branch you are on. It lists in-review and in-progress changes on the same base branch, not your own, as a table of how each touches the target (node: it changes it; file: it changes other code in the same file; radius: the target is in its blast radius), then one line per collision with its tier. It reads the local team cache and index and never the network, so the data is as of the last pull, and it says how old that is. --json prints the object codeplumb_changes returns, uncut. With no cache it prints No team cache. Run codeplumb team status --pull. and exits 1. |
map [--port <n>] [--no-open] [--workspace <file>] |
Start the explorer server, or reuse the running one, and open it. The explorer refreshes on request: its Refresh button re-indexes the files changed since the last refresh (no watcher). |
review <base>...<head> [--json] [--open], review --pr <n> [--json] [--open] |
Symbol-level diff of a branch or pull request against its merge base, with its blast radius. With --json it prints JSON: which functions were added, removed, modified, moved to another file or renamed in place, whether a signature or an export changed, the line delta, the import specifiers added or removed per file, and impact (callers by hop, crossings, risk, notes, and consumers: for every changed symbol and file its direct and potential consumers and a third tier, reachable (everything the walk reaches from hop 4 on, up to 2,500 nodes, ranked by hop, path confidence and fan-in, with reachableTotal and a count per hop in impact.reachable), with how each uses it; the consumers of a hub (a node more than 608 others use) are not listed one by one but as one entry in hubs with a total and a count per workspace (impact.hubs names them), from the index as it is; null when the repo has no index). It reads the changed files from git and never re-indexes or writes anything. Without --json it prints a short summary: a risk score with the rules that fired (low, medium or high), the callers at each hop (up to 3), the places the change crosses a package, app or client/server boundary, the top consumers of each change ("Directly affected", "Potentially affected" and "Reachable", with the reachable total and its hubs), and notes (removed exports still used, new undeclared imports, new duplicates). --open opens the review view in the explorer (starting it in the background if needed) and prints its link. --pr asks gh for the base and head and fetches them if missing; without a logged-in gh, use the range form. |
duplicates [--json] [--since <ref>] [--workspace <w>] |
Print the ranked duplicate groups of the Duplicates view, from the same engine: a totals line (<n> groups · <n> functions · <n> duplicate lines · <n> across workspaces), then each group with the copy to keep and why, and the other copies with their tier and score. --json prints { summary, clusters }, the same as the view's data. --since <ref> keeps only the groups with a copy changed in <ref>...HEAD or the working tree (the duplicates a branch adds), and the totals count what is kept; an unknown ref fails with exit code 1. --workspace <w> (id or package name, repeatable) keeps the groups with a member there. It exits 0 whenever an index exists. |
trace <target> [--up|--down] [--json] |
Page → API → table chain. From a route (route:<app>:/posts/$postId, or just /posts/$postId) it follows the page's component, what it renders, calls and hooks, the endpoints those request (oRPC procedures, Hono routes, TanStack Start server functions) and the database tables their handlers read or write; from a table (table:posts) it goes up to the endpoints and pages that use it. Also takes an endpoint (rpc posts.list, GET /api/posts/:id), a symbol id or a path. Prints the chain indented by depth, low-confidence matches flagged, then the gaps where it stops (client calls that match no endpoint, endpoints with no table, limits); --json prints the whole result. |
recipe check [<file>] [--nodes] [--limit <n>] [--json] |
Check the repo's recipe (default .codeplumb/recipe.json): validate it, run every rule's examples and count each rule's matches in this repo. Prints one line per rule (schema ok, examples ok, matches; a rule that matches nothing is a warning, not a failure). Exits 0 when the recipe is valid and every example passes, 1 otherwise. --nodes also lists the routes, endpoints, middleware, tables, reads and writes the index makes from the recipe, each with file and line, up to --limit per kind (default 20), so you see what the recipe produces and not only how many matches it has. A text rule works whether or not text-rules is listed in helpers. Go rules ("language": "go") are checked on the Go files of the repo like TypeScript rules on theirs; a pattern with one argument needs its context and selector (see the spec). A second path argument prints a usage line. --json prints { rules, errors } (and nodes with --nodes). |
hooks install, hooks uninstall |
Install or remove the git hooks in every repo of the workspace (just the current repo when there is no workspace file), chaining any existing hooks. |
uninstall [--keep-data] |
Remove the git hooks and delete the repo's data directory. |
hook <name> [args...] |
The entry point the installed git hooks call (the plugin's Claude Code hooks use it too). It always exits 0. You do not run it by hand. |
codeplumb index --scip <file>, or precise.scip in the config, reads a SCIP index of the repo and takes the call, render, hook and type edges of the files it covers from the index instead of inferring them. A file that changed after the index was written keeps its inferred edges, and so does a file the index does not cover, so make the index after your last edit. The other edge kinds (imports, exports, extends, implements, routes and data access) stay inferred. If precise.scip names a file that is missing, one line is printed and the inferred edges are kept; a file that is not a SCIP index is an error. In a workspace of several repos each repo reads its own index file at that path. You run the indexer that makes the file yourself; CodePlumb never does.
If your team already runs a CodePlumb server, three commands connect a checkout to it. Nothing is uploaded until you run codeplumb upload, and without them every command works exactly as before.
codeplumb team login --server https://api.codeplumb.dev # prints a URL and a code; approve it in the browser
codeplumb team link --server https://api.codeplumb.dev --org acme
codeplumb team status
login stores your token in ~/.codeplumb/credentials.json (mode 600) and nothing else; the token is never printed or written to the project config. link writes team: { server, org } into the project config in the data directory, which is per machine, so nothing about the team is added to your working tree or committed. The server must be an https URL (http is allowed for localhost and 127.0.0.1).
In CI, set three environment variables instead: CODEPLUMB_SERVER, CODEPLUMB_ORG and CODEPLUMB_TOKEN. They override the config file and the credentials file is not read, so a pipeline needs no team block and writes no file. codeplumb team status then prints the server, organization, user, repo and reachable: yes, and --json prints the same as one line.
Team state is cached locally in one small file, team-cache.db in the data directory. The MCP server refreshes it when it starts and, at most once a minute, before a tool call, and codeplumb team status --pull refreshes it on request, so hooks and tools read the file, never the network, and keep working offline; codeplumb team status shows its age as cache: <n> open changes, pulled <age> ago.
codeplumb upload sends the index to the team server and prints one line per state change. Run it after the index (codeplumb index), on the default branch, to send the graph of main; with --pr it sends one pull request's changed nodes and blast radius; with --pr --close it tells the server the pull request is closed, and with --merged that it was merged. With --branch it sends the changed nodes and blast radius of a pushed branch that has no pull request (the branch and the default branch it left, --base-branch, default from origin/HEAD; the checkout needs the history back to their merge base), and --branch <name> --close tells the server the branch is deleted.
codeplumb upload # the graph of main (default branch only; --force-main overrides)
codeplumb upload --pr 142 --base <sha> --head <sha> --owner maya --head-ref feat/discounts --base-branch main --title "Add discounts"
codeplumb upload --pr 142 --head <sha> --close --merged
codeplumb upload --branch feat/discounts --base-branch main # a pushed branch with no pull request yet
codeplumb upload --branch feat/discounts --close # the branch was deleted
codeplumb upload --dry-run > payload.json # print exactly what would be sent; nothing is sent
codeplumb upload --dry-run --summary # counts and sizes per field instead
The server, organization and token come from CODEPLUMB_SERVER, CODEPLUMB_ORG and CODEPLUMB_TOKEN, or from codeplumb team link and codeplumb team login on a developer's machine. With no server and organization it prints No team configured; nothing uploaded. and sends nothing; with both but no token it prints No token. Set CODEPLUMB_TOKEN, or run codeplumb team login. and exits 1. --owner, --head-ref, --base-branch, --title and --created-at default to CODEPLUMB_PR_OWNER, CODEPLUMB_PR_HEAD_REF, CODEPLUMB_PR_BASE_BRANCH, CODEPLUMB_PR_TITLE and CODEPLUMB_PR_CREATED_AT. The command waits up to --timeout seconds (600 by default) for the server to finish; --json prints one result object instead of lines. It exits 0 when the upload is stored (or superseded by a newer one), 1 when it failed, timed out, was refused, found no token or the server's daily capacity was used, and 2 for a usage error. The token is never printed, and no hook runs this command.
codeplumb upload --dry-run prints exactly what the upload would send and sends nothing: the begin request, then each part with a marker line {"of":<parts>,"part":<n>} and its records, decompressed, one JSON object per line. It makes no network call and needs no server, organization or token, so a security reviewer can read it before team upload is turned on; dry run: nothing was sent goes to stderr. --summary prints one JSON object of counts and sizes per field instead (--summary alone is a usage error). It works with --pr, --close and --descriptions too, but not with --json (a usage error, because stdout is the payload). A dry run cuts the parts to the default limits (2,000 records, 1 MiB); a real upload cuts to the server's. The output is byte-stable between runs for the main snapshot, for descriptions and for a close (given the same --head commit). A change set carries the time it was built (updated_at, which a real upload also sends fresh each time), so two dry runs of one pull request differ only in that value (given --created-at; without it the creation time is stamped too), and possibly in gzip_bytes under --summary.
codeplumb upload --descriptions sends the model-written descriptions of this machine to the organization, so a teammate's agent need not write them again. It sends every field of each record (content_key, behavior, search_terms, name_fits, suggested_name when there is one, provenance, model, prompt_version, created_at), 500 to a request, and prints Uploading <n> descriptions for <repo>... and stored <n> new; --json prints one object, {"status":"done"|"skipped"|"failed","sent":<n>,"stored":<n>}, with reason when skipped and error when failed. Descriptions that CodePlumb builds itself (the fallback and template ones) are rebuilt on every machine and are not sent. team.upload.descriptions in the project config (default true) is the switch: when it is false the command prints Description upload is switched off (team.upload.descriptions)., exits 0 and sends nothing. Only a signed-in user sends descriptions: with a CI token (gct_...) it prints Descriptions need a signed-in user. Run codeplumb team login. and exits 1. It cannot be combined with --pr or --close (exit 2), and it uploads no graph.
codeplumb team sync-descriptions is the other direction: a function that a teammate has already described gets that description on your machine, with every field the original had, without running the describer again. It asks the server for the functions you have no description for, by content key only (the request carries the repo name and keys, never code), and stores what comes back after the same checks a description written here goes through; a description you already have is never replaced, and one that fails the checks is dropped. It prints filled <n> of <m> functions without a description, and --json prints {"asked":<m>,"filled":<n>}. The MCP server also runs it once when it starts, after the team cache pull, for at most 2,000 functions and 5 seconds; a failure or a timeout goes to the MCP log and nothing else. No hook ever calls it. Synced text is untrusted wherever it is shown, like any description. It needs a server at protocol version 2 or later (an older one gives server does not support description lookup and fills nothing), and team.upload.descriptions: false does not stop it, because that setting governs only what you upload.
Saved views and groups are normally yours alone, stored in overlay.db in the data directory. A team can share them. Once your checkout is linked and you are signed in, the views and groups the team has published are pulled into team-cache.db with the rest of the team state, and they appear next to your own. Each carries where it came from, team or local. If a team group and a local group have the same id, the team's wins; yours stays readable and is marked as shadowed, and nothing in your overlay is changed or deleted. The server can also name one team view as the default; that name is used only when a pulled view has that id.
codeplumb team publish group payments # Published group payments to acme/storefront.
codeplumb team publish view release-risk # Published view release-risk to acme/storefront.
codeplumb team unpublish view release-risk # Removed view release-risk from acme/storefront.
publish sends the local view or group with that id, unpublish removes it from the team (the id is looked up among your local views and groups, not the team's). The server decides who may do either: when it refuses, the command prints its message and exits 1, for example Not removed: Only an admin can remove a team group.. Without a linked team and a sign-in it prints not linked to a team and exits 1; an id that is not a local view or group exits 2. --json prints {"kind":"group","id":"payments","published":true} ("published":false after unpublish). Publishing refreshes the team cache at once, so the change shows without waiting for the next pull. Hooks never publish and never wait on the network; they read the cache as of the last pull.
In the explorer, the saved-view switcher gains a Team heading once the checkout has a team cache: your own views come first, then the team's, each with a small team icon, and the team's default view carries a Default badge (the heading says pulled 12 min ago, in a warning color after 24 hours). A session that has never picked a view opens on the team default; after you pick one, a later session opens on your own last choice instead (the explorer keeps it in a small file in the data directory, so a new port does not lose it). A team view or group is read-only: a bar over the map says Team view: read-only and offers Save a personal copy, which makes a view (or, in the Curation section, a group) of your own with a new id and opens it. The … of a view of yours offers Publish to team, or Remove from team once the team holds it, and the same buttons sit on each group in the Curation section; the line under the menu says Published to team. or gives the server's reason when it refuses, and the item stays as it was. A view or group you published stays in your own list with a Published marker and is not repeated under Team; only a teammate's item is read-only. A local group whose id a team group with other content holds is listed as shadowed by the team group and cannot be added to. Without a team cache the switcher is the plain select it has always been and there are no publish items. Browsing reads only the local cache; the one request the explorer makes to the team server is the click on a publish or remove button, through the same code as codeplumb team publish. Names come from teammates and are shown as plain text. The map in the screenshot is the explorer's synthetic mock.
A team group that has a mayUse list is also a boundary on every machine, by the same rule as your own groups. When an edit adds a call or an import from a member of a team group into a group that team group does not list, the agent's end-of-turn note names it, as a warning:
CodePlumb: applyDiscount (src/pay/discount.ts:12) in team group payments uses getCart (src/cart/cart.ts:40) in team group checkout, which payments does not list. Warn only.
On a repository whose boundary mode is check, the team's lines end Required check in CI. instead of Warn only.: the pull request will fail on it, and the edit is still let through. Team lines come after the other lines, so the note's 600-character cap drops them first. They are read from the team cache only, so they work offline, are as of the last pull, and nothing in a hook, a commit or an edit is ever blocked. Without a team cache the note is the one your own groups give.
When other open changes of your team touch a file the agent edited, the same note ends with one more line, which counts them and says where to look. It names no change, person or function, only the file with the most of them:
CodePlumb: 2 other open changes touch packages/utils/src/slug.ts. Run codeplumb changes packages/utils/src/slug.ts to see them.
codeplumb changes <path> lists exactly those changes (the node entries). The count is of open changes on the same base branch, other than your own, that change the file or a function in it; one that only reaches the file through its blast radius is not counted. The line comes last, so the note's 600-character cap drops it first, and it ends (team data 30h old) when the cache was pulled more than 24 hours ago (it is not printed after 7 days). It is read from the team cache only, so it works offline and adds a few tens of milliseconds to the Stop hook with 200 open changes. Turn it off with codeplumb config set team.hook.lines false (on a checkout that has a team block: a team set only through the CODEPLUMB_SERVER and CODEPLUMB_ORG environment variables has none, so there the line cannot be turned off). Without a team cache the note is unchanged.
The same groups also act as boundaries in the pull request comment. When the Action has team-server, team-org and team-token (and the pull request is not from a fork), the comment gains a Team boundaries section between Crossings and Consumers: one line per pair of groups, with up to three places where a changed function or an added import uses a group its own team group does not list, and the number of edges:
### Team boundaries (2)
- `payments` → `checkout`: `applyDiscount` uses `getCart`, `totalWithTax` uses `getCart`, `roundCents` uses `getCart` (5 edges in total)
- `payments` → `shipping`: `shippingCost` uses `rateFor` (1 edge in total)
It lists up to 10 pairs, then and <n> more. By default the section only warns. A team can set a repository's boundary mode to check on its server; the Action's job then fails when a pull request crosses a team boundary, after the comment (which opens the section with Boundary check: failed (<n> crossings), or Boundary check: passed) is posted, so branch protection can require it (see action/README.md). Nothing else fails the job: not scope notes, not duplicates, and not an unreachable server. The groups come from the team server, never from the repository, and group and function names are shown as plain code, so a name cannot add a link or a mention. Crossings, the existing section for consumers in another workspace, app or client and server, is unchanged. Without the three inputs the comment is exactly what it was; if the server cannot be reached the comment is posted without the section and the log has one warning line. You can run the same check by hand with codeplumb team boundaries --base <sha> --head <sha>.
Uploading is opt-in: nothing is sent unless a checkout is linked to a team server and you run an upload. The upload is built from the index by two functions, so what a dry run prints is what is sent. Two payloads exist.
The graph of main carries, for the repo:
- workspaces:
id,name,path; - files:
id,path,workspace(a workspace id),lang; - symbols:
id,name,kind,lang,path,workspace,line_start,line_end,exact_hash,renamed_hash,content_key; - edges:
from,to,kind; - adapter nodes (routes and the like):
id,kind,workspace,label(one line),file_id; - the
shaof the commit.
A pull request's change set carries its id, repo, number, title (if given), head and base branch, head commit, author login, the ids of the changed symbols and files, and the ids it can reach with the hop and tier of each (direct, potential, reachable), at most 3,000 of them, plus the times it was opened and updated. When the list is cut, one line on stderr says how many were sent of how many were found. Sent from the Action, a pull request's change set can also carry the collisions the Action computed for it (the ids of the two changes, the tier, up to five shared node ids and their count, whether both are yours and which should land first), at most 50, only to a server that speaks protocol version 4.
A pushed branch's change set (codeplumb upload --branch, or the Action with team-branches: push) carries the same fields as a pull request's, with the branch name in place of the number and title, the default branch it left, and the times of its first commit and of the push. Nothing else is sent, and nothing is sent for a branch that has an open pull request.
A session's change set is sent only while team.upload.working is on, which is off by default and is a setting of this machine's config file (codeplumb config set team.upload.working true; nothing is committed, and no environment variable turns it on). Each agent session's MCP server then uploads what the session has changed but not pushed (the staged, unstaged and new files that git does not ignore, against the merge base with the default branch), under your signed-in GitHub login, as an in_progress change set with the same fields as a pushed branch's: the ids of the changed symbols and files, the ids they reach with their hop and tier, the current branch name (empty on a detached HEAD), the default branch, the head commit, and the time the session started and the time of the upload. Its id, cs:session:<repo>:<12 hex characters>, is made from 16 random bytes drawn when the server starts, so it names no user, machine or path. The first upload follows the first edit the server sees, later ones come at most once a minute and only when the payload changed, and when the session ends (stdin closes or the server is stopped) the change set is closed, waiting at most two seconds. Nothing is sent without a link, a sign-in and a server that speaks protocol version 3, no hook uploads or waits on the network, and a failed upload is logged and otherwise ignored.
Descriptions are sent only by codeplumb upload --descriptions, only the ones a model wrote, and only while team.upload.descriptions is on. A description is one sentence of text about a function, with its search terms; it is untrusted text wherever it is shown. No upload of the graph carries one. The switch is a setting of this machine's config file (<dataDir>/config.json, team.upload.descriptions, on by default); with it set to false no description request is made by any command or path, and --descriptions --dry-run prints none either. A check runs on every request body before it is sent or printed (the main graph, a change set, a close, a description batch and the dry run): it refuses the upload, sends nothing and exits 1 with upload refused: field <path> may carry source when a field is named like source (signature, body, text, code, snippet, doc, content, contents, fact_sheet), when a source field holds anything but pr or branch, or when a string is longer than 1,024 characters.
Never sent: function bodies, signatures, comments, file contents, fact sheets, descriptions (except by that one command), and the engine's own measures of a function (loc, complexity, exported, edge evidence and confidence). The hashes are one-way: they show that two functions are the same, and cannot be turned back into code. A test builds both payloads for two fixtures and fails if any field could carry source: a key named like source, a value with a newline or a line of the fixture's code, or a function's signature anywhere in the text.
Progress by milestone. Issue lists are on the milestones page.
| Milestone | State | Notes |
|---|---|---|
| M0 Spikes | Done, verdict GO | Headless Claude worker, oxc import graph, embedding model and description quality were measured. See docs/spikes/GO-NO-GO.md. |
| M1 Structural graph | Done | Workspace detection, file discovery, parsing, import resolution, hashing, SQLite store, init, heal, git hooks, search/node/usage/config. On a private TypeScript monorepo (1,531 files, 9,042 symbols, 41,817 edges): 0 parse errors, 0.28% of repo-internal imports unresolved, a cold index in about 7 s, identical output across runs. Details in docs/milestones/M1.md. |
| M2 Reuse guard | Done | Built: the description backlog and template descriptions, the local embedding step (codeplumb embed), the duplicate engine (exact, near, code-vector and semantic tiers, plus similar_to links) with the explorer's Duplicates view, and the deterministic reuse advice (import it, add the dependency, export or move it, undeclared-import check). The description checks, and the codeplumb MCP server with lazy refresh and two describer tools (claim a batch of functions, submit descriptions), three lookup tools (hybrid search, browse, node) with per-folder catalog files of one-line function descriptions, and the optional pre-commit describer (precommit.mode timeboxed or strict; runs claude -p headless, checks every description, logs usage). The plugin package (manifest, MCP config, the describer agent that calls those tools, the /codeplumb:init and /codeplumb:sync skills) and the backlog command; the Claude Code hooks (a duplicate and undeclared-import note at the end of each turn, double-checked against disk, a session-start reminder, the same findings at pre-commit); installing it from a local path is in docs/INSTALL.md, and the in-session end-to-end run is recorded in #27. The codeplumb_find_similar MCP tool and the model-invoked reuse-first skill that tells Claude to call it before writing a new helper. Describer failures on a private 3,511-function monorepo: 11 failed (0.3%) after the rewrite feedback and retry of #150, against the 1% target. codeplumb duplicates prints the same ranked groups from the command line. |
| M3 Explorer | Done | Built: local server with a token, the 2D project map (four detail levels), the function caller graph, the duplicates view (ranked groups, side-by-side source, "not a duplicate"), small badges on function tiles and rows (duplicate, undescribed, misleading name) with a legend, the pages view (the file routes of TanStack Router apps, each with its component and what that renders), the feature slices view (imports across slice boundaries and the functions shared by several slices), the 3D settlements (just for fun, with the city and islands as alternative styles), search, inspector (for a workspace or folder it shows the cached overview as plain text, or a hint to run /codeplumb:overview), light and dark themes. The read-only explainer agent with the /codeplumb:explain, /codeplumb:overview (cached per workspace or folder, only on request) and /codeplumb:map skills; the in-session check of /codeplumb:explain and /codeplumb:overview is recorded in #35. The M3 regression (docs/milestones/M3.md, evals/bench/m3.ts) is recorded: pan holds 60 fps headless (118 to 120 fps in a window on a 120 Hz screen) on a synthetic 30,000-function graph, and 60 fps on a private TypeScript monorepo (Apple M3 Pro, GPU), the project map, pages and slices draw the same picture from two fresh data dirs, and a second origin is refused with 403. Optional follow-up: far-zoom wheel zoom on the 30,000-function graph dips to 45 to 47 fps headless with frames up to 108 ms (#135). |
| M4 Explorer refresh | Done | Built: an "Out of date (n files)" marker from a cheap check on every request (git status plus mtime), a Refresh button that re-indexes the changed files (POST /api/refresh) and reloads the view in place, keeping the camera and the position of everything outside the changed files, with added and changed functions outlined. Not live: no watcher, no push. Measured on a private 1,541-file monorepo: 20 edited files to new code on screen in 1.27 s (median), nothing outside them moved. See docs/milestones/M4.md. |
| M5 Code review | Done | Blast radius of a change or pull request. Built: the symbol diff between two refs (codeplumb review --json), impact by hop with a risk score (codeplumb review, codeplumb_impact), the consumers of every change in two tiers, directly and potentially affected, the review view (a layer on the 2D and 3D project map, plus a rings mode; codeplumb review --open) and /codeplumb:review. Regression in docs/milestones/M5.md: a 17-file range on a private monorepo gives data and view in about 2 s with the index unchanged. |
| M6 Adapters | Done | TanStack Start, Hono, oRPC and Drizzle: page to API to table. Built: the adapter framework with TanStack Start server functions, Hono routes and middleware, oRPC procedures and Drizzle tables with the code that reads or writes them; client calls (oRPC clients and TanStack Query utils, Hono hc, server function calls, fetch/ky/axios at low confidence) matched to those endpoints; codeplumb trace / codeplumb_trace from a page down to its tables or a table up to its pages; and five explorer views: endpoints, page → API, API → tables, feature path and table usage, enabled only when the adapters found nodes. Regression in docs/milestones/M6.md: all 3 hand-traced page → endpoint → table chains on a private monorepo match, through trace and through the views, and each view answers in under 0.2 s on its first request. |
| M7 V2 groundwork | Done | One data dir, one store schema rebuilt when stale, repo name in stable IDs, byte-stable review JSON, the pinned evaluation corpus and its clone script. 12 of 12 checks pass. init, the explorer's /api/meta and init --estimate report the same file, edge and function-like counts. See docs/milestones/M7.md. |
| M8 Any TypeScript project | Done | Built: packages linked only by tsconfig project references become workspaces when no workspace tool is found; a repo with several package.json files and no workspace tool gets one workspace per package (built-in excludes and git-ignored paths skipped); imports through Vite or webpack aliases resolve to the right file (the config is read from its syntax, never run, and an alias that cannot be read that way leaves its imports unresolved with the reason alias_not_static); imports through a tsconfig that a workspace package provides resolve before the repo's dependencies are installed. Cut from the plan: a 10,000-file repo ready in about a minute, and the measured report, so M8 is not measured. |
| M9 Recipes | In progress | Routes, endpoints, tables and their reads and writes from a recipe the index applies on every run. Built: the recipe file .codeplumb/recipe.json (rules written as ast-grep patterns for TypeScript and for Go, a few generic helpers for mounts and base paths, constants, factory functions, router arguments and TanStack Router file routes), codeplumb recipe check. Go rules describe endpoints on a router (the standard library mux, chi, gin and the like are written in the recipe, never in the engine), tables, and the Go functions that read and write them, with the same emit kinds as the TypeScript rules. Data access works for any ORM or raw SQL through recipes: table, read and write rules, regex rules over schema files, SQL found in strings, template literals and .sql files, and recipe-stated model names and method lists; a table named only at run time is shown with a reason. Recipes are written by hand and checked with codeplumb recipe check --nodes. Agent-written recipes were dropped, and their spikes were removed in #416. The built-in Hono, TanStack Router and Drizzle adapters stay, and recipes add to them. |
| M10 Call linking in one repo | Done | A fetch, ky or axios call links to the handler in the same repo by method and path. Built: calls on axios.create, ky.create and ky.extend instances and on the default axios with axios.defaults.baseURL, followed through imports; client wrappers, inferred from a parameter that supplies the path or the method, or listed in the recipe as clientWrappers; URLs built from constants, enums, as const objects, ??, concatenation, new URL and both branches of a conditional. A call that could reach several endpoints is an ambiguous gap with its candidates, never a link. A call whose URL starts with an environment variable stays a dynamic_url gap: the value is not in the repo. |
| M11 Multirepo workspaces | Done | Built: a codeplumb-workspace.json that lists related repos by local path, found by walking up from a repo (or given with --workspace on init, index, heal and map); one init indexes all of them into one index with a repo on every workspace and file, and workspace ids carry the repo. Search and the function index cover every repo. Duplicates (notes, advice, codeplumb_find_similar and the view) find matches in sibling repos. The project map groups by repo, hooks and heal work per repo, and a package a sibling repo publishes resolves to its source. |
| Language packs (Java, Python, C#, Rust) | Done with misses | Built: Java, Python, C# and Rust are language packs read by the same engine as Go, with no compiler or interpreter installed (see Languages): symbols, imports, workspaces from the manifests, and call edges at level 2 (declared types) for all four, plus level 3 (flow, low confidence only) for Python. Measured for Java and Python only, against SCIP truth on two public repos each (docs/packs-proof.md); neither meets its bar. Java: mybatis-3 meets every bar, jackson-databind misses call recall (83.79% against 85%), and high-confidence precision is above 99% on both. Python: both precision bars are met on django and prefect, call recall is 65.02% and 66.60% against 70%, and symbol recall is below 97% mostly because definitions nested in function bodies are not symbols. C# and Rust are not measured against a compiler-backed truth; a call has no edge where the receiver's type is not known. |
| Clojure | Done | Built: Clojure, ClojureScript and .cljc files are indexed by a module of their own (a hand-written reader, no grammar, no JVM): symbols from every defining form, imports from the ns form, workspaces from project.clj, deps.edn, shadow-cljs.edn and bb.edn, and level 1 call edges by namespace and name. Measured against clj-kondo, not SCIP, with no bar set (docs/packs-proof.md): on ring, clojure-lsp and status-mobile, symbol precision and recall are 100%, call precision is 99.96% to 100% and call recall 98.55% to 100%. re-frame registrations, keyword dispatch and Java interop are not covered. |
| Precise mode | Done | Built: codeplumb index --scip <file> or precise.scip in the config reads a SCIP index you made with your own indexer and takes the call, render, hook and type edges of the files it covers from it, at high confidence. Opt-in; CodePlumb never runs an indexer. A file changed after the index keeps its inferred edges. |
| M12 Go backends | Done with misses | Go modules index (symbols, callers, descriptions and duplicates). Built: every go.mod is a workspace and every top-level function, method, struct, interface (and its methods), type, const and var of its .go files is a symbol marked lang: go, parsed without a Go toolchain; vendor/, testdata/ and dot folders are skipped. Callers work: calls between functions, methods and interface methods, struct embedding (extends) and interface satisfaction by method names (implements, low confidence) come from syntax and local type inference, so the caller graph, codeplumb_impact and the review blast radius cover Go. Go functions get descriptions from the describer (the fact sheet names the language) and are found by search by what they do. Go duplicate warnings: end-of-turn notes, pre-commit findings, codeplumb_find_similar and the Duplicates view compare Go functions with Go functions only (never with TypeScript), at the TypeScript thresholds, with Go import advice (import "<module>/<dir>"); a committed Go seeded set finds 10 of 10 cases (3 of 3 misleading-name). Regression in docs/milestones/M12.md: on caddy and hugo every symbol kind scores 100% precision and recall and call precision is 100%; 6 of 7 criteria met. Measured before the resolver moved into the engine; the current Go pack is not measured. Missed: the worst of three describer runs on the fixture (failed 1 against a bar of 0, top-5 6 of 10 against a bar of 8; claude-haiku-5-5); the Go init functions are described in all three runs. |
| M13 Cross-repo call linking | Done | In a workspace of several repos, a call whose URL is known statically links to the endpoint of another repo that serves it, and trace goes from a page in one repo to the handler and tables in another (and from a table up to the pages), each step led by its repo; the Feature path view labels its nodes with their repos. A path that two other repos both serve is an undecided match. |
| M14 Go frameworks and data access | Cut | Built: hand labels for the endpoints and tables of four held-out Go repos (one each for chi, gin, net/http and sqlc) in evals/oss/labels/, so a Go score can be read on code that was not used for tuning. Cut from the plan: built-in Go endpoints for net/http, chi, gin, echo and fiber, Go tables from database/sql, sqlx, sqlc, GORM and ent, recognizing a Go framework and writing its recipe, and the measured report. Go endpoints and tables come from recipes written by hand (see M9). |
| M15 V2 release | In progress | Remaining: the V2 release and a README that shows what it does (#233). Cut from the plan: measuring call linking on public full-stack repos it has not seen, and tracing a TypeScript page to the Go handler and tables that serve it in another repo. |
| M16 Duplicates report and PR comment | Done | Built: codeplumb duplicates (ranked groups, --json, --since, --workspace), the release tarball a runner installs with one command, and the GitHub Action that posts one comment per pull request with its blast radius and the duplicates it adds, updated in place on each push (see "Pull request comment"). |
| M17 Curation overlay | Done | Rename, hide and group on the map, saved views that survive re-indexing, hand-picked entries that follow a function through a file move or rename, a warning when an edit crosses a group boundary, and feature slices built from groups. Names, hidden parts, groups, saved views and "not a duplicate" decisions live in overlay.db beside the index, which a rebuild leaves byte-identical. Regression in docs/milestones/M17.md: the overlay spec, the unit tests, the five Verify scripts and the whole explorer suite pass. On formbricks@b52ebf8 99.90% of 967 hand-picked entries survive 500 commits with re-attaching by exactHash, and 100 replayed commits gave no boundary crossing (groups drawn along each package's dependencies). Hook time passes since #360: PostToolUse took about 2.1 to 2.4 s per edit on that 6,033-file repo before and takes about 0.9 s now (Stop 0.2 to 0.3 s), against the 1,500 ms budget. A function renamed in place re-attaches since #349. |
| M18 Deeper blast radius | Done | Built: the blast radius goes on past three calls in a third ranked tier, reachable (hop 4 and later, ranked by hop, path confidence and fan-in, capped per hop); a hub (a node with a fan-in above 608, the threshold from the spike in docs/spikes/blast-depth.md) counts its consumers in the potential and reachable tiers as one entry, while the totals still count each one; codeplumb review, codeplumb_impact and the PR comment show the reachable count and the hubs; the review view's rings mode draws the reachable tier as an outer ring whose hubs expand on click. The spike missed its bar for the walk as first planned (one store query per node); the walk that shipped reads the consumer edges with one query, which stayed under 2 s in the spike (median 633 ms). The measured report was cut, so M18 is not measured. |
| M19 Gate-aware blast radius | Cut | Nothing was built. The spike, consumer edges that record the condition they sit behind, the gated tier in review output and the view, and the measured report were all cut from the plan. |
| M20 Plan to actual | Cut | Nothing was built. The spike, a proposed area and radius from a committed plan, confirming it on the map, saving the estimate, a note when an edit leaves the planned area, estimate against actual in review and the PR comment, and the measured report were all cut from the plan. |
| Team boundary check | Done | Built: a team can set a repository's boundary mode to check, and then the Action's job fails when a pull request crosses a team boundary (the comment is posted first and says Boundary check: failed; the job summary lists the crossings), so branch protection can require it. The default stays warn, team-boundary-check: off keeps one workflow on warn, and an unreachable server, a fork or a missing team value never fails a pull request. Hooks and commits never block; the end-of-turn note ends Required check in CI. on a repository set to check. See action/README.md. |
| Session change sets | Done | Built: with team.upload.working turned on for a machine (codeplumb config set team.upload.working true, off by default, never committed), each agent session's MCP server uploads what the session has changed but not pushed as a change set (cs:session:<repo>:<12 random hex characters>), at most once a minute and only when it changed, and closes it when the session ends. It needs a linked team, codeplumb team login and a server that speaks protocol version 3, and sends what a branch change set sends: names, paths, hops, a branch name, a commit and times, never file text. No hook uploads, and a failed upload never slows or fails a tool. The Team layer shows them under its Sessions filter (see Team layer), with the owner, branch, changed-node count and how long ago the session last updated. |
| Team collisions | Done | Built: the Team layer marks open changes that step on each other, computed on your machine from the team cache and never on a server. Each colliding row carries a tier badge (direct when both change a node, potential when one changes a node the other's change reaches within three calls, reachable further out; via hub when only a collapsed hub links them) with the other change's branch beside it, and a pin with a warning icon and a count sits on the first changed tile of each side. Selecting a change opens a Collisions section first in the panel (owner and branch of the other change, up to three shared node names, No collisions with other open changes when none); a row selects the other change. It warns and never blocks, and the data is as of the last pull. |
With the plugin installed, three Claude Code hooks run on their own. After Claude writes or edits a source file of an indexed language, a package.json, a tsconfig or pnpm-workspace.yaml (Write, Edit, MultiEdit), PostToolUse records the file and re-indexes a source file; it says nothing yet. When Claude finishes its turn, Stop re-indexes everything the turn touched, checks it once, and double-checks each finding against the files on disk: if a new or changed function looks like an existing one (exact or near copy, or a stored code vector match) that is still there, or the turn added an import that no package.json declares, it hands Claude one short note (at most 600 characters) with the file, the existing function and what to do, for example Import it: import { slugify } from './slug'. Otherwise it says nothing. If you have grouped parts of the code in the explorer and a group lists the groups it may use, an edit that adds an import or a call from that group into a group it does not list adds one more line to the same note (CodePlumb: totalDue (src/orders/invoice.ts:3) in group Orders uses formatPrice (src/catalog/price.ts:1) in group Catalog, which Orders does not list. Warn only.); it only warns, and a group with no list has no boundary. Checking at the end of the turn means that moving a function to a new file, or adding an import before its dependency, does not raise an alert halfway. At the start of a session, SessionStart brings the index up to date (it never rebuilds an index that an update made stale; the next non-hook command does, see docs/INSTALL.md) and prints one line only when the repo is not indexed or 100 or more functions still await descriptions. The hooks stop after 1.5 seconds without output, never block an edit or a session, make no model calls, and do nothing inside a describer's own run. The git pre-commit hook prints the same findings, boundary warnings included, to stderr. See docs/INSTALL.md for how to check them in a session.
plugin/dist/mcp.js is a stdio MCP server named codeplumb (it is built by pnpm build; the plugin package starts it for Claude Code). Before every tool call it brings the index up to date: it runs heal only when HEAD has moved, then refreshes the files you have edited since. It writes nothing but protocol messages to stdout, and every answer is one JSON block of at most 4,000 characters (lists are cut and the answer says "truncated": true). The one exception is codeplumb_claim_batch, which only background describer agents call and which returns at most 10 functions (up to 20,000 characters). A describer's run ends after 15 claims, well before the subagent turn limit, and /codeplumb:init and /codeplumb:sync then start a fresh describer with the same worker id, so a large backlog finishes without manual restarts.
There are eleven tools today. The first two are for background describer agents and do not read or search the graph; the other nine look things up, check the impact of a change, trace a page to its tables, open the explorer or keep overviews.
| Tool | Input | What it does |
|---|---|---|
codeplumb_claim_batch |
{ worker_id?, size <= 10 } |
Claims functions that need a description and returns { worker_id, batch_id, items }, one fact sheet per function. Without a worker_id the server makes one up and returns it. A batch the worker has not submitted comes back first, with the same batch_id. A claim expires after 10 minutes. An empty answer says why in stop: backlog_empty, not_indexed (this data dir has no index for the repo; run /codeplumb:init) or run_limit (the describer's run is over after 15 claims, so it hands back before its turn limit and the skill starts a fresh one with the same id). |
codeplumb_submit_descriptions |
{ batch_id, results: [{ content_key, description }] } |
Checks each description, stores the good ones and returns { accepted, rejected, fallbacks }. Each rejection names the rule that fired and a fixed rewrite instruction for it (fix), never the rejected text. A rejected function stays in the batch while resubmit is true, so a rewritten description can be submitted again with the same batch_id. After 2 failures it is set aside as failed (codeplumb backlog --failed); a function rejected twice only for wording (shape or identifier) gets a third try, and if that fails too the server stores a plain description that names nothing, only the kind, the number of parameters and the number of other functions called, marked "(generated without a model)". The extra try goes only to clean wording mistakes: a broad check of every submitted value withholds it at the first sign of an order, a claim, an approval word, a modal, an addressee, markup, a secret or an injection pattern. A description that imitates the fallback marker is rejected. |
codeplumb_find_similar |
{ query?, code?, kind?, lang?, workspace?, caller_path?, limit? <= 10 } |
Call before writing a new helper. Give a one-sentence query, a draft code, or both. Returns { matches: [{ id, name, kind, lang, path, line, signature, import_path, tier, score, untrusted_description, described_by?, advice: { situation, action, inline } }], notes? }, best first (tiers exact, near, code_vector, semantic). advice.inline: true means import it as is. Without description vectors it says so in notes and uses code and keyword matches only. |
codeplumb_search |
{ query, kind?, lang?, workspace?, repo?, exported?, limit? <= 50 } |
Hybrid keyword and meaning search. Returns { hits: [{ id, repo, name, kind, lang, path, line, signature, score, untrusted_description, described_by? }] }, best first. described_by says who wrote a description: model, template or fallback (CodePlumb, without a model). Meaning search runs only when the embedding model is already cached; otherwise it is keywords only. |
codeplumb_browse |
{ target } |
One level below a workspace id, directory or file (with several repos, . lists the repos and repo:<name> that repo's workspaces): { items: [{ id, name, kind, exported, path, line, count, untrusted_description, described_by? }], catalog_path }. Directories and files carry their function counts. catalog_path is a markdown file in the data directory to Read when 4,000 characters are not enough. |
codeplumb_node |
{ target } |
A symbol or file by id, path:line or path: { node, untrusted_description, described_by?, signature, fan_in, fan_out, neighbors, more? }. At most 20 neighbors per edge kind; more counts the rest. |
codeplumb_open_view |
{ view, focus?, saved_view?, filters? } |
Starts the explorer in the background if it is not running (within 3 seconds) and returns { url }, a local link with an access token for the user to open. The review view takes filters: { range: "<base>...<head>" }; the feature path takes a route or endpoint as focus, the table usage a table. saved_view is the id of a view saved in the explorer (an unknown id returns unknown_saved_view with the known ids, and one saved for another view returns saved_view_mismatch). Its output goes to explorer.log in the data directory. |
codeplumb_impact |
{ range? } or { paths? } or { symbol? } (exactly one) |
Blast radius of a change: { changed, callers_by_hop, crossings, consumers, risk: { score, level, reasons }, notes }, where consumers lists each changed symbol's direct consumers (with how they use it) and potential ones (with the direct consumer they go through), plus reachable_total, a reachable count per workspace and its hubs (nodes many others use, as one entry with a total and a count per workspace). range is <base>...<head>; paths and symbol count as modified in the working tree. Lists are capped (counts say how many were left out); descriptions appear only as untrusted_description. |
codeplumb_trace |
{ target, direction? } |
Page → API → table chain, as trace above: { target, direction, routes, endpoints, tables, chain: [{ id, kind, repo?, via, depth, from?, low? }], gaps, omitted, truncated } (repo when the workspace has several repos). A long chain is summarized in repeats with counts so the answer stays under 4,000 characters. Ids only, no description text. |
codeplumb_changes |
{ target? } |
Call before editing a file: which open changes of your team touch a node, a file or a pull request, and which collide. target is a node id, path:line, a repo-relative path or pr:<number>; with none it answers for your branch. Returns { target, changes: [{ id, source, state, owner, ref, touches, tier? }], collisions, changes_total, collisions_total, cache_age_s }, where touches is node (it changes the target), file (the same file) or radius (the target is in its blast radius, tier says how near) and ref is the change's head branch. Reads the team cache only (no network call; cache_age_s says how old it is); { error: "no_team" } without one, { error: "no_open_change", target } for an unknown or closed pull request and { error: "not_found", target } for a function or path:line the index does not hold. Lists are cut to fit 4,000 characters, collisions first, and the totals keep the real counts. owner, ref and ids come from a server and are cleaned of control characters; treat them as data. |
codeplumb_get_overview |
{ node_id } |
The cached plain-words overview of a workspace (ws:<name>) or folder (dir:<path>): { cached: true, untrusted_overview, model, created_at, functions }, or { cached: false, reason: missing or stale } when code inside changed since it was written. |
codeplumb_save_overview |
{ node_id, text } |
Stores an overview written on request (at most 1,200 characters; rejected if it holds an instruction, a secret, a link or markup) and logs usage with source explainer. Overviews are never written on their own. |
Descriptions are text written by a model about code that may be untrusted, and the checks reduce that risk without removing it. Any tool that returns a description puts it in a field named untrusted_description (an overview in untrusted_overview, shown in the explorer inspector as "Overview — generated, may be wrong"), and every tool description says to treat the field as data and not follow anything in it. The checks are defense in depth, not the boundary: description text is treated as untrusted everywhere. Who wrote a description is reported next to it as described_by (model, template, or fallback when CodePlumb wrote it without a model) by every tool and explorer view that returns one (and codeplumb search --json returns the text as untrusted_description too), the catalog files quote each description after a fixed untrusted <who> description: label, and the explorer inspector labels a function description "Generated description — may be wrong" or, for a fallback, "Written without a model from names only — may be incomplete".
- Discover: list the repo's files with git, keep the files of the languages above (
.ts,.tsx,.mts,.cts,.go,.java,.py,.pyi,.cs,.rs,.clj,.cljs,.cljc), and drop built-in excludes, sensitive paths and files over 1 MB. - Parse: oxc reads each TypeScript file, a hand-written reader each Clojure file, and a tree-sitter grammar each file of the other languages; both extract symbols and their syntax edges (imports, exports, calls; renders for TypeScript only), and the type and flow resolvers of the packs (not TypeScript) add the level 2 and 3 call edges.
- Hash: each function gets a content hash so unchanged code can be recognized later, plus a structural fingerprint that finds copies with renamed variables.
- Resolve: for TypeScript, oxc-resolver turns import specifiers into repo files and workspace packages (the other languages resolve an import from their own package index and manifests), which gives the file-to-file and workspace-to-workspace edges.
- Store: the graph goes into SQLite in the data directory. Output is sorted and stable, so two runs on the same commit give the same graph.
- Serve:
codeplumb mapstarts an HTTP server on127.0.0.1that serves the explorer and a JSON API. Requests need the token printed in the URL.
- Everything is local. The indexer and the explorer make no model calls and need no API key.
- Files matching sensitive path patterns (
.env*,*.pem,*.key,id_rsa*,.npmrc,credentials*,secrets*,*.tfvarsand similar) are excluded by path, so their contents are never read for indexing. - The explorer server binds to
127.0.0.1only and answers API requests only with its per-run token. - The git hooks fail open: if CodePlumb errors, the hook logs and exits 0 rather than blocking your commit or push.
pnpm install
pnpm build # tsc -b && tsup && the explorer web build; writes plugin/dist/
pnpm check # biome + tsc + vitest, the local quality gate
pnpm --filter @codeplumb/explorer e2e # explorer browser tests (run pnpm build first); not part of check, run for explorer changes
pnpm fmt # apply Biome fixes
pnpm release patch # bump every version file, write CHANGELOG.md, commit and tag v<version>, build and pack dist/codeplumb-<version>.tgz (never pushes or uploads)
pnpm release:pack # only the pack step, for the current version (run pnpm build first)
pnpm perf # absolute-speed checks (duplicate engine on a 6,000-function index); not part of check, run before releases
pnpm eval:clone # clone the pinned public repos in evals/oss/repos.json at their commits into ~/Dev/codeplumb-oss (CODEPLUMB_OSS_DIR overrides)
pnpm readme:media # regenerate the screenshots in docs/readme/ (add --gif to redo the GIFs too)docs/SPEC.md holds the contracts and the repo layout. Contributions are welcome: start with CONTRIBUTING.md, which covers setup, the PR rules (from CLAUDE.md) and where to ask questions. Report security problems as described in SECURITY.md. The explorer's own notes, including how to run it against the mock API, are in packages/explorer/web/README.md. pnpm readme:media needs Chromium for Playwright (pnpm --filter @codeplumb/explorer exec playwright install chromium).
MIT.
The 3D map is just for fun and is not very useful for real work. The 2D views are the ones to use. It shows the repo as a landscape. Each workspace is a settlement, and its size sets the tier: village (cottages, fields, a windmill), town (houses inside a wall, a church), city (blocks, cranes) or metropolis (a core of towers with suburbs round it). Tiers are ranked within the repo, and a workspace with fewer than 20 functions is always a village. Every file is one building: taller means more functions, wider means more lines. Its shape comes from the tier and from what the file is (a dome for a test, a water tower for config, a shop awning for a component, a columned porch for a route). Roofs and kerbs take the workspace's color, as in the 2D map. Imports between workspaces are drawn as roads on the ground: a dirt lane for a few imports, a road, or a dual-carriageway highway for the heaviest. Vehicles and yellow arrows travel from the importing workspace to the imported one, and more imports means more traffic. The label on a road reads A → B N: A imports from B N times. The motion stops with "Pause life", stops when the tab is hidden, and is off when the system asks for reduced motion.
"Street level" puts the camera in one of the metropolis's avenues, and clicking a workspace in the list flies to it:
In the dark theme it is night, with lit windows and street lights:
The pnpm-turbo fixture: five small workspaces, so five villages.
The older renderings are still one click away. "City" stands the 2D layout up in 3D: each district is a workspace with its ground area as its function count, and arches between districts carry the import counts. "Islands" is the first 3D rendering.
At Files level of the city every file is a building and its height is its function count. The numbered flags mark the largest files, matching the list on the left.



























