by JordanCoin
a project brain for your AI. Give LLMs instant architectural context without burning tokens
# Add to your Claude Code skills
git clone https://github.com/JordanCoin/codemapcodemap — a project brain for your AI. Give LLMs instant architectural context without burning tokens.

# macOS/Linux
brew tap JordanCoin/tap && brew install codemap
# Windows
scoop bucket add codemap https://github.com/JordanCoin/scoop-codemap
scoop install codemap
Other options: Releases |
go install| Build from source
If you install codemap from a release tarball, also install ast-grep separately for --deps.
The tarball includes codemap and the bundled rules, but not the ast-grep executable.
Example for Alpine-based CI:
apk add --no-cache curl jq bash python3 py3-pip
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; elif [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi
CODEMAP_VERSION=$(curl -fsSL https://api.github.com/repos/JordanCoin/codemap/releases/latest | jq -r '.tag_name' | tr -d 'v')
curl -fsSL "https://github.com/JordanCoin/codemap/releases/download/v${CODEMAP_VERSION}/codemap_${CODEMAP_VERSION}_linux_${ARCH}.tar.gz" \
| tar xz -C /usr/local/bin/ codemap
python3 -m pip install --no-cache-dir ast-grep-cli
No comments yet. Be the first to share your thoughts!
If you want a self-contained archive for CI/CD, use the codemap-full release artifact instead.
It includes codemap, ast-grep, and sg in one archive so --deps works after extraction.
apk add --no-cache curl jq bash
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; elif [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi
CODEMAP_VERSION=$(curl -fsSL https://api.github.com/repos/JordanCoin/codemap/releases/latest | jq -r '.tag_name' | tr -d 'v')
curl -fsSL "https://github.com/JordanCoin/codemap/releases/download/v${CODEMAP_VERSION}/codemap-full_${CODEMAP_VERSION}_linux_${ARCH}.tar.gz" \
| tar xz -C /usr/local/bin/ codemap ast-grep sg
No repo clone is required for normal users. Run setup from your git repo root (not a subdirectory), or hooks may not resolve project context.
# install codemap first (package manager)
brew tap JordanCoin/tap && brew install codemap
# then run setup inside your project
cd /path/to/your/project
codemap setup
codemap setup is the default onboarding path and configures the pieces that make codemap most useful with Claude:
.codemap/config.json (if missing) with auto-detected language filters.claude/settings.local.json (project-local by default)Use global Claude settings instead of project-local settings:
codemap setup --global
Windows equivalent:
scoop bucket add codemap https://github.com/JordanCoin/scoop-codemap
scoop install codemap
cd C:\path\to\your\project
codemap setup
Optional helper scripts (mainly for contributors running from this repo):
./scripts/onboard.sh /path/to/your/project./scripts/onboard.ps1 -ProjectRoot C:\path\to\your\projectcodemap . # Fast tree/context view (respects .codemap/config.json)
codemap --diff # What changed vs main
codemap handoff . # Save layered handoff for cross-agent continuation
codemap --deps . # Dependency flow (requires ast-grep)
codemap skill list # Show available skills
codemap context # Universal JSON context for any AI tool
codemap mcp # Run Codemap MCP server on stdio
codemap plugin install # Install the Codemap Codex plugin
codemap serve # HTTP API for non-MCP integrations
codemap --only swift .
codemap --exclude .xcassets,Fonts,.png .
codemap --depth 2 .
codemap github.com/user/repo
| Flag | Description |
|------|-------------|
| --depth, -d <n> | Limit tree depth (0 = unlimited) |
| --only <exts> | Only show files with these extensions |
| --exclude <patterns> | Exclude files matching patterns |
| --diff | Show files changed vs main branch |
| --ref <branch> | Branch to compare against (with --diff) |
| --deps | Dependency flow mode |
| --importers <file> | Check who imports a file |
| --skyline | City skyline visualization |
| --animate | Animate the skyline (use with --skyline) |
| --json | Output JSON |
Note: Flags must come before the path/URL:
codemap --json github.com/user/repo
Smart pattern matching — no quotes needed:
.png → any .png fileFonts → any /Fonts/ directory*Test* → glob patternSee what you're working on:
codemap --diff
codemap --diff --ref develop
╭─────────────────────────── myproject ──────────────────────────╮
│ Changed: 4 files | +156 -23 lines vs main │
╰────────────────────────────────────────────────────────────────╯
├── api/
│ └── (new) auth.go ✎ handlers.go (+45 -12)
└── ✎ main.go (+29 -3)
⚠ handlers.go is used by 3 other files
See how your code connects:
codemap --deps .
╭──────────────────────────────────────────────────────────────╮
│ MyApp - Dependency Flow │
├──────────────────────────────────────────────────────────────┤
│ Go: chi, zap, testify │
╰──────────────────────────────────────────────────────────────╯
Backend ════════════════════════════════════════════════════
server ───▶ validate ───▶ rules, config
api ───▶ handlers, middleware
HUBS: config (12←), api (8←), utils (5←)
codemap --skyline --animate

Analyze any public GitHub or GitLab repo without cloning it yourself:
codemap github.com/anthropics/anthropic-cookbook
codemap https://github.com/user/repo
codemap gitlab.com/user/repo
Uses a shallow clone to a temp directory (fast, no history, auto-cleanup). If you already have the repo cloned locally, codemap will use your local copy instead.
18 languages for dependency analysis: Go, Python, JavaScript, TypeScript, Rust, Ruby, C, C++, Java, Swift, Kotlin, C#, PHP, Bash, Lua, Scala, Elixir, Solidity
Powered by ast-grep. Install via
brew install ast-grepfor--depsmode.
If you want a compact review bundle for another LLM, combine the three high-signal views:
codemap --json --diff --ref main .
codemap --json --deps --diff --ref main .
codemap --json --importers path/to/file .
For a reusable built-in command that emits either Markdown, text, or a single JSON object:
codemap blast-radius --ref main .
codemap blast-radius --json --ref main .
codemap blast-radius --text --ref main .
Hooks (Recommended) — Automatic context at session start, before/after edits, and more. → See docs/HOOKS.md
MCP Server — Deep integration with project analysis + handoff tools. → See docs/MCP.md
codemap now supports a shared handoff artifact so you can switch between agents (Claude, Codex, MCP clients) without re-briefing.
codemap handoff . # Build + save layered handoff artifacts
codemap handoff --latest . # Read latest saved artifact
codemap handoff --json . # Machine-readable handoff payload
codemap handoff --since 2h . # Limit timeline lookback window
codemap handoff --prefix . # Stable prefix layer only
codemap handoff --delta . # Recent delta layer only
codemap handoff --detail a.go . # Lazy-load full detail for one changed file
codemap handoff --no-save . # Build/read without writing artifacts
What it captures (layered for cache reuse):
prefix (stable): hub summaries + repo file-count contextdelta (dynamic): changed file stubs (path, hash, status, size), risk files, recent events, next stepsprefix_hash, delta_hash, combined_hashArtifacts written:
.codemap/handoff.latest.json (full artifact).codemap/handoff.prefix.json (stable prefix snapshot).codemap/handoff.delta.json (dynamic delta snapshot).codemap/handoff.metrics.log (append-only metrics stream, one JSON line per save)Save defaults:
--no-save to make generation read-only.save=true to persist artifacts.Compatibility note:
changed_files, risk_files, etc.) are still included for compatibility and will be removed in a future schema version after migration.Why this matters:
--detail / file=...)Hook integration:
session-stop writes .codemap/handoff.latest.jsonsession-start shows a compact recent handoff summary (24h freshness window)CLAUDE.md — Add to your project root to teach Claude when to run codemap:
cp /path/to/codemap/CLAUDE.md your-project/
Set p