Skip to main content

changemap: review large AI-generated pull requests as one clickable map

CI PyPI Python Licence

Code review for AI-written code. changemap turns a pull request of 1,000 to 15,000 lines into one offline HTML page. It opens on the parts of the change (when it has them), each a group of changed functions that belong together, and on the flows: the order things run in, before and now. Click down from a part to its modules, functions and per-function diffs, with Before, Now and What changed. For agents, --outline prints the change as flows in plain text and --flows draws the flows an agent wrote. It is a call-graph diff and PR visualisation made by a script. Your code is sent nowhere, no model is used, no tokens are spent, and it gives no verdict. It works on a repository you have not cloned: give it a pull request address. It also ships as an agent skill for Claude Code, Cursor, GitHub Copilot, Codex and any agent that reads Agent Skills.

Opening a package, a module and a function diff, switching to side by side, following a flow and flagging it in changemap

Install

macOS and Linux:

curl -LsSf https://raw.githubusercontent.com/ankitkpandey1/changemap/main/install.sh | sh

Any system, including Windows: uv tool install changemap, pipx install changemap or pip install changemap. To run it without installing: uvx changemap.

Needs Python 3.10 or newer and git. The GitHub command-line tool gh is optional: it is used for changemap pr NUMBER when present (without it changemap reads the pull request from origin), for filing feedback, and it makes the web-address mode a little more reliable. No Node, Java, compiler or Graphviz needed. changemap doctor checks git, Python, the language packages, gh and the cache folder.

Quick start

Works on a repository you have not cloned. Give it the address of a pull request:

changemap https://github.com/OWNER/REPO/pull/123 --open

It fetches only the two commits and the source files it reads, from the git server, into a small throwaway folder in your cache (deleted after 30 days unused). It works with a pull request or compare link on GitHub, a merge request on GitLab, and pull requests on Gitea, Forgejo, Codeberg, Azure DevOps and Bitbucket Cloud. As changemap --remote URL BASE HEAD it reads two commits on any git server. Private repositories work through your own git login.

Or, in a git repository, on the branch you want to understand:

changemap --open

That compares your branch with where it left the default branch, writes changemap.html, prints the path and opens it. Other ways in:

changemap BASE HEAD          # two commits or refs
changemap pr 123             # a pull request, from inside a clone (uses gh; without it, reads origin)
changemap --remote URL BASE HEAD   # two commits on any git server, no clone
changemap --watch --open     # the working tree, redrawn as files change

Want to see a page before you install anything? Download examples/litestar-fullstack-react.html and open it. It was made from a public pull request, litestar-fullstack #237 (MIT licence). It needs no server.

Why

An AI agent can write a 10,000-line pull request in an afternoon. Nobody reads it line by line, and a flat diff sorted by file name does not tell you what the change did to the system.

You want to know four things. What is the approach? What does it touch? How does a route or job run now, compared with before? Where could it break? changemap answers them from the code of the two commits, so you decide how deep to go: the picture in two minutes, more in ten, the exact lines only where you choose.

What you see

changemap on a real pull request: a package opened to a function, with its signatures and a side-by-side diff
  • Parts first. When the change has parts, the page opens on them and the flows through them. "By folder" switches to the code's own layout.
  • Reading order. Each function shows the calls it makes next, in the order they run, with full names; calls in the code are links, and a flow is marked in the code it runs through. "Read this part top to bottom" walks a part in order.
  • A map you open in place. Boxes are packages. Click one and it opens into its modules, a module into its functions and the calls between them. Neighbours keep their places.
  • Before, Now and What changed. One layout for all three, so you see what appears and what goes. New is green, deleted red, changed amber. Each colour also has its word.
  • A diff for one function. Click a function: its lines changed, with line numbers, plus tabs for Before, Now and the whole file. Click an arrow: the calls behind it.
  • How it runs. Routes, background tasks, event listeners and commands are listed as ordered steps, before and now, side by side. Choose one and its path is numbered on the map.
  • Noise folded away. Tests are left out. Functions where only comments changed are drawn grey and counted.
  • Flags. Flag any box, arrow or flow and write a note. Copy the notes or download them as Markdown to give to the author or to an AI agent. They stay in your browser.
  • Side by side. A function's diff shows in one column or side by side. Code that moved inside a function is tagged "moved to line N".
  • Keys. / searches, Esc returns to the whole picture, j and k go to the next or previous changed function, ? lists every key. Back and Forward work. Light and dark theme.

The flags export looks like this:

# Review notes: <title>

## 1. <what you flagged>

Where: `module · function`

Your note.

Plan before code

Ask your agent to plan first. changemap --plan plan.json --open draws the plan on today's code before any code is written. Planned boxes are dashed, and the page says on screen that a dashed line is a model's claim, not something computed.

