RepoMap
Purpose
- •Use RepoMap outputs to locate relevant modules, entry points, and keywords in large repositories.
- •Provide a repeatable workflow for building/updating
.repomap/and querying it.
When To Use
- •Locate modules or entry files for a feature or bugfix.
- •Summarize repo structure or entry points.
- •Refresh RepoMap outputs before analysis.
Workflow
- •Confirm
.repomap/exists; if missing or stale, build/update.- •Build:
repomap build --out .repomap - •Update:
repomap update --out .repomap - •If the CLI is not installed, run
pnpm -r buildfirst and use:node packages/cli/dist/index.js build --out .repomap
- •Build:
- •Read
.repomap/summary.mdfor the high-level layout. - •Query candidates by keywords:
- •
repomap query "refresh token" --out .repomap - •Use
--format jsonwhen structured output is required.
- •
- •Inspect
.repomap/module_index.jsonand.repomap/entry_map.jsonto locate modules and entry files; join onpath. - •Broaden keywords or rerun
updateafter changes if results are empty. - •Report top modules with paths and entry files; include tokens and matches when returning JSON results.
Notes
- •Treat output paths as POSIX; resolve against repo root if needed.
- •Ignore output directories when rebuilding examples (use
--ignore "output/**"). - •Include ignored paths by using negate patterns (example:
--ignore '!node_modules/**').