๐บ๏ธ 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. But:
- LLMs can't open large markdown files (token limits)
- Humans have to open each file to see what's inside
- There's no "file tree" for documentation content
The Solution
docmap .
โญโโโโโโโโโโโโโโโโโโโโโโโ docs/ โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ 22 files | 645 sections | ~109.2k tokens โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โโโ README.md (3.8k)
โ โโ Project Overview
โ โโ Installation
โ โโ Quick Start
โโโ docs/ARCHITECTURE.md (7.7k)
โ โโ System Design
โ โโ Component Details
โ โโ Data Flow
โโโ docs/API.md (12.1k)
โ โโ Authentication
โ โโ Endpoints
โ โโ Error Handling
โโโ CHANGELOG.md (15.2k)
โโ v2.0.0
โโ v1.5.0
โโ v1.0.0
One command. Instant structure. No LLM needed.
Install
# macOS/Linux
brew tap JordanCoin/tap && brew install docmap
# Windows
scoop bucket add docmap https://github.com/JordanCoin/scoop-docmap
scoop install docmap
Other options: Releases | go install github.com/JordanCoin/docmap@latest
Usage
docmap . # All markdown files in directory
docmap README.md # Single file deep dive
docmap docs/ # Specific folder
docmap README.md --section "API" # Filter to section
docmap README.md --expand "API" # Show section content
docmap . --refs # Show cross-references between docs
Output
Directory Mode
Map all markdown files in a project:
docmap /path/to/project
Shows each file with token count and top-level sections.
Single File Mode
Deep dive into one document:
docmap docs/ARCHITECTURE.md
โญโโโโโโโโโโโโโโโโโโ ARCHITECTURE.md โโโโโโโโโโโโโโโโโโโฎ
โ 33 sections | ~7.7k tokens โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โโโ System Design (2.1k)
โ โโโ Vision
โ โโโ Core Principles
โ โ โโ "Headless-first", "Plan before execute"
โ โโโ Architecture Overview
โโโ Components (3.2k)
โ โโโ Scheduler
โ โโโ Orchestrator
โ โโโ Memory (RAG)
โโโ Security (1.4k)
โโ "SSH keys only", "Human gates"
Section Filter
Zoom into a specific section:
docmap docs/API.md --section "Authentication"
Expand Section
See the actual content:
docmap docs/API.md --expand "Authentication"
References Mode
See how docs link to each other (like codemap --deps):
docmap . --refs
โญโโโโโโโโโโโโโโโโโโโโโโโ project/ โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ References: 53 links between docs โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
HUBS: docs/architecture.md (5โ), docs/api.md (3โ)
Reference Flow:
README.md
โโโโถ docs/architecture.md
โโโโถ docs/api.md
โโโโถ CHANGELOG.md
docs/architecture.md
โโโโถ docs/components.md
โโโโถ docs/data-flow.md
Why docmap?
| Before |
After |
| "Read this 100k token doc" |
"Here's the structure, ask for what you need" |
| Open 20 files to find something |
See all sections at a glance |
| Scroll through giant CHANGELOGs |
Jump to the version you need |
| Guess what's in each doc |
Token counts show what's meaty |
docmap is the documentation companion to codemap:
codemap . # code structure
docmap . # doc structure
Together: complete spatial awareness of any repository.
How It Works
- Parse markdown headings into a tree structure
- Estimate tokens per section (~4 chars/token)
- Extract key terms (bold text, inline code)
- Render as a navigable tree
No external dependencies. No API calls. Just fast, local parsing.
Roadmap
Ideas for future versions:
- Depth control (
--depth 2) โ Limit heading levels shown, e.g., only h1/h2
- Token budget mode (
--budget 4000) โ Auto-select sections that fit within a token limit
- JSON output (
--json) โ Machine-readable output for piping and parsing
- Section previews โ Show first ~100 tokens of each section inline
PRs welcome for any of these!
Contributing
- Fork โ 2. Branch โ 3. Commit โ 4. PR
See CONTRIBUTING.md for details.
License
MIT