Cross-platform convenience wrapper for the codebase-memory-mcp index_repository command.
Supports Linux, macOS, and Windows (PowerShell).
cbm makes it easy to index a local git repository into the codebase-memory-mcp knowledge graph, with sensible defaults and a friendlier CLI.
It also includes a setup command that configures local AI editors (Claude Code, Cursor, Codex CLI, Cline, Windsurf) to use codebase-memory-mcp and to prefer the knowledge graph when exploring code.
cbm-tool/
├── bin/
│ ├── cbm # Linux / macOS entrypoint (Bash)
│ └── cbm.ps1 # Windows entrypoint (PowerShell)
├── install/
│ ├── install.sh # Linux / macOS installer
│ └── install.ps1 # Windows installer
├── docs/
│ ├── USAGE.md # Command reference and examples
│ ├── USAGE.zh-CN.md # 中文使用指南
│ ├── INSTALL.md # Per-OS installation instructions
│ └── INSTALL.zh-CN.md # 中文安装说明
├── tests/
│ ├── test_unix.sh # Linux / macOS tests
│ └── test_windows.ps1 # Windows tests
├── Makefile # Linux / macOS convenience targets
├── share/
│ └── cbm/
│ └── rules/
│ └── codebase-memory.md # Default rule template
├── README.md
└── LICENSE
make install
cbm ..\install\install.ps1
cbm.ps1 .# Auto-detect installed editors and configure them
cbm setup
# Preview changes without applying
cbm setup --dry-run
# Configure a specific editor
cbm setup --editor cursor
# Remove configuration
cbm setup --uninstallThe rule template lives at share/cbm/rules/codebase-memory.md. Pass a custom version with cbm setup --rules-file ./my-rules.md.
# Update cbm itself from GitHub
cbm update self
# Preview the self-update
cbm update self --dry-run
# Update codebase-memory-mcp
cbm update codebase-memory-mcpSee docs/INSTALL.md for detailed installation steps and docs/USAGE.md for the full command reference.
中文文档:README.zh-CN.md | 安装指南 | 使用指南。
# Run Unix tests
make test
# Lint shell scripts (requires shellcheck)
make lintOn Windows, run the PowerShell tests with:
.\tests\test_windows.ps1MIT