codemap is a code analysis tool designed to generate a compact, structured "brain map" of your codebase for large language models (LLMs) to understand instantly. By providing architectural context without burning tokens, codemap helps developers and AI systems work more efficiently together.
Key Features:
Generates an architectural overview of your codebase for LLMs in one command.
Supports multiple modes for analysis:
Diff Mode: Visualizes changes in the codebase compared to a reference branch.
Dependency Flow: Maps how different parts of the codebase interact and depend on each other.
Skyline Mode: Provides a visual representation of the project's structure as a city skyline.
Works with over 18 programming languages, including Go, Python, JavaScript, TypeScript, Rust, and more.
Audience & Benefit:
Ideal for developers, AI researchers, and teams leveraging LLMs to analyze or generate code. By providing instant context, codemap saves time, reduces token usage, and enhances collaboration between humans and AI systems. It is particularly beneficial for projects where understanding the codebase's structure is critical for efficient development and integration with AI tools.
codemap can be installed via winget on Windows, making it accessible across different operating systems.
README
codemap šŗļø
> codemap ā a project brain for your AI.
> Give LLMs instant architectural context without burning tokens.
Install
# 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
Recommended Setup (Hooks + Daemon + Config)
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:
creates .codemap/config.json (if missing) with auto-detected language filters
installs codemap hooks into .claude/settings.local.json (project-local by default)
hooks automatically start/read daemon state on session start
Use global Claude settings instead of project-local settings:
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.
.codemap/handoff.metrics.log (append-only metrics stream, one JSON line per save)
Save defaults:
CLI saves by default; use --no-save to make generation read-only.
MCP does not save by default; set save=true to persist artifacts.
Compatibility note:
legacy top-level fields (changed_files, risk_files, etc.) are still included for compatibility and will be removed in a future schema version after migration.
Why this matters:
default transport is compact stubs (low context cost)
full per-file context is lazy-loaded only when needed (--detail / file=...)
output is deterministic and budgeted to reduce context churn across agent turns
Hook integration:
session-stop writes .codemap/handoff.latest.json
session-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/
Project Config
Set per-project defaults in .codemap/config.json so you don't need to pass --only/--exclude/--depth every time. Hooks also respect this config.
codemap config init # Auto-detect top extensions, write config
codemap config show # Display current config