🗺️ docmap
docmap — instant documentation structure for LLMs and humans.
Navigate massive docs without burning tokens.

The Problem
Documentation files are everywhere — READMEs, design docs, changelogs, API references, PDFs. But:
- LLMs can't open large markdown files or PDFs (token limits)
- Humans have to open each file to see what's inside
- There's no "file tree" for documentation content
- And once you find a section, there's no way to say "show me the Python code block" or "find the warning callout"
The Solution
docmap .
╭──────────────────────── docs/ ────────────────────────╮
│ 22 files │ 645 sections │ ~109k tokens │
│ 18 callouts · 41 code blocks · 7 tables · 2 math │
│ 33 tasks (19 done) · 4 wiki · 6 embeds │
╰────────────────────────────────────────────────────────╯
├── README.md (3.8k, 18 §) · 14 code · 1 tables
├── docs/ARCHITECTURE.md (7.7k, 33 §) · 6 code · 3 callouts
├── docs/API.md (12.1k, 47 §) · 21 code · 4 tables
└── CHANGELOG.md (15.2k, 41 §) · 2 callouts
One command. Full inventory. No LLM needed.
Install the CLI
# macOS/Linux (cask — prebuilt binary, no CLT/compile step)
brew tap JordanCoin/tap && brew install docmap
# Prebuilt release archive (no local compile). Use `brew upgrade docmap` after new tags.
# Windows
scoop bucket add docmap https://github.com/JordanCoin/scoop-docmap
scoop install docmap
Other options: Releases | go install github.com/JordanCoin/docmap@latest
Hooks (recommended)
One command wires docmap into Claude Code and Codex so it fires without being asked:
docmap setup # detected agents; or --agent claude|codex|both, --global, --check
What then happens, with no prompt engineering:
- Session start:
📚 Docs: 26 md, 0 pdf · 222 sections · ~55.7k tokens, the 5 most recently committed docs, and the stale claim count (skipped if it would take over 1.5 s).
- After every Edit/Write:
📚 Docs mentioning cmd/hooks.go (9 sections): followed by up to 8 doc > section lines. Nothing is printed when no doc mentions the file.
- Before Read of a markdown file over 200 lines or any PDF: the section tree (max 60 lines, once per file per session) and
Read only the section you need: docmap <file> --expand "<title>".
Entries go in .claude/settings.local.json and .codex/hooks.json (--global for ~/.claude/settings.json, ~/.codex/hooks.json). Setup is idempotent and never touches other hooks.
MCP server
docmap mcp speaks stdio MCP so agents can call structured tools instead of shelling out and scraping ANSI.
docmap mcp
Ship-with-repo config (.mcp.json):
{
"mcpServers": {
"docmap": {
"command": "docmap",
"args": ["mcp"]
}
}
}
Tools (all return typed JSON): docmap__inventory, docmap__tree, docmap__brief, docmap__section, docmap__expand, docmap__find_by_type, docmap__at_line, docmap__since, docmap__stale, docmap__search, docmap__json, docmap__refs.
Claude Desktop / other clients — same stanza in ~/Library/Application Support/Claude/claude_desktop_config.json (or your client's MCP config). Requires docmap on PATH.
Install the Claude Code skill
docmap ships a Claude Code skill (SKILL.md) that teaches Claude when and how to use the CLI — the drill-downs, line lookups, search across notables, and --since git integration. Pick whichever install method fits your workflow.
Option A — Plugin marketplace (recommended)
Inside Claude Code, add this repo as a marketplace and install the plugin:
/plugin marketplace add JordanCoin/docmap
/plugin install docmap@docmap
That's it. Claude Code clones the repo, picks up .claude-plugin/marketplace.json, and installs the docmap plugin from plugins/docmap/. The skill becomes available as /docmap and Claude will auto-invoke it when you're working with markdown docs.
The plugin also ships the three hooks (hooks/hooks.json), so a marketplace install needs no docmap setup: session start, post-edit doc mentions and pre-read trees fire on their own as long as docmap is on PATH.
Without the plugin, one line in your global ~/.claude/CLAUDE.md gets every agent most of the way: Before Read on any .md over 200 lines, run docmap <file> and read only the section you need.
Update later with /plugin marketplace update.
Option B — Personal user skill
Drop the SKILL.md into your personal Claude skills folder so it's available across every project, no marketplace needed:
mkdir -p ~/.claude/skills/docmap
curl -o ~/.claude/skills/docmap/SKILL.md \
https://raw.githubusercontent.com/JordanCoin/docmap/main/plugins/docmap/skills/docmap/SKILL.md