Transform your codebase into a queryable knowledge graph. Ask questions in plain English, get precise answers.
π Quick Start β’ π Documentation β’ π MCP Server β’ π Website
You know that feeling β staring at a 100k+ line codebase, trying to find where authentication is handled, or how the database layer connects to the API. Traditional search (grep, ripgrep) only finds exact matches. Octocode understands meaning.
# Instead of this:
grep -r "auth" --include="*.rs" | head -20 # 847 results, mostly noise
# Do this:
octocode search "how is user authentication implemented"
# β 3 relevant files with context and relationshipsOctocode builds a semantic knowledge graph of your entire codebase using tree-sitter AST parsing and vector embeddings. It connects your code to AI assistants via the Model Context Protocol (MCP) β giving Claude, Cursor, and other AI tools deep contextual understanding of your project.
| Feature | Traditional Search | Octocode |
|---|---|---|
| Query style | Exact keywords | Natural language |
| Results | Text matches | Semantic meaning + relationships |
| Context | Single file | Cross-file dependencies & imports |
| AI integration | None | Native MCP server + LSP |
| Speed | Instant | <2s indexing, instant queries |
Built with Rust for performance. Local-first for privacy. Open source (Apache 2.0) for transparency.
# Universal installer (Linux, macOS, Windows)
curl -fsSL https://raw.githubusercontent.com/Muvon/octocode/master/install.sh | sh
# Or with Cargo
cargo install --git https://github.com/Muvon/octocode# Required: Voyage AI (200M free tokens/month)
export VOYAGE_API_KEY="your-voyage-api-key"
# Optional: OpenRouter (for AI commit messages, code review)
export OPENROUTER_API_KEY="your-openrouter-api-key"Get Voyage AI key β’ Get OpenRouter key
cd /your/project
octocode index
# β Indexed 12,847 blocks across 342 files# Single query
octocode search "HTTP middleware pattern"
# Multi-query for comprehensive results
octocode search "authentication" "middleware" "session"
# With filters
octocode search "database connection pool" --lang rust
# Search commit history
octocode search "authentication refactor" --mode commits# Start MCP server for Claude Desktop, Cursor, etc.
octocode mcp --path /your/project
# Or HTTP mode for custom integrations
octocode mcp --bind 0.0.0.0:12345Octocode includes a built-in MCP server that exposes your codebase as tools to AI assistants:
| Tool | What It Does |
|---|---|
semantic_search |
Semantic search across code, docs, text, and commits |
view_signatures |
View file signatures and code structure by glob patterns |
graphrag |
Query code relationships, dependencies, and architecture |
Works with: Claude Desktop β’ Cursor β’ Any MCP-compatible client
See MCP Integration Guide for setup instructions.
- π Onboarding β "How does the auth system work?" β Get the full picture in seconds
- π Code Archaeology β Find legacy code patterns without knowing exact names
- π€ AI Pair Programming β Give your AI assistant complete codebase context
- π Refactoring β Understand dependencies before making changes
- π Code Review β "Show me all error handling in the API layer"
| Language | Extensions | Features |
|---|---|---|
| Rust | .rs |
Full AST parsing, pub/use detection, module structure |
| Python | .py |
Import/class/function extraction, docstring parsing |
| TypeScript/JavaScript | .ts, .tsx, .js, .jsx |
ES6 imports/exports, type definitions |
| Go | .go |
Package/import analysis, struct/interface parsing |
| PHP | .php |
Class/function extraction, namespace support |
| C++ | .cpp, .hpp, .h |
Include analysis, class/function extraction |
| Ruby | .rb |
Class/module extraction, method definitions |
| Java | .java |
Import analysis, class/method extraction |
| JSON | .json |
Structure analysis, key extraction |
| Bash | .sh, .bash |
Function and variable extraction |
| Markdown | .md |
Document section indexing, header extraction |
Plus: CSS, Lua, Svelte, and more via tree-sitter
- Getting Started β First steps and basic workflow
- Installation Guide β Detailed methods and building from source
- MCP Integration β Connect to Claude, Cursor, etc.
- Commands Reference β Complete CLI reference
- Configuration β Templates and customization
- API Keys β Provider setup guide
- Architecture β How it works under the hood
- Contributing β Development setup
- π Local-first β FastEmbed runs entirely offline (macOS)
- π Secure β API keys stored locally, env vars supported
- π« Respects .gitignore β Never indexes sensitive files
- π‘οΈ MCP security β Local-only server, no external network for search
- π€ Cloud-safe β Embeddings process only metadata, never source code
- β Star us on GitHub β It really helps!
- π Report Issues
- π¬ Discussions
- π§ opensource@muvon.io
- π muvon.io
Apache License 2.0 β See LICENSE for details.
Built with π¦ Rust by Muvon in Hong Kong
β Star β’ π΄ Fork β’ π£ Share