$git clone https://github.com/justrach/codedb---
| 1 | <p align="center"> |
| 2 | <img src="assets/codedb.png" alt="codedb" width="200" /> |
| 3 | </p> |
| 4 | |
| 5 | <p align="center"> |
| 6 | <a href="https://github.com/justrach/codedb/releases/latest"><img src="https://img.shields.io/github/v/release/justrach/codedb?style=flat-square&label=version" alt="Release" /></a> |
| 7 | <a href="https://github.com/justrach/codedb/blob/main/LICENSE"><img src="https://img.shields.io/github/license/justrach/codedb?style=flat-square" alt="License" /></a> |
| 8 | <img src="https://img.shields.io/badge/zig-0.17.0--dev-f7a41d?style=flat-square" alt="Zig 0.17.0-dev" /> |
| 9 | <img src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" alt="Alpha" /> |
| 10 | <a href="https://deepwiki.com/justrach/codedb"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" /></a> |
| 11 | <br /> |
| 12 | <a href="https://trendshift.io/repositories/26207" target="_blank"><img src="https://trendshift.io/api/badge/repositories/26207" alt="justrach%2Fcodedb | Trendshift" width="250" height="55" /></a> |
| 13 | </p> |
| 14 | |
| 15 | <h1 align="center">codedb</h1> |
| 16 | |
| 17 | <h3 align="center">Code intelligence server for AI agents. Zig core. MCP native. Zero dependencies.</h3> |
| 18 | |
| 19 | <p align="center"> |
| 20 | Structural indexing · Trigram search · Word index · Dependency graph · File watching · MCP + HTTP |
| 21 | </p> |
| 22 | |
| 23 | <p align="center"> |
| 24 | <em><strong>A context engine, not an editor.</strong> codedb helps agents <strong>find and understand</strong> code — search, symbols, callers, dependencies, outlines — and hands editing back to your native tools. <code>codedb_edit</code> is only a fallback.</em> |
| 25 | </p> |
| 26 | |
| 27 | <p align="center"> |
| 28 | <a href="#-status">Status</a> · |
| 29 | <a href="#-install">Install</a> · |
| 30 | <a href="#-quick-start">Quick Start</a> · |
| 31 | <a href="#-mcp-tools">MCP Tools</a> · |
| 32 | <a href="#-benchmarks">Benchmarks</a> · |
| 33 | <a href="#️-architecture">Architecture</a> · |
| 34 | <a href="#-data--privacy">Data & Privacy</a> · |
| 35 | <a href="#-building-from-source">Building</a> |
| 36 | </p> |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## Status |
| 41 | |
| 42 | > **Alpha software — API is stabilizing but may change** |
| 43 | > |
| 44 | > codedb works and is used daily in production AI workflows, but: |
| 45 | > - **Parser support** — Zig, C/C++, Python, TypeScript/JavaScript, Rust, Go, PHP, Ruby, HCL, R, Dart/Flutter |
| 46 | > - **Lightweight outline support** — Java, Kotlin, Svelte, Vue, Astro, shell, CSS/SCSS, SQL, protobuf, Fortran, LLVM IR, MLIR, and TableGen |
| 47 | > - **No auth** — HTTP server binds to localhost only |
| 48 | > - **Snapshot format** may change between versions |
| 49 | > - **MCP protocol** is JSON-RPC 2.0 over stdio (stable) |
| 50 | |
| 51 | | What works today | What's in progress | |
| 52 | |--------------------------------------------------------|------------------------------------------| |
| 53 | | 21 MCP tools for full codebase intelligence | Deeper parser coverage and edge-case handling | |
| 54 | | Trigram v2: integer doc IDs, batch-accumulate, merge intersect | Incremental segment-based indexing | |
| 55 | | 538x faster than ripgrep on pre-indexed queries | WASM target for Cloudflare Workers | |
| 56 | | O(1) inverted word index for identifier lookup | Multi-project support | |
| 57 | | Structural outlines (functions, structs, imports) | mmap-backed trigram index | |
| 58 | | Reverse dependency graph | | |
| 59 | | Fallback editor: atomic line-range edits + version tracking | | |
| 60 | | Auto-registration in Claude, Codex, Gemini, Cursor, Windsurf, Devin | | |
| 61 | | Polling file watcher with filtered directory walker | | |
| 62 | | Portable snapshot for instant MCP startup | | |
| 63 | | Singleton MCP with PID lock + 1h idle timeout | | |
| 64 | | Sensitive file blocking (.env, credentials, keys) | | |
| 65 | | Codesigned macOS ARM64 binary; Intel slice temporarily unsigned | |