diff --git a/README.md b/README.md
index cb5e90aa..809477e9 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
[](https://github.com/DeusData/codebase-memory-mcp)
[](https://github.com/DeusData/codebase-memory-mcp)
[](#hybrid-lsp)
-[](https://github.com/DeusData/codebase-memory-mcp)
+[](https://github.com/DeusData/codebase-memory-mcp)
[](https://github.com/DeusData/codebase-memory-mcp)
[](https://github.com/DeusData/codebase-memory-mcp/releases/latest)
[](https://scorecard.dev/viewer/?uri=github.com/DeusData/codebase-memory-mcp)
@@ -16,7 +16,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 158 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, and Rust — 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.
+High-quality parsing through [tree-sitter](https://tree-sitter.github.io/tree-sitter/) AST analysis across all 158 languages, enhanced with [**Hybrid LSP** semantic type resolution](#hybrid-lsp) for Python, TypeScript / JavaScript / JSX / TSX, PHP, C#, Go, C, C++, Java, Kotlin, and Rust — 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 12 coding agents.
> **Research** — The design and benchmarks behind this project are described in the preprint [*Codebase-Memory: Tree-Sitter-Based Knowledge Graphs for LLM Code Exploration via MCP*](https://arxiv.org/abs/2603.27277) (arXiv:2603.27277). Evaluated across 31 real-world repositories: 83% answer quality, 10× fewer tokens, 2.1× fewer tool calls vs. file-by-file exploration.
@@ -34,7 +34,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.
- **158 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.
-- **11 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro — configures MCP entries, instruction files, and pre-tool hooks for each.
+- **12 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro, and Pi — 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).
- **Infrastructure-as-code indexing** — Dockerfiles, Kubernetes manifests, and Kustomize overlays indexed as graph nodes with cross-references. `Resource` nodes for K8s kinds, `Module` nodes for Kustomize overlays with `IMPORTS` edges to referenced resources.
- **14 MCP tools** — search, trace, architecture, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
@@ -345,6 +345,7 @@ Restart your agent. Verify with `/mcp` — you should see `codebase-memory-mcp`
| VS Code | `Code/User/mcp.json` | — | — |
| OpenClaw | `openclaw.json` | — | — |
| Kiro | `.kiro/settings/mcp.json` | — | — |
+| Pi | `.pi/agent/mcp.json` | — | — |
**Hooks are structurally non-blocking** (exit code 0, every failure path).
For Claude Code, the `PreToolUse` hook intercepts `Grep`/`Glob` (never `Read` —
diff --git a/docs/index.html b/docs/index.html
index 7e732406..8fb6ae16 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4,7 +4,7 @@
codebase-memory-mcp — Code Intelligence Knowledge Graph for AI Coding Agents
-
+
@@ -68,7 +68,7 @@
"Infrastructure-as-code indexing for Dockerfiles, Kubernetes, and Kustomize",
"Built-in 3D graph visualization UI",
"Auto-sync background watcher for incremental re-indexing",
- "One-command install for 11 AI coding agents"
+ "One-command install for 12 AI coding agents"
],
"author": {
"@type": "Organization",
@@ -157,7 +157,7 @@
"name": "Which AI coding agents work with codebase-memory-mcp?",
"acceptedAnswer": {
"@type": "Answer",
- "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."
+ "text": "A single install command configures 12 agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro, and Pi. Any MCP-compatible client can use the server."
}
},
{
@@ -526,8 +526,8 @@ How do I install codebase-memory-mcp?
"Index this project"
- One command configures all 11 supported agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode,
- Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro — with MCP entries, instruction files, and
+ One command configures all 12 supported agents: Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode,
+ Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro, and Pi — with MCP entries, instruction files, and
pre-tool hooks for each. Windows users run install.ps1. Also available via
npm, pip, Homebrew, Scoop, Winget, Chocolatey, AUR, and go install.
diff --git a/docs/llms.txt b/docs/llms.txt
index c680c15a..71173076 100644
--- a/docs/llms.txt
+++ b/docs/llms.txt
@@ -12,7 +12,7 @@
- Semantic & similarity edges: SEMANTICALLY_RELATED (vocabulary-mismatch matches) and SIMILAR_TO (MinHash + LSH near-clone / duplicate detection).
- Cross-repo intelligence: CROSS_* edges link nodes across multiple repos indexed in one store; multi-galaxy 3D layout and cross-repo architecture summary.
- Cross-service linking: HTTP route ↔ call-site matching, plus gRPC/GraphQL/tRPC detection and pub/sub channels (EMITS/LISTENS_ON for Socket.IO, EventEmitter, generic buses).
-- Supported agents: 11 (Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro).
+- Supported agents: 12 (Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro, Pi).
- Performance: Linux kernel (28M LOC, 75K files) full index in 3 minutes → 4.81M nodes, 7.72M edges; Cypher queries in under 1ms.
- Distribution: single static C binary; also npm, PyPI, Homebrew, Scoop, Winget, Chocolatey, AUR, and `go install`.
diff --git a/pkg/npm/README.md b/pkg/npm/README.md
index 81dbc176..79509421 100644
--- a/pkg/npm/README.md
+++ b/pkg/npm/README.md
@@ -7,7 +7,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 — this package downloads and runs it automatically.
-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.
+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 12 coding agents.
## Installation
@@ -29,7 +29,7 @@ Restart your agent. Say **"Index this project"** — done.
- **Plug and play** — single static binary for macOS (arm64/amd64), Linux (arm64/amd64), and Windows (amd64). No Docker, no runtime dependencies, no API keys.
- **159 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.
-- **11 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, and Kiro.
+- **12 agents, one command** — `install` auto-detects Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode, Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro, and Pi.
- **14 MCP tools** — search, trace, architecture, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking, ADR management, and more.
## Supported Platforms
diff --git a/src/cli/cli.c b/src/cli/cli.c
index f159f591..d36076cd 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -1143,6 +1143,10 @@ cbm_detected_agents_t cbm_detect_agents(const char *home_dir) {
snprintf(path, sizeof(path), "%s/.kiro", home_dir);
agents.kiro = dir_exists(path);
+ /* Pi: ~/.pi/agent/ */
+ snprintf(path, sizeof(path), "%s/.pi/agent", home_dir);
+ agents.pi = dir_exists(path);
+
return agents;
}
@@ -2934,6 +2938,7 @@ static void print_detected_agents(const cbm_detected_agents_t *a) {
{a->cursor, "Cursor"},
{a->openclaw, "OpenClaw"},
{a->kiro, "Kiro"},
+ {a->pi, "Pi"},
};
printf("Detected agents:");
bool any = false;
@@ -3247,6 +3252,11 @@ static void install_editor_agent_configs(const cbm_detected_agents_t *agents, co
install_generic_agent_config("Kiro", binary_path, cp, NULL, dry_run,
cbm_install_editor_mcp);
}
+ if (agents->pi) {
+ char cp[CLI_BUF_1K];
+ snprintf(cp, sizeof(cp), "%s/.pi/agent/mcp.json", home);
+ install_generic_agent_config("Pi", binary_path, cp, NULL, dry_run, cbm_install_editor_mcp);
+ }
}
static void cbm_install_agent_configs(const char *home, const char *binary_path, bool force,
@@ -3346,6 +3356,7 @@ char *cbm_build_install_plan_json(const char *home, const char *binary_path) {
{det.cursor, "cursor"},
{det.openclaw, "openclaw"},
{det.kiro, "kiro"},
+ {det.pi, "pi"},
};
yyjson_mut_doc *doc = yyjson_mut_doc_new(NULL);
@@ -3720,6 +3731,12 @@ static void uninstall_editor_agents(const cbm_detected_agents_t *agents, const c
uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Kiro", cp, NULL}, dry_run,
cbm_remove_editor_mcp);
}
+ if (agents->pi) {
+ char cp[CLI_BUF_1K];
+ snprintf(cp, sizeof(cp), "%s/.pi/agent/mcp.json", home);
+ uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Pi", cp, NULL}, dry_run,
+ cbm_remove_editor_mcp);
+ }
}
int cbm_cmd_uninstall(int argc, char **argv) {
diff --git a/src/cli/cli.h b/src/cli/cli.h
index 9efe6789..9a410766 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -128,6 +128,7 @@ typedef struct {
bool cursor; /* ~/.cursor/ exists */
bool openclaw; /* ~/.openclaw/ exists */
bool kiro; /* ~/.kiro/ exists */
+ bool pi; /* ~/.pi/agent/ exists */
} cbm_detected_agents_t;
/* Detect which coding agents are installed.
diff --git a/tests/test_cli.c b/tests/test_cli.c
index 0b78537c..6f7c05bc 100644
--- a/tests/test_cli.c
+++ b/tests/test_cli.c
@@ -1774,6 +1774,28 @@ TEST(cli_detect_agents_finds_kiro) {
PASS();
}
+TEST(cli_detect_agents_finds_pi) {
+ char tmpdir[256];
+ snprintf(tmpdir, sizeof(tmpdir), "/tmp/cli-detect-XXXXXX");
+ if (!cbm_mkdtemp(tmpdir))
+ FAIL("cbm_mkdtemp failed");
+
+ char dir[512];
+
+ /* ~/.pi alone (without the agent/ subdir) must not trigger detection. */
+ snprintf(dir, sizeof(dir), "%s/.pi", tmpdir);
+ test_mkdirp(dir);
+ ASSERT_FALSE(cbm_detect_agents(tmpdir).pi);
+
+ /* ~/.pi/agent/ present → Pi detected. */
+ snprintf(dir, sizeof(dir), "%s/.pi/agent", tmpdir);
+ test_mkdirp(dir);
+ ASSERT_TRUE(cbm_detect_agents(tmpdir).pi);
+
+ test_rmdir_r(tmpdir);
+ PASS();
+}
+
TEST(cli_detect_agents_none_found) {
char tmpdir[256];
snprintf(tmpdir, sizeof(tmpdir), "/tmp/cli-detect-XXXXXX");
@@ -1796,6 +1818,7 @@ TEST(cli_detect_agents_none_found) {
ASSERT_FALSE(agents.antigravity);
ASSERT_FALSE(agents.kilocode);
ASSERT_FALSE(agents.kiro);
+ ASSERT_FALSE(agents.pi);
if (saved_ccd_copy) {
cbm_setenv("CLAUDE_CONFIG_DIR", saved_ccd_copy, 1);
@@ -2756,6 +2779,7 @@ SUITE(cli) {
RUN_TEST(cli_detect_agents_finds_antigravity);
RUN_TEST(cli_detect_agents_finds_kilocode);
RUN_TEST(cli_detect_agents_finds_kiro);
+ RUN_TEST(cli_detect_agents_finds_pi);
RUN_TEST(cli_detect_agents_none_found);
/* Codex MCP config upsert (3 tests — group B) */