User Input:
Guide for setup Codemap CLI
1. Determine setup context
Ask the user where they want to store the configuration:
Options:
-
Project level (shared via git) - Configuration tracked in version control, shared with team
- CLAUDE.md updates go to:
./CLAUDE.md - Hook settings go to:
./.claude/settings.json
- CLAUDE.md updates go to:
-
Project level (personal preferences) - Configuration stays local, not tracked in git
- CLAUDE.md updates go to:
./CLAUDE.local.md - Hook settings go to:
./.claude/settings.local.json - Verify these files are listed in
.gitignore, add them if not
- CLAUDE.md updates go to:
-
User level (global) - Configuration applies to all projects for this user
- CLAUDE.md updates go to:
~/.claude/CLAUDE.md - Hook settings go to:
~/.claude/settings.json
- CLAUDE.md updates go to:
Store the user's choice and use the appropriate paths in subsequent steps.
2. Check if Codemap is already installed
Check whether codemap is installed by running codemap -help.
If not installed, proceed with setup.
3. Load Codemap documentation
Read the following documentation to understand Codemap's capabilities:
- Load https://raw.githubusercontent.com/JordanCoin/codemap/refs/heads/main/README.md to understand what Codemap is and its capabilities
4. Guide user through installation
macOS/Linux (Homebrew)
Windows (Scoop)
5. Verify installation
After installation, verify codemap works:
6. Update CLAUDE.md file
Use the path determined in step 1. Once Codemap is successfully installed, update the appropriate CLAUDE.md file with the following content:
Options
Smart pattern matching - no quotes needed:
.png- any.pngfileFonts- any/Fonts/directory*Test*- glob pattern
Diff Mode
See what you're working on:
8. Test Codemap
Run a quick test to verify everything works:
9. Add hooks to settings file
-
Use the settings path determined in step 1. Create the settings file if it doesn't exist and add the following content:
if default branch is not
main, but insteadmaster(or something else) update content accordingly:- use
codemap hook session-start --ref=masterinstead of regularcodemap hook session-start - For rest of commands also add
--ref=masterflag.
- use
-
Ask user whether he want to add any other hooks and provide list of options with descriptions. Add hooks that he asks for.


