This guide will help you get up and running with Octocode quickly.
Before you start, make sure you have:
- Octocode installed - See Installation Guide
- API keys configured - See API Keys Setup
- Git repository - Octocode works best with git repositories
cd /path/to/your/project# Index current directory
octocode index
# Watch for progress
octocode index --verboseWhat happens during indexing:
- Scans all supported files in your project
- Extracts code symbols and structure
- Generates embeddings for semantic search
- Builds knowledge graph relationships
- Stores everything in local database
# Basic semantic search
octocode search "user authentication"
# Search specific content types
octocode search "database connection" --mode code
octocode search "API documentation" --mode docs# Combine related terms for comprehensive results
octocode search "authentication" "middleware"
octocode search "jwt" "token" "validation"
octocode search "database" "connection" "pool"# 1. Start watching for changes (optional)
octocode watch &
# 2. Work on your code...
# Files are automatically indexed as you work
# 3. Search for relevant code
octocode search "error handling patterns"
# 4. Use AI-powered git workflow
git add .
octocode commit # Generates intelligent commit message
# 5. Review your changes
octocode review --focus securityoctocode config --show# Use faster local models (requires fastembed feature)
octocode config \
--code-embedding-model "fastembed:BAAI/bge-small-en-v1.5" \
--text-embedding-model "fastembed:multilingual-e5-small"
# Or use current cloud defaults (recommended)
octocode config \
--code-embedding-model "voyage:voyage-code-3" \
--text-embedding-model "voyage:voyage-3.5-lite"octocode config --graphrag-enabled true
octocode config --max-results 20 --similarity-threshold 0.65
## MCP Server for AI Assistants
### Basic MCP Setup
1. **Start the server:**
```bash
octocode mcp --path /path/to/your/project
-
Configure in Claude Desktop:
{ "mcpServers": { "octocode": { "command": "octocode", "args": ["mcp", "--path", "/path/to/your/project"] } } } -
Use with AI assistant:
- Ask: "Search for authentication functions in my codebase"
- Ask: "What are the main components in this project?"
- Ask: "Remember this bug fix for future reference"
# Start with language server support
octocode mcp --path /path/to/rust/project --with-lsp "rust-analyzer"
octocode mcp --path /path/to/python/project --with-lsp "pylsp"# Understand new codebase
octocode view "**/*.rs" --md > project-overview.md
octocode graphrag overview --md > architecture.md
# Find similar patterns
octocode search "error handling" --expand# Find code patterns by AST structure
octocode grep '$FUNC.unwrap()' --lang rust
octocode grep 'new $CLASS($$$ARGS)' --lang javascript
octocode grep 'return nil' --lang go# Find related code
octocode search "authentication" "session" "login"
# Search for specific patterns
octocode search "TODO" "FIXME" --mode all
# Review recent changes
git add .
octocode review --severity high# Generate API documentation
octocode view "src/**/*.rs" --json > api-docs.json
# Create project structure overview
octocode graphrag overview --md > STRUCTURE.md# Use faster embedding models
octocode config --code-embedding-model "fastembed:all-MiniLM-L6-v2"
# Disable GraphRAG temporarily
octocode config --graphrag-enabled false# Adjust similarity threshold
octocode config --similarity-threshold 0.4 # More results
octocode config --similarity-threshold 0.7 # Fewer, more relevant results
# Try different search modes
octocode search "your query" --mode code # Only code
octocode search "your query" --mode docs # Only documentation
# Use multi-query search
octocode search "authentication" "login" "security"
# Check available models
octocode models list# Switch to local models (requires fastembed feature)
octocode config \
--code-embedding-model "fastembed:Xenova/all-MiniLM-L6-v2" \
--text-embedding-model "fastembed:intfloat/multilingual-e5-small"Once you're comfortable with the basics:
- Explore Advanced Features - See Advanced Usage
- Optimize Performance - See Performance Guide
- Set Up MCP Integration - See MCP Integration
- Configure for Your Workflow - See Configuration Guide
- Documentation: Browse all guides in the
doc/directory - Issues: GitHub Issues
- Email: opensource@muvon.io