Skip to content

Commit a3903ca

Browse files
committed
feat(cli): expand agent integration coverage
Signed-off-by: Martin Vogel <[email protected]>
1 parent 37880b6 commit a3903ca

32 files changed

Lines changed: 29717 additions & 1806 deletions

‎Makefile.cbm‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ CXXFLAGS_PROD = $(CXXFLAGS_COMMON) -O2
6363

6464
# Test flags: debug + sanitizers (override SANITIZE= to disable on Windows)
6565
SANITIZE = -fsanitize=address,undefined -fno-omit-frame-pointer
66-
CFLAGS_TEST = $(CFLAGS_COMMON) -g -O1 $(SANITIZE)
66+
EDITOR_TEST_DEFINES = -DCBM_JSON_LIKE_ENABLE_TEST_API=1 \
67+
-DCBM_TOML_EDIT_ENABLE_TEST_API=1 -DCBM_YAML_ENABLE_TEST_API=1 \
68+
-DCBM_TEXT_EDIT_ENABLE_TEST_API=1 -DCBM_CLI_ENABLE_TEST_API=1
69+
CFLAGS_TEST = $(CFLAGS_COMMON) $(EDITOR_TEST_DEFINES) -g -O1 $(SANITIZE)
6770
CXXFLAGS_TEST = $(CXXFLAGS_COMMON) -g -O1 $(SANITIZE)
6871

6972
# TSan (can't combine with ASan)
7073
TSAN_SANITIZE = -fsanitize=thread -fno-omit-frame-pointer
71-
CFLAGS_TSAN = $(CFLAGS_COMMON) -g -O1 \
74+
CFLAGS_TSAN = $(CFLAGS_COMMON) $(EDITOR_TEST_DEFINES) -g -O1 \
7275
$(TSAN_SANITIZE)
7376
CXXFLAGS_TSAN = $(CXXFLAGS_COMMON) -g -O1 \
7477
$(TSAN_SANITIZE)
@@ -237,7 +240,10 @@ WATCHER_SRCS = src/watcher/watcher.c
237240
GIT_SRCS = src/git/git_context.c
238241

239242
# CLI module (new)
240-
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c
243+
CLI_SRCS = src/cli/cli.c src/cli/progress_sink.c src/cli/hook_augment.c \
244+
src/cli/agent_clients.c \
245+
src/cli/config_json_like.c src/cli/config_toml_edit.c src/cli/config_yaml_edit.c \
246+
src/cli/config_text_edit.c
241247

242248
# UI module (graph visualization)
243249
UI_SRCS = \
@@ -393,7 +399,8 @@ TEST_INTEGRATION_SRCS = tests/test_integration.c tests/test_incremental.c tests/
393399
TEST_TRACES_SRCS = tests/test_traces.c
394400

395401

396-
TEST_CLI_SRCS = tests/test_cli.c
402+
TEST_CLI_SRCS = tests/test_cli.c tests/test_agent_clients.c tests/test_config_json_like.c \
403+
tests/test_config_toml_edit.c tests/test_config_yaml_edit.c tests/test_config_text_edit.c
397404

398405
TEST_MEM_SRCS = tests/test_mem.c
399406

