Skip to content

JordanCoin/docmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ—บ๏ธ docmap

docmap โ€” instant documentation structure for LLMs and humans. Navigate massive docs without burning tokens.

License Go

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

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 and PDF files in directory
docmap README.md                  # Single markdown file deep dive
docmap report.pdf                 # Single PDF file structure
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 and PDF 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"

PDF Support

Map PDF documents by their outline (table of contents):

docmap report.pdf
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ report.pdf โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚             Sections: 7 | ~16.9k tokens            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ””โ”€โ”€ Claude Code-Powered Writing Editor (9.1k)
    โ”œโ”€โ”€ Introduction and Feasibility Overview (1.3k)
    โ”œโ”€โ”€ Key Features and Benefits (1.3k)
    โ”œโ”€โ”€ Designing the Interface (1.3k)
    โ””โ”€โ”€ Development Steps (1.3k)

Note: For PDFs with outlines/bookmarks, docmap shows the document structure with estimated token distribution. For PDFs without outlines, it falls back to page-by-page structure. Scanned/image-only PDFs will show a page count but no text content.

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

Sister Tool

docmap is the documentation companion to codemap:

codemap .   # code structure
docmap .    # doc structure

Together: complete spatial awareness of any repository.

How It Works

Markdown:

  1. Parse headings into a tree structure
  2. Estimate tokens per section (~4 chars/token)
  3. Extract key terms (bold text, inline code)
  4. Render as a navigable tree

PDF:

  1. Extract outline/bookmarks if available, otherwise use pages
  2. Parse text content from each page
  3. Estimate tokens (~4 chars/token)
  4. Render as a navigable tree

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

  1. Fork โ†’ 2. Branch โ†’ 3. Commit โ†’ 4. PR

See CONTRIBUTING.md for details.

License

MIT

About

Instant documentation structure for LLMs and humans. Sister tool to codemap.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors