Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.5 KB

File metadata and controls

59 lines (44 loc) · 1.5 KB

~> CLI Usage

The Code Indexer provides a comprehensive command-line interface for all operations.

Basic Commands

# Index a directory
python main.py index /path/to/your/code --force

# Start the API server
python main.py server --host 127.0.0.1 --port 8000

# Show index statistics
python main.py stats

Search Commands

# Basic search
python main.py search "function_name" --type symbol --limit 20

# Search files
python main.py search "config" --type file

# Search dependencies
python main.py search "requests" --type dependency

AI Analysis Commands (Groq)

# Analyze code with AI
python main.py analyze "explain this authentication logic" --file auth.py

# Analyze specific symbol
python main.py analyze "how does this function work" --symbol login_user

LlamaIndex RAG Commands (Natural Language)

# Natural language queries
python main.py query "How does the authentication system work?"
python main.py query "Show me examples of error handling patterns"
python main.py query "What functions are related to user management?"

# Code explanations with context
python main.py explain "What does the parse_file function do?" --context 5

# Find similar patterns
python main.py patterns "async def function_name" --language python

# Architecture analysis
python main.py architecture "payment processing system"

# Best practices finder
python main.py best-practices "database connection handling"

# Complexity analysis
python main.py complexity --file src/models/user.py