Run codemap from the git repository root. Hooks and context files resolve from the current working directory, so running from a subdirectory can break hook context.
cd "$(git rev-parse --show-toplevel)"codemap expects these at repo root:
.git/.codemap/.claude/settings.local.json(project-local hooks)
codemap . # Project structure
codemap --deps # How files connect
codemap --diff # What changed vs main
codemap --diff --ref <branch> # Changes vs specific branchBEFORE starting any task, run codemap . first.
ALWAYS run codemap --deps when:
- User asks how something works
- Refactoring or moving code
- Tracing imports or dependencies
ALWAYS run codemap --diff when:
- Reviewing or summarizing changes
- Before committing code
- User asks what changed
- Use
--ref <branch>when comparing against something other than main