Review a change on a map of your code
[Install] - [Quick start] - [Review] - [Map] - [Docs] - [Changelog]
A diff shows you lines. mapdiff shows you the functions and types that changed, where they sit in the codebase, and the code that uses them. Run it in a repository and it opens in your browser.
- The change as code, not lines. "This function's signature changed", "this type moved there", with before and after side by side.
- What it touches. Unchanged code that uses something you removed or renamed is marked. A line diff has no place for it.
- A sensible order. What is used comes before what uses it. One keypress per change.
- One command.
mapdiffin any git repository. There is nothing to set up.
Install
Pick one. Each installs the mapdiff command.
Homebrew
macOS and Linux.
brew install avgvi/tap/mapdiff
Shell installer
A prebuilt binary for macOS or Linux, arm64 or x86_64.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/avgvi/mapdiff/releases/latest/download/mapdiff-installer.sh | sh
Cargo
cargo install mapdiff
That builds from source. To download the release binary instead:
cargo binstall mapdiff
npm
npm install -g mapdiff-cli
The package is called mapdiff-cli on npm; the command it installs is still mapdiff.
Python tools
uv tool install mapdiff
With pipx it is pipx install mapdiff.
From source
With Rust and Node installed:
git clone https://github.com/avgvi/mapdiff && cd mapdiff
cd ui && npm ci && npm run build && cd .. # builds the page, which goes inside the binary
cargo install --path crates/mapdiff-cli # installs `mapdiff`
Quick start
In any git repository:
mapdiff # the map, with your uncommitted changes drawn on it
mapdiff main...HEAD # what this branch changed
mapdiff --commit HEAD # one commit
mapdiff --pr 123 # a GitHub pull request
Then press N to go to the first change, R when you have read it, and N again.
Reviewing a change
| On the map | Means |
|---|---|
| Green | Added |
| Amber | Modified |
| Purple | Moved, with a line from where it was |
| Red | Removed |
| Dashed border | Unchanged, but uses something that changed |
N and P step through the changes, and each one opens its before and after under the map. R marks it reviewed.
On a large change, Only what changed cuts the map down to it. One commit of ripgrep goes from 4,390 boxes to 7.
More in the review guide.
The map
Untick Changes and the map is a way to read a codebase, at four levels:
| Key | Level | Shows |
|---|---|---|
1 |
Architecture | Directories and the wires between them |
2 |
Package | Files |
3 |
Module | Types and functions |
4 |
Code | The text of every function |
Click a box to see who uses it and what it uses, with a path drawn to each.
Press T to trace it: its code in the middle, callers on the left, what it calls on the right.
Press / to find a function, type or file by a few letters. All the keys are in the docs.
Languages
Rust, Python, TypeScript and JavaScript.
References are found by name out of the box. mapdiff index runs the language's own indexer (rust-analyzer, scip-typescript, scip-python) to add methods called on a value. Tests are left off the map, and a changed test still shows in a review. More on languages.
In the terminal
What the page shows is also a command, most with --json:
mapdiff diff main...HEAD # the change, by function and type
mapdiff impact --commit HEAD # unchanged code that uses what the commit altered
mapdiff refs 'src/lib.rs::parse()' # what uses a function, and what it uses
The rest are in the command reference.
Development
.github/scripts/fetch-repos.sh # four pinned open-source repositories, used as test data
cargo test # Rust tests
cd ui && npm test # layout and viewer tests
| Path | Holds |
|---|---|
crates/ |
The mapdiff command: parsing, changes, the reference graph, the local server |
ui/ |
The page: React and TypeScript, with elkjs for layout |
website/ |
The docs site |
Licence
Metadata
Release files for mapdiff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| mapdiff-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for mapdiff-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| mapdiff-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for mapdiff-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| mapdiff-0.1.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for mapdiff-0.1.0-py3-none-macosx_11_0_arm64.whl |
| mapdiff-0.1.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for mapdiff-0.1.0-py3-none-macosx_10_12_x86_64.whl |
Total release size: 16.3 MB
Release files / mapdiff-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | mapdiff-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
de4a1375a41b45cb61bb35fbe4d461564b49bd077990222811d5d1f71c2f0796
|
|
BLAKE2b-256 checksum How to use checksums |
619fd40060606ce225ff7344aab4c060fd52e3af15621a9cb4ab55a09da6bea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / mapdiff-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | mapdiff-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b77ec916c204cdf34c4e4e407cad61be262ae1307d340421d04dd92948a39bbb
|
|
BLAKE2b-256 checksum How to use checksums |
9ae87023e090cf2099052ce79338d5490dcf0f88f50b441f357ad79cb5182c7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / mapdiff-0.1.0-py3-none-macosx_11_0_arm64.whl
| Download URL | mapdiff-0.1.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
962b1b16a6150b99a2faa1d0cb62e0fd3411c51c5a0c4a552b3e74c52204c017
|
|
BLAKE2b-256 checksum How to use checksums |
9d3ff31f93b6fe9b8bf4d8163cfb7af19bfe7598219d695319685a81dbae9c63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / mapdiff-0.1.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | mapdiff-0.1.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
aa154609f6d0d6f90706aa4a2b401df078c8d885a7d7b7a8ea2e03085f98a590
|
|
BLAKE2b-256 checksum How to use checksums |
bcecaafc405e9ae3b8ad425fac690b9acc982a06aa64921d1842af3b3f51e549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for mapdiff 0.1.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.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for mapdiff-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA 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.