Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Add OpenClaw + VS Code agent detection (10 agents total)

Martin Vogel63e6141ac6d8
diff --git a/README.md b/README.md
index d54e5d172..4b28c5700 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
**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 for macOS, Linux, and Windows — download, run `install`, done.
-High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 64 languages, enhanced with LSP-style hybrid type resolution for Go, C, and C++ (more languages coming soon) — 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 8 coding agents.
+High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 64 languages, enhanced with LSP-style hybrid type resolution for Go, C, and C++ (more languages coming soon) — 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 10 coding agents.
<p align="center">
<img src="docs/graph-ui-screenshot.png" alt="Graph visualization UI showing the codebase-memory-mcp knowledge graph" width="800">
@@ -16,7 +16,7 @@ High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-si
- **Plug and play** — single static binary for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (amd64). No Docker, no runtime dependencies, no API keys. Download → `install` → restart agent → done.
- **64 languages** — vendored tree-sitter grammars compiled into the binary. Nothing to install, nothing that breaks.
- **120x fewer tokens** — 5 structural queries: ~3,400 tokens vs ~412,000 via file-by-file search. One graph query replaces dozens of grep/read cycles.
-- **8 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode and configures MCP entries, instruction files, and pre-tool hooks for each.
+- **10 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, and OpenClaw — configures MCP entries, instruction files, and pre-tool hooks for each.
- **Built-in graph visualization** — 3D interactive UI at `localhost:9749` (optional UI binary variant).
- **14 MCP tools** — search, trace, architecture, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
@@ -221,6 +221,8 @@ Restart your agent. Verify with `/mcp` — you should see `codebase-memory-mcp`
| Antigravity | `mcp_config.json` | `AGENTS.md` | — |
| Aider | — | `CONVENTIONS.md` | — |
| KiloCode | `mcp_settings.json` | `~/.kilocode/rules/` | — |
+| VS Code | `Code/User/mcp.json` | — | — |
+| OpenClaw | `openclaw.json` | — | — |
**Hooks** are advisory (exit code 0) — they remind agents to prefer MCP graph tools when they reach for grep/glob/read, without blocking the tool call.
@@ -327,7 +329,7 @@ Plus: Clojure, F#, Julia, Vim Script, Nix, Common Lisp, Elm, Fortran, CUDA, COBO
src/
main.c Entry point (MCP stdio server + CLI + install/update/config)
mcp/ MCP server (14 tools, JSON-RPC 2.0, session detection, auto-index)
- cli/ Install/uninstall/update/config (8 agents, hooks, instructions)
+ cli/ Install/uninstall/update/config (10 agents, hooks, instructions)
store/ SQLite graph storage (nodes, edges, traversal, search, Louvain)
pipeline/ Multi-pass indexing (structure → definitions → calls → HTTP links → config → tests)
cypher/ Cypher query lexer, parser, planner, executor
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 7db8e67a7..e1fc4bec9 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -813,7 +813,8 @@ int cbm_remove_zed_mcp(const char *config_path) {
/* ── Agent detection ──────────────────────────────────────────── */
cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
- cbm_detected_agents_t agents = {false, false, false, false, false, false, false, false, false};
+ cbm_detected_agents_t agents;
+ memset(&agents, 0, sizeof(agents));
if (!home_dir || !home_dir[0]) {
return agents;
}
@@ -884,6 +885,12 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
agents.vscode = true;
}
+ /* OpenClaw: ~/.openclaw/ dir */
+ snprintf(path, sizeof(path), "%s/.openclaw", home_dir);
+ if (stat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
+ agents.openclaw = true;
+ }
+
return agents;
}
@@ -2169,8 +2176,12 @@ int cbm_cmd_install(int argc, char **argv) {
if (agents.vscode) {
printf(" VS-Code");
}
+ if (agents.openclaw) {
+ printf(" OpenClaw");
+ }
if (!agents.claude_code && !agents.codex && !agents.gemini && !agents.zed && !agents.opencode &&
- !agents.antigravity && !agents.aider && !agents.kilocode && !agents.vscode) {
+ !agents.antigravity && !agents.aider && !agents.kilocode && !agents.vscode &&
+ !agents.openclaw) {
printf(" (none)");
}
printf("\n\n");
@@ -2356,7 +2367,18 @@ int cbm_cmd_install(int argc, char **argv) {
printf(" mcp: %s\n", config_path);
}
- /* Step 13: Ensure PATH */
+ /* Step 13: Install OpenClaw */
+ if (agents.openclaw) {
+ printf("OpenClaw:\n");
+ char config_path[1024];
+ snprintf(config_path, sizeof(config_path), "%s/.openclaw/openclaw.json", home);
+ if (!dry_run) {
+ cbm_install_editor_mcp(self_path, config_path);
+ }
+ printf(" mcp: %s\n", config_path);
+ }
+
+ /* Step 14: Ensure PATH */
char bin_dir[1024];
snprintf(bin_dir, sizeof(bin_dir), "%s/.local/bin", home);
const char *rc = cbm_detect_shell_rc(home);
@@ -2551,6 +2573,15 @@ int cbm_cmd_uninstall(int argc, char **argv) {
printf("VS Code: removed MCP config entry\n");
}
+ if (agents.openclaw) {
+ char config_path[1024];
+ snprintf(config_path, sizeof(config_path), "%s/.openclaw/openclaw.json", home);
+ if (!dry_run) {
+ cbm_remove_editor_mcp(config_path);
+ }
+ printf("OpenClaw: removed MCP config entry\n");
+ }
+
/* Step 2: Remove indexes */
int index_count = 0;
const char *cache_dir = get_cache_dir(home);
diff --git a/src/cli/cli.h b/src/cli/cli.h
index 1c3a1f810..9fd2fcf60 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -114,6 +114,7 @@ typedef struct {
bool aider; /* aider on PATH */
bool kilocode; /* KiloCode globalStorage dir exists */
bool vscode; /* VS Code User config dir exists */
+ bool openclaw; /* ~/.openclaw/ exists */
} cbm_detected_agents_t;
/* Detect which coding agents are installed.