🏎️ 🏠 🍎 🪟 🐧 - Code intelligence via SCIP indexing for Go, TypeScript, Python, Rust and Java: semantic search,…
CKB — Code Knowledge Backend
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Know your code. Change it safely. Ship with confidence.**
CKB transforms your codebase into a queryable knowledge base. Ask questions, understand impact, find owners, detect dead code—all through CLI, API, or AI assistants.
> Think of it as a senior engineer who knows every line of code, every decision, and every owner—available 24/7 to answer your questions.
---
Instant Answers to Hard Questions
| Question | Without CKB | With CKB |
|----------|-------------|----------|
| "What breaks if I change this?" | Grep and hope | Precise blast radius with risk score |
| "Who should review this PR?" | Guess from git blame | Data-driven reviewer suggestions |
| "Is this code still used?" | Delete and see what breaks | Confidence-scored dead code detection |
| "What tests should I run?" | Run everything (30 min) | Run affected tests only (2 min) |
| "How does this system work?" | Read code for hours | Query architecture instantly |
| "Who owns this code?" | Search CODEOWNERS manually | Ownership with drift detection |
| "Are there exposed secrets?" | Manual grep for patterns | Automated scanning with 26 patterns |
---
What You Can Do
🔍 **Understand** — Semantic search, call graphs, usage tracing, architecture maps
⚡ **Analyze** — Impact analysis, risk scoring, hotspot detection, coupling analysis
🛡️ **Protect** — Affected test detection, breaking change warnings, PR risk assessment
🔐 **Secure** — Secret detection, credential scanning, security-sensitive code identification
👥 **Collaborate** — Ownership lookup, reviewer suggestions, architectural decisions (ADRs)
📊 **Improve** — Dead code detection, tech debt tracking, documentation coverage
🚀 **Compound Operations** — Single-call tools (explore, understand, prepareChange) reduce AI tool calls by 60-70%
🔗 **Integrate** — CLI, HTTP API, MCP for AI tools, CI/CD pipelines, custom scripts
---
Try It Now
---
Works Everywhere
| AI Assistants | CI/CD | Your Tools |
|---------------|-------|------------|
| Claude Code, Cursor, Windsurf, VS Code, Grok | GitHub Actions, GitLab CI | CLI, HTTP API, Scripts |
**83% token reduction** with smart presets—load only the tools you need.
> **Building your own tools?** Use CKB as a backend via CLI, HTTP API, or MCP. See the **Integration Guide** for examples in Node.js, Python, Go, and shell scripts.
---
Learn More
| Resource | Description |
|----------|-------------|
| 📖 **Features Guide** | Complete feature list with examples |
| 💬 **Prompt Cookbook** | Real prompts for real problems |
| 🔌 **Integration Guide** | Use CKB in your own tools and scripts |
| ⚡ **Impact Analysis** | Blast radius, affected tests, PR risk |
| 🔧 **CI/CD Integration** | GitHub Actions, GitLab CI templates |
---
Quick Start
Option 1: npm (Recommended)
Option 2: Homebrew (macOS/Linux)
> Use the fully-qualified name. Homebrew 6.0 requires third-party taps to be trusted before it loads them; installing this way grants that trust for this one formula. Tapping first and installing by short name fails with Refusing to load formula ... from untrusted tap.
Option 3: Build from Source
Setup
**Token efficiency shown at startup:**
Now Claude can answer questions like:
- *"What calls the HandleRequest function?"*
- *"How is ProcessPayment reached from the API?"*
- *"What's the blast radius if I change UserService?"*
- *"Who owns the internal/api module?"*
- *"Is this legacy code still used?"*
Why CKB?
| Without CKB | With CKB |
|-------------|----------|
| AI greps for patterns | AI navigates semantically |
| "I found 47 matches for Handler" | "HandleRequest is called by 3 routes via CheckoutService" |
| Guessing at impact | Knowing the blast radius with risk scores |
| Reading entire files for context | Getting exactly what's relevant |
| "Who owns this?" → search CODEOWNERS | Instant ownership with reviewer suggestions |
| "Is this safe to change?" → hope | Hotspot trends + impact analysis |
Three Ways to Use It
| Interface | Best For |
|-----------|----------|