@@ -629,6 +636,14 @@ $(BUILD_DIR)/test-runner: $(ALL_TEST_SRCS) $(PROD_SRCS) $(EXTRACTION_SRCS) $(AC_
629636
test: $(BUILD_DIR)/test-runner
630637
cd $(CURDIR) && $(BUILD_DIR)/test-runner
631638

639+
# Focused native development is intentionally a separate, explicit target so
640+
# an inherited TEST_SUITES value cannot silently narrow the gating test target.
641+
TEST_SUITES ?=
642+
test-focused: $(BUILD_DIR)/test-runner
643+
@test -n "$(strip $(TEST_SUITES))" || \
644+
(echo "TEST_SUITES is required for test-focused"; exit 2)
645+
cd $(CURDIR) && $(BUILD_DIR)/test-runner $(TEST_SUITES)
646+
632647
# ── Cumulative bug-reproduction runner (RED by design, non-gating) ──
633648
# Mirrors test-runner's link line but uses repro_main.c (own main + counters)
634649
# and TEST_REPRO_SRCS instead of ALL_TEST_SRCS. Exits non-zero while any bug is

‎README.md‎

Lines changed: 127 additions & 34 deletions
Large diffs are not rendered by default.

‎docs/index.html‎

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>codebase-memory-mcp — Code Intelligence Knowledge Graph for AI Coding Agents</title>
7-
<meta name="description" content="codebase-memory-mcp is an open-source MCP server that indexes any codebase into a persistent knowledge graph so AI coding agents answer structural questions with ~120x fewer tokens. 158 languages, Hybrid LSP type resolution, local semantic vector search, code-clone detection, sub-1ms queries, Linux kernel indexed in 3 minutes. Single static C binary, zero dependencies. Works with 11 agents including Claude Code, Codex CLI, Gemini CLI, Cursor, and Zed.">
7+
<meta name="description" content="codebase-memory-mcp is an open-source MCP server that indexes any codebase into a persistent knowledge graph so AI coding agents answer structural questions with ~120x fewer tokens. 158 languages, Hybrid LSP type resolution, local semantic vector search, code-clone detection, sub-1ms queries, Linux kernel indexed in 3 minutes. Single static C binary, zero dependencies. One command configures 43 automatic/conditional client surfaces.">
88
<meta name="keywords" content="MCP server, code intelligence, knowledge graph, tree-sitter, Hybrid LSP, semantic code search, code embeddings, code clone detection, cross-repo analysis, data-flow analysis, Claude Code, Codex CLI, Gemini CLI, Cursor, Zed, code exploration, token reduction, call graph, dead code detection">
99
<meta name="author" content="DeusData">
1010
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
@@ -68,7 +68,7 @@
6868
"Infrastructure-as-code indexing for Dockerfiles, Kubernetes, and Kustomize",
6969
"Built-in 3D graph visualization UI",
7070
"Auto-sync background watcher for incremental re-indexing",
71-
"One-command install for 11 AI coding agents"
71+
"One command configures 43 automatic/conditional client surfaces"
7272
],
7373
"author": {
7474
"@type": "Organization",
@@ -157,7 +157,7 @@
157157
"name": "Which AI coding agents work with codebase-memory-mcp?",
158158
"acceptedAnswer": {
159159
"@type": "Answer",
160-
"text": "A single install command configures 11 agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro. Any MCP-compatible client can use the server."
160+
"text": "A single install command configures 43 automatic/conditional client surfaces. The 37 detected surfaces are Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor, Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code, GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI, GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Amazon Q Developer IDE, CodeBuddy Code CLI, IBM Bob Shell, Pochi, and Pi. Continue / cn, Visual Studio, TRAE, Roo Code, IBM Bob IDE, and Sourcegraph Cody are conditional or explicit integrations. Qodo, Warp MCP, JetBrains AI/ACP, GitHub Copilot coding agent, Jules, CodeRabbit, Replit, BLACKBOX AI, Plandex, and SWE-agent require manual, UI, cloud, or repository-managed setup and are not counted among the 43."
161161
}
162162
},
163163
{
@@ -450,7 +450,7 @@ <h1>codebase-memory-mcp</h1>
450450
<div class="stat"><div class="number">~120x</div><div class="label">fewer tokens</div></div>
451451
<div class="stat"><div class="number">158</div><div class="label">languages</div></div>
452452
<div class="stat"><div class="number">3 min</div><div class="label">Linux kernel index</div></div>
453-
<div class="stat"><div class="number">11</div><div class="label">agents supported</div></div>
453+
<div class="stat"><div class="number">43</div><div class="label">client surfaces</div></div>
454454
</div>
455455
<div class="cta-buttons">
456456
<a href="https://github.com/DeusData/codebase-memory-mcp" class="cta-primary">View on GitHub</a>
@@ -521,15 +521,45 @@ <h2>How do I install codebase-memory-mcp?</h2>
521521
<div class="install-block">
522522
<span class="comment"># 1. One-line install (macOS / Linux). Add --ui for the 3D graph UI.</span><br>
523523
<span class="cmd">curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash</span><br><br>
524-
<span class="comment"># 2. The installer auto-detects and configures every installed agent.</span><br><br>
524+
<span class="comment"># 2. The installer configures detected clients; explicit flags cover conditional clients.</span><br><br>
525525
<span class="comment"># 3. Restart your agent, then say:</span><br>
526526
<span class="cmd">"Index this project"</span>
527527
</div>
528528
<p class="muted">
529-
One command configures all 11 supported agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode,
530-
Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro — with MCP entries, instruction files, and
531-
pre-tool hooks for each. Windows users run <code>install.ps1</code>. Also available via
532-
<code>npm</code>, <code>pip</code>, Homebrew, Scoop, Winget, Chocolatey, AUR, and <code>go install</code>.
529+
One command configures 43 automatic/conditional client surfaces. <strong>Detected automatically (37):</strong>
530+
Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor,
531+
Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code,
532+
GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI,
533+
GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Amazon Q Developer IDE,
534+
CodeBuddy Code CLI, IBM Bob Shell, Pochi, and Pi.
535+
</p>
536+
<p class="muted">
537+
<strong>Conditional or explicit (6):</strong> Continue / cn, Visual Studio, TRAE, Roo Code, IBM Bob IDE,
538+
and Sourcegraph Cody. <strong>Manual, UI, cloud, or repository-managed (not counted):</strong> Qodo,
539+
Warp MCP, JetBrains AI/ACP, GitHub Copilot coding agent, Jules, CodeRabbit, Replit, BLACKBOX AI,
540+
Plandex, and SWE-agent. Warp is counted above for its detected skill installation; its MCP connection
541+
remains manual. Windows users run <code>install.ps1</code>. Also available via <code>npm</code>,
542+
<code>pip</code>, Homebrew, Scoop, Winget, Chocolatey, AUR, and <code>go install</code>.
543+
</p>
544+
<p class="muted">
545+
Lifecycle installation follows documented context contracts: Kimi uses <code>UserPromptSubmit</code>;
546+
on macOS/Linux, GitLab Duo gets a fail-open user <code>SessionStart</code>, while Devin gets
547+
<code>UserPromptSubmit</code>, <code>PostCompaction</code>, and a deduplicated <code>SessionStart</code>
548+
when Claude does not already provide it. Qoder, GitLab Duo, Devin, and Factory hooks are withheld on
549+
Windows where no deterministic shell/executor contract is documented. Cline's auto-activating file hooks
550+
are withheld because their context output is not reliably consumed; CodeBuddy's beta hooks are not
551+
auto-installed; Junie's EAP
552+
<code>SessionStart</code> output is documented as ignored; and Cursor context hooks are withheld because
553+
the documented events cannot safely provide race-free MCP context to read-only subagents.
554+
</p>
555+
<p class="muted">
556+
Claude, Gemini, Kiro, Qwen, CodeBuddy, KiloCode, Mistral Vibe, Qoder, Junie, and Factory receive documented
557+
graph profiles with the narrowest tool/server filters their schemas support. KiloCode and Vibe use explicit
558+
read-only query-tool allowlists rather than server wildcards. Cursor, Rovo, Pochi, and Cline use explicit
559+
parent handoff where direct child MCP is unavailable or unsafe; Pochi is limited to <code>readFile</code>.
560+
Neither IBM Bob surface receives an invented hook or custom agent. Amazon Q Developer
561+
IDE defaults to <code>~/.aws/amazonq/default.json</code> while preserving either existing documented
562+
alternative.
533563
</p>
534564
</section>
535565

‎pkg/npm/README.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
**The fastest and most efficient code intelligence engine for AI coding agents.** Full-indexes an average repository in milliseconds, the Linux kernel (28M LOC, 75K files) in 3 minutes. Answers structural queries in under 1ms. Ships as a single static binary — this package downloads and runs it automatically.
99

10-
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across 159 languages — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 14 MCP tools. Zero dependencies. Plug and play across 11 coding agents.
10+
High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across 159 languages — producing a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links. 14 MCP tools. Zero dependencies. Plug and play across 43 automatic/conditional client surfaces.
1111

1212
## Installation
1313

@@ -29,7 +29,13 @@ Restart your agent. Say **"Index this project"** — done.
2929
- **Plug and play** — single static binary for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (amd64). No Docker, no runtime dependencies, no API keys.
3030
- **159 languages** — vendored tree-sitter grammars compiled into the binary. Nothing to install, nothing that breaks.
3131
- **120x fewer tokens** — 5 structural queries: ~3,400 tokens vs ~412,000 via file-by-file search.
32-
- **11 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro.
32+
- **43 supported automatic/conditional client surfaces** — `install` configures the appropriate MCP, durable-context, and documented hook surfaces without widening client permissions.
33+
- **Detected automatically (37)** — Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, Cursor, Windsurf, Augment / Auggie, OpenClaw, Kiro, Junie, Hermes, OpenHands, Cline, Warp, Qwen Code, GitHub Copilot CLI, Factory Droid, Crush, Goose, Mistral Vibe, Qoder CLI, Kimi Code CLI, GitLab Duo CLI, Rovo Dev CLI, Amp, Devin CLI / Local, Tabnine, Amazon Q Developer IDE, CodeBuddy Code CLI, IBM Bob Shell, Pochi, and Pi.
34+
- **Conditional or explicit (6)** — Continue / cn, Visual Studio, TRAE, Roo Code, IBM Bob IDE, and Sourcegraph Cody. Bob IDE is touched only when `~/.bob/mcp.json` already exists.
35+
- **New documented adapters** — CodeBuddy uses `~/.codebuddy/.mcp.json` while preserving active older files; Bob Shell uses `~/.bob/mcp_settings.json`; Pochi uses the `mcp` section in `~/.pochi/config.jsonc`; Amazon Q Developer IDE defaults to `~/.aws/amazonq/default.json` while preserving either documented alternative.
36+
- **Lifecycle hooks stay conservative** — Kimi uses `UserPromptSubmit`; on macOS/Linux, GitLab Duo gets a fail-open user `SessionStart`, while Devin gets `UserPromptSubmit`, `PostCompaction`, and a deduplicated `SessionStart` when Claude does not already provide it. Qoder, GitLab Duo, Devin, and Factory hooks are withheld on Windows without a documented shell/executor contract. Cline's auto-activating file hooks are withheld because their context output is not reliably consumed, CodeBuddy beta hooks are not auto-installed, and Cursor context hooks remain withheld.
37+
- **Subagent access is explicit** — Claude, Gemini, Kiro, Qwen, CodeBuddy, KiloCode, Mistral Vibe, Qoder, Junie, and Factory get documented graph profiles with the narrowest tool/server filters their schemas support. KiloCode and Vibe enumerate read-only query tools rather than using server wildcards. Cursor, Rovo, Pochi, and Cline use explicit parent handoff where child MCP is unavailable or unsafe; IBM Bob receives no invented hook or agent.
38+
- **Manual, UI, cloud, or repository-managed (not counted)** — Qodo, Warp MCP, JetBrains AI/ACP, GitHub Copilot coding agent, Jules, CodeRabbit, Replit, BLACKBOX AI, Plandex, and SWE-agent. Warp is counted above for its detected skill installation; its MCP connection remains manual.
3339
- **14 MCP tools** — search, trace, architecture, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
3440

3541
## Supported Platforms

0 commit comments

Comments
 (0)