feat(install): add --project flag for per-project MCP installation#74
feat(install): add --project flag for per-project MCP installation#74halindrome wants to merge 3 commits intoDeusData:mainfrom
Conversation
codebase-memory-mcp install --project [path]
Installs MCP config into {path}/.claude/ (or cwd if no path given)
instead of the global ~/.claude/. Also respects CLAUDE_CONFIG_DIR
environment variable as an override for the Claude Code config directory.
Applies equally to the uninstall subcommand.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
QA Round 1 |
- cbm_cmd_install: guard steps 5-12 (Codex, Gemini, Zed, OpenCode,
Antigravity, Aider, KiloCode, PATH) with !has_project so --project
installs only touch the project's .claude/ tree, not global agent dirs
- cbm_cmd_update: add --project [path] flag parsing; when set, also
reinstall skills in {project_path}/.claude/skills so project-local
skills stay current after a binary update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
QA Round 1 — Fixes AppliedAddressed all confirmed findings from the Opus QA review. Commit: 25cac80 Fixed[Major] --project runs global agent installs — steps 5–12 in [Major] cbm_cmd_update lacks --project support — added |
QA Round 2 —
|
| Severity | Count |
|---|---|
| Critical | 0 |
| Major | 1 |
| Minor | 2 |
| Nit | 2 |
Verdict: The install path looks solid after QA Round 1 fixes. The uninstall path has the same bug that was fixed in install — missing the if (!has_project) guard — and will cause unintended global uninstall when used with --project. This needs to be fixed before merge.
Tests cover cbm_claude_config_dir and project-scoped install path construction well. Consider adding a test that verifies --project uninstall does NOT touch global agent configs.
- cbm_cmd_uninstall: guard other-agent removals (Codex, Gemini, Zed, OpenCode, Antigravity, Aider, KiloCode), index removal, and binary removal with !has_project, matching the same isolation guarantee as cbm_cmd_install — prevents --project uninstall from destroying global agent configs and the binary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
QA Round 2 — Fixes Applied (commit 127d9da)[Major] cbm_cmd_uninstall missing !has_project guard — wrapped the Codex/Gemini/Zed/OpenCode/Antigravity/Aider/KiloCode removal blocks, index removal (step 2), and binary removal (step 3) in |
QA Round 3 — Final ReviewReviewer: Claude (Opus 4.6) Checklist
Round 1 & 2 Fixes Verified
Remaining IssuesNone. No critical, major, or minor issues found. VerdictLGTM — Ready to merge. All three rounds of QA are complete. The |
|
We noticed this is the standalone version of the We'd like to think through the per-project install workflow a bit more before merging — specifically around binary path portability across team members and |
Summary
--project [path]flag toinstallanduninstallsubcommands--projectis given, MCP config is written into{path}/.claude/(or cwd if no path follows the flag) instead of the global~/.claude/cbm_claude_config_dir()helper that checksCLAUDE_CONFIG_DIRenv var first, then falls back to~/.claude— used byinstall,uninstall, andupdateWhat was changed
src/cli/cli.c—claude_config_dir()helper (exported ascbm_claude_config_dir),--projectflag parsing incbm_cmd_installandcbm_cmd_uninstall, Claude Code paths now built viaclaude_dirvariable;cbm_cmd_updatealso usescbm_claude_config_dirsrc/cli/cli.h—cbm_claude_config_dirdeclaration;#include <stddef.h>forsize_ttests/test_cli.c— 3 new tests:cli_claude_config_dir_default,cli_claude_config_dir_env_override,cli_project_install_targets_project_claude_dirTest plan
build/c/test-runner— all 2040 tests passCLAUDE_CONFIG_DIRenv var override--projectpath construction targets{path}/.claude/C port of the Go
--projectflag (same semantics as the Go implementation).🤖 Generated with Claude Code