docmap

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 7 Imported by: 0

README ยถ

๐Ÿ—บ๏ธ 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. 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

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

  1. Parse markdown 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

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

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

See CONTRIBUTING.md for details.

License

MIT

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL