What is in this repo, in under 4000 tokens.

repomap walks the repo, ranks files by inbound import refs, prints symbols inline, cuts at a token budget. Orient before you read or search.

$ go install github.com/AkashPriyadarshii/repomap/cmd/repomap@latest
repomap logo — emerald rm monogram
14 files
this repo, full map
13,149
tokens, full output
1 file
at default 4000 budget
0 deps
stdlib Go only

Live map

Real output from this repo, verified 2026-09-15. Toggle the budget.

$ repomap --budget 2000 . └── internal/ └── mapx/ └── walk.go 1 refs 2022 tokens [supportedLang, scoreFile, clamp, ...] … 12 files truncated, --full to see all 1 files, 2022 tokens

How it ranks

A file is important when other files import it. Score per file:

SignalWeightSource
Import in-degree (refs)0.45Go blocks, Python, JS/TS, Rust, Ruby
Symbol count0.25Regex, first 200 lines
Size0.15Bytes, log scale
Symbol density0.05Symbols per byte

Token estimate is bytes/4. Budget keeps top-N by score, always keeps rank 1.

Flags

FlagEffect
--budget NMax output tokens (default 4000, 0 = unlimited)
--fullAll files, no truncation (includes tests, vendor)
--jsonMachine-readable, same rank order
--indexSearchable HTML page, no server
-o FILEWrite to file
--no-gitignoreInclude ignored files (warning: huge)
$ repomap --json . | head -c 300

Architecture

cmd/repomap/main.go — flags, budget wiring, output routing internal/mapx/ walk.go — walk + parallel extract + ref index symbols.go — regex symbol patterns per language rank.go — Budget() truncation (keeps rank 1) render.go — tree / JSON / HTML renderers gitignore.go — stdlib .gitignore subset

The trilogy