Advanced Usage
// Multiple Provider Configuration
Configure multiple providers and switch between them:
# ~/.elith/config.toml
[providers.claude]
api_key = "sk-ant-..."
model = "claude-3-5-sonnet-20241022"
enabled = true
[providers.lmstudio]
base_url = "http://localhost:1234/v1"
model = "local-model"
enabled = true
[providers.openrouter]
api_key = "sk-or-..."
model = "anthropic/claude-3.5-sonnet"
enabled = false
Switch providers by enabling/disabling them in the config file.
// Context Engine Tuning
The context engine selects 4-6 files per task. You can influence selection by:
Create an Obsidian vault in your project to provide context:
your-project/
├── .obsidian/
├── docs/
│ ├── architecture/
│ │ └── system-design.md
│ ├── standards/
│ │ └── coding-standards.md
│ └── tasks/
│ └── current-sprint.md
The context engine reads these markdown files to understand:
- Project architecture
- Coding standards
- Current priorities
- Technical decisions
The context engine prioritizes files with relevant names:
README.md,ARCHITECTURE.md- High priority- Files matching the task keywords
- Recently modified files
- Test files related to the target
Organize code logically:
src/
├── auth/ # Authentication module
├── cache/ # Caching layer
├── api/ # API routes
└── utils/ # Utilities
Clear structure helps the context engine select relevant files.
// Using Local LLMs
LM Studio
- Download and install LM Studio
- Load a model (e.g., CodeLlama, DeepSeek Coder)
- Start the local server (default:
http://localhost:1234) - Configure Elith:
[providers.lmstudio]
base_url = "http://localhost:1234/v1"
model = "local-model" # Use the model name from LM Studio
enabled = true
- Use Elith normally:
elith explain src/auth/login.tsRecommended Local Models
For code tasks:
- DeepSeek Coder 33B - Best for code generation
- CodeLlama 34B - Good for explanations
- Phind CodeLlama 34B - Optimized for coding
For general tasks:
- Mistral 7B - Fast, good quality
- Llama 2 13B - Balanced performance
// Session Management
View Session History
# List all sessions
ls -la bob-reports/
# View a specific session
cat bob-reports/session_20260518_123045_abc123.md
Session Log Format
Each session log contains:
# Elith Session Report
**Session ID:** abc123
**Started:** 2026-05-18T12:30:45Z
**Operation:** refactor
**Provider:** claude-3-5-sonnet-20241022
## Context
- Files analyzed: 6
- Total tokens: 8,234
## Conversation
[Full LLM conversation transcript]
## Skills Used
1. read_file: src/cache/redis-client.ts
2. write_file: src/cache/connection-pool.ts
3. search_code: pattern="redis.createClient"
## Results
- Files modified: 4
- Lines added: 127
- Lines removed: 89
// Service Management
Start/Stop Backend
# Start backend (auto-starts on first CLI use)
elith service start
# Check status
elith service status
# Restart backend
elith service restart
# Stop backend
elith service stop
Backend Configuration
The backend runs on http://localhost:8000 by default. It:
- Auto-starts when you run any
elithcommand - Runs in the background
- Logs to
~/.elith/logs/ - Can be managed via
elith servicecommands
// Environment Variables
Override config with environment variables:
# Use a different provider for one command
ANTHROPIC_API_KEY=sk-ant-... elith explain src/app.ts
# Use a different model
ANTHROPIC_MODEL=claude-3-opus-20240229 elith architect "Design new feature"
# Use OpenRouter
OPENROUTER_API_KEY=sk-or-... elith refactor "Optimize database queries"
// Debugging
Enable Verbose Logging
# Set log level in config
[logging]
level = "DEBUG"
Check Backend Logs
tail -f ~/.elith/logs/backend.log
Test Provider Connection
# Test if provider is working
elith explain --test
// Performance Tips
- Keep Obsidian vault concise - Only include essential docs
- Use specific file paths -
elith explain src/auth/login.tsis faster thanelith explain src/ - Local LLMs - Faster for small tasks, no API costs
- Session cleanup - Periodically clean old sessions from
bob-reports/
// Limitations
Current limitations (as of v0.1.0):
- No parallel agent execution (single provider per task)
- No approval gates (all changes are made immediately)
- No webhooks or callbacks
- No spend limits or token tracking
- Context engine uses simple heuristics (not ML-based)
These features are planned for future releases.
// Next Steps
- Integrations — CI/CD integration
- API Reference — REST endpoints
- Troubleshooting — Common issues