A vector embedding-based code semantic search tool with MCP server and multi-model integration. Can be used as a pure CLI tool. Supports Ollama for fully local embedding and reranking, enabling complete offline operation and privacy protection for your code repository.
A vector embedding-based code semantic search tool with MCP server and multi-model integration. Can be used as a pure CLI tool. Supports Ollama for fully local embedding and reranking, enabling complete offline operation and privacy protection for your code repository
# Semantic code search - Find code by meaning, not just keywords
╭─ ~/workspace/autodev-codebase
╰─❯ codebase search "user manage" --demo
Found 20 results in 5 files for: "user manage"
==================================================
File: "hello.js"
==================================================
< class UserManager > (L7-20)
class UserManager {
constructor() {
this.users = [];
}
addUser(user) {
this.users.push(user);
console.log('User added:', user.name);
}
getUsers() {
return this.users;
}
}
……
# Call graph analysis - Trace function call relationships and execution paths
╭─ ~/workspace/autodev-codebase
╰─❯ codebase call --demo --query="app,addUser"
Connections between app, addUser:
Found 2 matching node(s):
- demo/app:L1-29
- demo/hello.UserManager.addUser:L12-15
Direct connections:
- demo/app:L1-29 → demo/hello.UserManager.addUser:L12-15
Chains found:
- demo/app:L1-29 → demo/hello.UserManager.addUser:L12-15
# Code outline with AI summaries - Understand code structure at a glance
╭─ ~/workspace/autodev-codebase
╰─❯ codebase outline 'hello.js' --demo --summarize
# hello.js (23 lines)
└─ Defines a greeting function that logs a personalized hello message and returns a welcome string. Implements a UserManager class managing an array of users with methods to add users and retrieve the current user list. Exports both components for external use.
2--5 | function greetUser
└─ Implements user greeting logic by logging a personalized hello message and returning a welcome message
7--20 | class UserManager
└─ Manages user data with methods to add users to a list and retrieve all stored users
12--15 | method addUser
└─ Adds a user to the users array and logs a confirmation message with the user's name.
🚀 Features
🔍 Semantic Code Search: Vector-based search using advanced embedding models
🔗 Call Graph Analysis: Trace function call relationships and execution paths
🌐 MCP Server: HTTP-based MCP server with SSE and stdio adapters
💻 Pure CLI Tool: Standalone command-line interface without GUI dependencies
⚙️ Layered Configuration: CLI, project, and global config management
🎯 Advanced Path Filtering: Glob patterns with brace expansion and exclusions
🌲 Tree-sitter Parsing: Support for 40+ programming languages
# Demo mode (recommended for first-time)
# Creates a demo directory in current working directory for testing
# Index & search
codebase index --demo
codebase search "user greet" --demo
# Call graph analysis
codebase call --demo --query="app,addUser"
# MCP server
codebase index --serve --demo
Single function: --query="main" - Shows call tree (upward + downward)
Default depth: 3 (avoids excessive output)
Multiple functions: --query="main,helper" - Analyzes connection paths between functions
Default depth: 10 (deeper search needed for path finding)
Supported Languages:
TypeScript/JavaScript (.ts, .tsx, .js, .jsx)
Python (.py)
Java (.java)
C/C++ (.c, .h, .cpp, .cc, .cxx, .hpp, .hxx, .c++)
C# (.cs)
Rust (.rs)
Go (.go)
🔍 Indexing & Search
# Index the codebase
codebase index --path=/my/project --force
# Search with filters
codebase search "error handling" --path-filters="src/**/*.ts"
# Search with custom limit and minimum score
codebase search "authentication" --limit=20 --min-score=0.7
codebase search "API" -l 30 -S 0.5
# Search in JSON format
codebase search "authentication" --json
# Clear index data
codebase index --clear-cache --path=/my/project
Project Config - ./autodev-config.json (or custom path via --config)
Global Config - ~/.autodev-cache/autodev-config.json
Built-in Defaults - Fallback values
Note: CLI arguments provide runtime override for paths, logging, and operational behavior. For persistent configuration (embedderProvider, API keys, search parameters), use config --set to save to config files.
# First start the MCP server in one terminal
codebase index --serve --port=3001
# Then connect via stdio adapter in another terminal (for IDEs that require stdio)
codebase stdio --server-url=http://localhost:3001/mcp
This project is a fork and derivative work based on Roo Code. We've built upon their excellent foundation to create this specialized codebase analysis tool with enhanced features and MCP server capabilities.
🌟 If you find this tool helpful, please give us a star on GitHub!
Made with ❤️ for the developer community
A
Autodev Codebase
anrgct·121 ดาว·
A vector embedding-based code semantic search tool with MCP server and multi-model integration. Can be used as a pure CLI tool. Supports Ollama for fully local embedding and reranking, enabling comple
A vector embedding-based code semantic search tool with MCP server and multi-model integration. Can be used as a pure CLI tool. Supports Ollama for fully local embedding and reranking, enabling complete offline operation and privacy protection for your code repository
ตรวจสอบล่าสุดเมื่อ 2026-11-05 A vector embedding-based code semantic search tool with MCP server and multi-model integration. Can be used as a pure CLI tool. Supports Ollama for fully local embedding and reranking, enabling complete offline operation and privacy protection for your code repository