Troubleshooting
Common issues, solutions, and frequently asked questions for BobaMixer.
Quick Diagnostics
When encountering issues, always start with:
boba doctorThis checks:
- Configuration file syntax
- File permissions
- Database connectivity
- API endpoint accessibility
- Profile validity
Common Issues
Installation Issues
Command Not Found
Problem: bash: boba: command not found
Solutions:
Check if installed:
bashwhich bobaIf using Go install, add GOPATH to PATH:
bashexport PATH=$PATH:$(go env GOPATH)/bin # Add to ~/.bashrc or ~/.zshrc for persistenceIf using manual install, verify location:
bashls -l /usr/local/bin/bobaMake executable:
bashsudo chmod +x /usr/local/bin/boba
Permission Denied
Problem: permission denied: /usr/local/bin/boba
Solutions:
# Make executable
sudo chmod +x /usr/local/bin/boba
# Or reinstall with correct permissions
sudo mv boba /usr/local/bin/
sudo chmod +x /usr/local/bin/bobamacOS Security Warning
Problem: "boba cannot be opened because it is from an unidentified developer"
Solutions:
- Open System Preferences → Security & Privacy
- Click Allow Anyway next to the BobaMixer warning
- Try running
bobaagain
Or remove quarantine:
xattr -d com.apple.quarantine /usr/local/bin/bobaConfiguration Issues
Secrets File Permission Error
Problem: secrets.yaml must have 0600 permissions
Solution:
chmod 600 ~/.boba/secrets.yaml
# Verify
ls -l ~/.boba/secrets.yaml
# Should show: -rw-------YAML Syntax Error
Problem: error parsing config: yaml: line X: ...
Solutions:
Validate YAML syntax:
bashyamllint ~/.boba/profiles.yamlCommon YAML mistakes:
- Incorrect indentation (use 2 spaces, not tabs)
- Missing quotes around special characters
- Invalid characters in keys or values
Example fixes:
yaml# Wrong headers: x-api-key: secret://anthropic_key # Right headers: x-api-key: "secret://anthropic_key"
Secret Not Found
Problem: secret not found: anthropic_key
Solutions:
Check secret exists:
bashgrep "anthropic_key" ~/.boba/secrets.yamlVerify reference format:
yaml# Correct x-api-key: "secret://anthropic_key" # Wrong x-api-key: "secret://anthropic_key/" x-api-key: "secret:anthropic_key"Add missing secret:
bashboba edit secrets # Add: anthropic_key: sk-ant-your-key
Configuration Directory Not Found
Problem: config directory not found: ~/.boba
Solution:
# Create directory
mkdir -p ~/.boba/logs
chmod 700 ~/.boba
# Generate default configs
boba doctorDatabase Issues
Database Locked
Problem: database is locked
Solutions:
Find processes using database:
bashlsof ~/.boba/usage.dbKill if necessary:
bashpkill -f bobaRemove stale locks:
bashrm -f ~/.boba/usage.db-shm ~/.boba/usage.db-walTest:
bashboba stats --today
Database Corruption
Problem: database disk image is malformed
Solutions:
Restore from backup:
bashcp ~/.boba/usage.db.backup ~/.boba/usage.dbIf no backup, try to recover:
bash# Dump to SQL sqlite3 ~/.boba/usage.db .dump > dump.sql # Create new database mv ~/.boba/usage.db ~/.boba/usage.db.corrupt sqlite3 ~/.boba/usage.db < dump.sql # Verify sqlite3 ~/.boba/usage.db "PRAGMA integrity_check;"If recovery fails, start fresh:
bashmv ~/.boba/usage.db ~/.boba/usage.db.corrupt boba doctor # Creates new database
Slow Database Queries
Problem: Stats commands are slow
Solutions:
Vacuum database:
bashsqlite3 ~/.boba/usage.db "VACUUM;"Analyze:
bashsqlite3 ~/.boba/usage.db "ANALYZE;"Enable WAL mode:
bashsqlite3 ~/.boba/usage.db "PRAGMA journal_mode=WAL;"Increase cache:
bashsqlite3 ~/.boba/usage.db "PRAGMA cache_size=-10000;" # 10MB
API Issues
API Call Failed
Problem: API call failed: connection refused
Solutions:
Check internet connectivity:
bashping api.anthropic.comTest endpoint manually:
bashcurl -v https://api.anthropic.com/v1/messagesVerify API key:
bash# Check key exists grep "anthropic_key" ~/.boba/secrets.yaml # Test with curl curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: YOUR-KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-3-5-sonnet-20241022","max_tokens":10,"messages":[{"role":"user","content":"test"}]}'Check firewall/proxy:
bash# If behind proxy export HTTP_PROXY=http://proxy.example.com:8080 export HTTPS_PROXY=http://proxy.example.com:8080
Invalid API Key
Problem: authentication failed: invalid API key
Solutions:
Verify key format:
- Anthropic:
sk-ant-api03-... - OpenAI:
sk-proj-...orsk-... - OpenRouter:
sk-or-v1-...
- Anthropic:
Check for whitespace:
bash# Should have no leading/trailing spaces grep "anthropic_key" ~/.boba/secrets.yaml | cat -ATest key directly:
bash# Get key KEY=$(grep "anthropic_key:" ~/.boba/secrets.yaml | cut -d: -f2 | tr -d ' ') # Test curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{"model":"claude-3-5-sonnet-20241022","max_tokens":10,"messages":[{"role":"user","content":"test"}]}'Regenerate key if needed
Rate Limited
Problem: rate limit exceeded
Solutions:
- Wait before retrying
- Check provider's rate limits
- Use different profile:bash
boba use alternate-profile - Contact provider to increase limits
Routing Issues
Rule Not Matching
Problem: Wrong profile selected
Solutions:
Test routing:
bashboba route test "your text here"Enable verbose mode:
bashboba route test --verbose "your text here"Check rule order (first match wins):
yaml# Wrong order rules: - if: "ctx_chars > 0" # Matches everything! use: cheap - if: "ctx_chars > 50000" # Never reached use: expensive # Correct order rules: - if: "ctx_chars > 50000" use: expensive - if: "ctx_chars > 0" use: cheapValidate routing config:
bashboba route validate
Regex Not Working
Problem: text.matches() not matching expected text
Solutions:
Test regex:
bash# Python python3 -c "import re; print(re.search(r'your.*pattern', 'your test text'))" # Or use online tester: regex101.comCommon regex mistakes:
yaml# Wrong: escaped pipe if: "text.matches('format\\|prettier')" # Right: pipe is OR operator if: "text.matches('format|prettier')" # Wrong: unescaped special characters if: "text.matches('function()')" # Right: escape parentheses if: "text.matches('function\\(\\)')"Use word boundaries:
yaml# Wrong: matches "format" in "information" if: "text.contains('format')" # Right: matches whole word only if: "text.matches('\\bformat\\b')"
Budget Issues
Budget Not Tracking
Problem: Budget status shows $0
Solutions:
Check database has data:
bashsqlite3 ~/.boba/usage.db "SELECT COUNT(*) FROM usage_records;"Verify cost calculations:
bashboba stats --todayCheck pricing config:
bashboba edit pricingView estimate accuracy:
bashboba stats --by-estimate
Inaccurate Cost Estimates
Problem: Costs seem wrong
Solutions:
Check estimation level:
bashboba stats --by-estimateAdd exact pricing:
bashboba edit pricing # Add model pricingVerify profile costs:
bashboba ls --profiles --verboseCompare with provider bills
Alerts Not Showing
Problem: No budget alerts despite high spending
Solutions:
Check budget configured:
bashboba budget --statusVerify alert thresholds:
bashcat ~/.boba/profiles.yaml | grep -A 5 budgetCheck action queue:
bashboba actionView in TUI:
bashboba # Check notifications panel
TUI Issues
Garbled Display
Problem: TUI looks broken or garbled
Solutions:
Check terminal type:
bashecho $TERM # Should be xterm-256color or similarSet terminal type:
bashexport TERM=xterm-256color bobaDisable colors if needed:
bashexport NO_COLOR=1 bobaTry different terminal emulator
TUI Not Refreshing
Problem: Dashboard not updating
Solutions:
Check refresh rate:
bashboba --refresh-rate 2 # 2 secondsRestart TUI:
- Press
qto quit - Run
bobaagain
- Press
Check for errors in logs:
bashtail -f ~/.boba/logs/boba.log
Performance Issues
Slow Commands
Problem: All boba commands are slow
Solutions:
Check database size:
bashdu -h ~/.boba/usage.dbVacuum database:
bashsqlite3 ~/.boba/usage.db "VACUUM;"Cleanup old data:
bashsqlite3 ~/.boba/usage.db "DELETE FROM usage_records WHERE ts < strftime('%s', 'now', '-90 days');" sqlite3 ~/.boba/usage.db "VACUUM;"Optimize database:
bashsqlite3 ~/.boba/usage.db "PRAGMA optimize;" sqlite3 ~/.boba/usage.db "ANALYZE;"
High Memory Usage
Problem: BobaMixer using too much memory
Solutions:
Check memory:
bashps aux | grep bobaReduce TUI refresh rate:
bashboba --refresh-rate 10 # 10 secondsLimit query size:
bash# Instead of --30d, use shorter periods boba stats --7d
Frequently Asked Questions
General
What is BobaMixer?
BobaMixer is a CLI tool for tracking, analyzing, and optimizing AI/LLM API usage and costs. It helps you understand spending patterns and make data-driven decisions about model selection.
Is BobaMixer free?
Yes! BobaMixer is open-source under the MIT license. You only pay for API usage from your providers.
Does BobaMixer intercept my API calls?
No. BobaMixer is a tracking tool. You explicitly invoke it when you want to track usage.
Installation
Which installation method should I use?
- Homebrew: Easiest for macOS/Linux
- Go install: Good if you have Go installed
- Binary: Good for servers or without Go
- Source: For development or custom builds
Can I install BobaMixer on Windows?
Yes, via WSL (Windows Subsystem for Linux). Native Windows support is planned.
Configuration
Where are configurations stored?
Default: ~/.boba/
Override with: export BOBA_HOME=/custom/path
Can multiple users share configurations?
Yes! Use symlinks for shared configs, keep individual secrets:
ln -s /shared/boba/profiles.yaml ~/.boba/profiles.yaml
cp my-secrets.yaml ~/.boba/secrets.yaml
chmod 600 ~/.boba/secrets.yamlHow do I migrate from another tool?
Currently manual. Export data from other tool, import to BobaMixer database, or start fresh.
Usage
How accurate are cost estimates?
- Exact (API response): 100%
- Mapped (pricing config): 95-99%
- Heuristic (character-based): 70-90%
Check with: boba stats --by-estimate
Can budgets block API calls?
No. BobaMixer uses "alert, don't interrupt" philosophy. You get warnings but work is never blocked.
How do I backup my data?
# Backup database
sqlite3 ~/.boba/usage.db ".backup /path/to/backup.db"
# Backup configs
cp -r ~/.boba ~/.boba.backupTroubleshooting
How do I reset everything?
# Backup first!
cp -r ~/.boba ~/.boba.backup
# Remove all data
rm -rf ~/.boba
# Reinitialize
boba doctorHow do I enable debug logging?
export BOBA_LOG_LEVEL=debug
boba doctor
# Check logs
tail -f ~/.boba/logs/boba.logDatabase is too large
# Check size
du -h ~/.boba/usage.db
# Cleanup old records
sqlite3 ~/.boba/usage.db "DELETE FROM usage_records WHERE ts < strftime('%s', 'now', '-90 days');"
sqlite3 ~/.boba/usage.db "VACUUM;"Getting Help
Self-Service Resources
Run diagnostics:
bashboba doctor --verboseCheck logs:
bashtail -f ~/.boba/logs/boba.logReview documentation:
Community Support
- GitHub Discussions: Ask questions
- GitHub Issues: Report bugs
- Documentation: Full docs
Reporting Bugs
When reporting issues, include:
Version:
bashboba versionDiagnostic output:
bashboba doctor --verbose > diagnostics.txtLogs (remove sensitive data):
bashtail -n 100 ~/.boba/logs/boba.log > recent-logs.txtSteps to reproduce
Expected vs actual behavior
Error messages
Feature Requests
Open a GitHub issue with:
- Use case: Why do you need this feature?
- Proposed solution: How should it work?
- Alternatives: What have you tried?
Known Issues
Issue: SQLite Version Too Old
Problem: Some Linux distributions ship with SQLite < 3.0
Workaround: Install newer SQLite
# Ubuntu/Debian
sudo apt-get install sqlite3 libsqlite3-dev
# Fedora/RHEL
sudo dnf install sqlite sqlite-develIssue: Git Hooks Not Triggering
Problem: Hooks installed but not running
Workaround: Verify git hooks path
git config core.hooksPath
# Should output: .git/hooks or custom path
# Reinstall
boba hooks install --forceNext Steps
- Operations Guide - Production best practices
- CLI Reference - Command documentation
- Configuration - Setup guide
- GitHub Issues - Report bugs