The plan view: a plan drawn on today's code, with accept, reject and ask on each item

  • Accept, reject or ask a question on any box, function or arrow, with a note.

  • Turn on "Edit the plan" to rename, add, delete or link boxes. Undo and Redo work.

  • Press "Copy for the AI". The answers and your edits go back to the agent, which plans again.

  • When the code exists, compare the plan with what was built:

    changemap --plan plan.json BASE HEAD
    

    Each planned item shows as built, not found in the code, and the code shows what was built but never planned. For a pull request on a server, give its address instead of BASE HEAD.

The plan file format is in SPEC.md section 9. This repository's own plan is plan/plan.json.

Watch an agent work

changemap --watch --open

serves the working tree against its branch point on 127.0.0.1 and opens the page. As files change (uncommitted and untracked files included), the page redraws itself and marks what just changed. Pass a commit to compare against it: changemap --watch BASE. --port N picks the port. Stop it with Ctrl-C.

The watch view: the page shows Live, a file just changed, and the function that changed

Languages

One map for a repository that mixes languages. Python is read with the standard library; the others with tree-sitter grammars that install as ordinary wheels.

Language Files Reads Entry points it finds
Python .py functions, methods, imports (star imports too), constants, types from annotations and x = Class() HTTP route decorators with a path (FastAPI, Flask, Litestar style), task and shared_task, listener("name") event handlers, emit calls
TypeScript, JavaScript .ts .tsx .mts .cts .js .jsx .mjs .cjs functions, arrow functions, classes and constructors, React components, ES and CommonJS imports, export *, this calls Express, Fastify, Hono and Koa style routes (handlers in other files too), NestJS decorators (routes, @OnEvent, @Cron), Next.js app/**/route.ts and pages/api files, event handlers, cron.schedule, new Worker
Java .java classes, interfaces, enums, records, overloads, fields, constructors, parent classes and interfaces, classes of the same package Spring and JAX-RS routes, @EventListener, Kafka, Rabbit and JMS listeners, @Scheduled, @Async, main
Rust .rs functions, impl and trait methods, inline modules, use paths and glob imports, mod x; .route(...) registrations (handler in another file too), route attributes such as #[get("/x")], #[tauri::command], main
C, C++ .c .h .cc .cpp .cxx .hpp .hh .hxx .ipp .inl functions, classes, constructors and destructors, headers paired with sources, #include main, Get/Post style route registrations, callbacks given to signal, atexit and threads
HTML templates .html .htm .jinja .jinja2 .njk pages, {% block %} and macros, <template>, inline <script> functions forms, links, hx-* attributes and fetch calls that point at a route

Tests, generated and vendored code are left out. Details and limits for each language are in docs/languages.md. Files in other languages are ignored.

How honest the map is

A tool that draws a call graph has to say what it could not see. Every call falls in one of three groups, and the page shows all three totals:

  • Followed. The reader traced the name to one definition.
  • Matched by name. Only the method name matched. These arrows are drawn in a different line style and marked.
  • Not followed. Calls through values it cannot type, library calls that may run your code, and the like. They are counted and, per function, listed.

On the public example above: 848 calls followed, 9 matched by name, 1 not followed. They count the calls inside the functions the page draws; calls into libraries are not counted. The same three numbers are in the data file (reader). A missing arrow is not proof that no call exists. Read docs/how-it-works.md for how the map is computed and where it is blind.

Use it from an agent

Paste this into Claude Code, Cursor, Copilot, Codex or any coding agent:

Install the changemap tool with uv tool install changemap (if uv is missing, use pipx install changemap). Check it with changemap doctor. Then install its skill: copy the folder skills/changemap from https://github.com/ankitkpandey1/changemap into your skills directory (in Claude Code: /plugin marketplace add ankitkpandey1/changemap, then /plugin install changemap@changemap). Then read the skill and use it when I ask what a pull request does. To remove everything later: uv tool uninstall changemap and delete the skill folder.

  • Claude Code. /plugin marketplace add ankitkpandey1/changemap, then /plugin install changemap@changemap. The plugin adds the skill; install the command first.
  • Any other agent that reads Agent Skills. Copy skills/changemap into its skills directory.
  • The data file. changemap --json data.json writes what the page is drawn from. An agent can answer "what changed" and "what runs now" from it without reading the diff, which saves its tokens. The shape is in skills/changemap/references/data-file.md.
  • The outline and the flows file. changemap --outline - prints a short outline (at most about 60 KB, no code) of the change as flows an agent can read. The agent can name the parts in a flows file; changemap --flows FILE checks it against the code and draws it first (marked as written by the agent). See flows-file.md.

The skill never gives a verdict. It writes a model summary only when you ask, from the data file, and labels it as written by a model.

How it compares

  • CG-Diff (research paper, 2026): organises pull request review around call-graph subgraphs and tests it in a web interface. changemap is a tool you can run, with a page and flows.
  • calldiff (an npm package): a call-tree diff between git refs, built on tree-sitter, with terminal, JSON, YAML or Markdown output. It writes no page.
  • CodeBoarding: architecture diagrams of a whole project, with a model naming and describing the parts. It also has a pull request review that groups changes by component. changemap maps one change and uses no model.
  • Diffcore: groups changed files into flows, with an optional model step, and shows them in a desktop app or editor extension. changemap draws before and now on a call map, in one offline page.
  • Greptile: a model-based review service whose reviews can include generated diagrams. It runs in the cloud or on your own servers. changemap runs on your machine and uses no model.
  • difftastic and SemanticDiff: structural diffs of code. They show lines and syntax; changemap shows how the parts connect. Use them together.

FAQ

Does my code leave my machine? No. The command has no telemetry and sends your code nowhere. On a local repository it makes no network request at all. It talks to the network only when you ask: changemap URL and --remote fetch from the git server you name (and, for a pull request link, ask that site's web API once or twice for the title and the base, through gh if it is installed), changemap pr fetches from origin (through gh if installed), and feedback uses gh. The page makes no network request. Flags live in your browser's local storage.

Does it use an LLM? No. Words on the page are short sentences computed from the code. Run twice on the same two commits with the same changemap version, it wrote the same page and the same data file, byte for byte (checked with and without the cache).

Will it tell me the pull request is good or safe? No. It shows. It gives no verdict, finds no bugs and makes no style comments. It says plainly what it could not follow.

Does it work on a big repository? It reads both commits straight from git objects and never checks anything out. Every source file in the two commits is read, so the map can follow calls into code the change did not touch. Each distinct file is parsed once and cached by its content under your user cache folder, so a second run on nearby commits parses only what changed. --no-cache turns that off. A file that cannot be read (too large, minified, generated or broken) is skipped, counted, and the page says so.

My language is not in the table. Its files are ignored and the map shows the rest. A language is one adapter file: see CONTRIBUTING.md.

Does it change my repository? No. It reads commits and writes one HTML file (and, if you ask, one JSON file).

How do I remove it? uv tool uninstall changemap (or pipx uninstall changemap), and delete the skill folder or run claude plugin uninstall changemap@changemap.

Options

changemap [BASE HEAD] [--out FILE] [--open] [--json FILE] [--outline FILE] [--flows FILE]
          [--repo DIR] [--remote URL] [--plan FILE] [--no-cache] [--watch] [--port N] [--version]
changemap pr NUMBER       # uses gh; without it, reads origin
changemap URL             # a pull request or compare link, or a merge request, with no clone
changemap --remote URL BASE HEAD
changemap --plan FILE [BASE HEAD | URL]
changemap --watch [BASE]
changemap doctor          # checks git, Python, the language packages, gh and the cache folder
changemap feedback        # drafts an issue about changemap itself

changemap --help lists every option. Exit codes: 0 the page was written, 1 doctor found a problem, 2 a plain error (the message says what to do) or a command typed wrong.

Feedback

Problems with the tool (a wrong or missing arrow, a confusing screen, a crash, an idea) go to GitHub issues. changemap feedback drafts one. An agent drafts the issue, searches for duplicates, adds changemap doctor output, leaves out your code, paths, names and URLs, shows you the whole text, and files it only after you say yes. Security problems never go in a public issue: see SECURITY.md.

Contributing

Read CONTRIBUTING.md. What the tool must do is in REQUIREMENTS.md and how it is built in SPEC.md. Agents working on this repository read AGENTS.md.

Licence

Apache-2.0. See LICENSE.

Metadata

Release files for changemap 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for changemap 1.0.0
File Size Uploaded Provenance Actions
changemap-1.0.0.tar.gz 892.8 kB Without provenance Details for changemap-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for changemap 1.0.0
File Interpreter ABI Platform Actions
changemap-1.0.0-py3-none-any.whl Python 3 none any Details for changemap-1.0.0-py3-none-any.whl

Total release size: 1.7 MB

Release files / changemap-1.0.0.tar.gz

Download URL changemap-1.0.0.tar.gz
Size 892.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a575e2626ec310ad62e8cef34d6a3a77eae143e7c3f4bc313e96456911ddf59e
BLAKE2b-256 checksum
How to use checksums
eea39c331c27db75bef420e77bf63aa120e0c291315a0937f19f535111591a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Release files / changemap-1.0.0-py3-none-any.whl

Download URL changemap-1.0.0-py3-none-any.whl
Size 823.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c29ac6aefbb6e281424872ca60d955c43d33c12af93c667ab163f2e01256e8d
BLAKE2b-256 checksum
How to use checksums
399dc4c322fdc7577608bcea72ad9b41a3fd01c01d2f214157edbd8e38e7ddc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.1

Security for changemap 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page