A terminal-native AI coding assistant built with Python and xAI's models.
pipx install cli-ai-coderOr with pip:
pip install cli-ai-coderbrew install cli-ai-codergit clone https://github.com/yourusername/cli-ai-coder.git
cd cli-ai-coder
pip install -e .Set your xAI API key:
export XAI_API_KEY="your-api-key-here"For other providers, see configuration below.
Launch the editor:
ccode open [path]Other commands:
ccode doctor # Check environment and providers
ccode plan # Run planner
ccode pipeline # Run pipeline
ccode index --rebuild # Rebuild code index- Alt+A: AI panel
- Alt-D: Diagnostics
- Alt-G: Git panel
- Alt-P: Planner
- Alt-W: Playground
- Alt-O: Organize imports
- Alt-.: LSP Quick Fix
- Tab: Accept inline suggestion
- Alt-]: Next inline suggestion
- Esc: Dismiss inline suggestion
Create ~/.cli_ai_coder.toml:
[ai]
provider = "xai" # or "openai", "ollama"
[billing]
monthly_budget_usd = 5.0
soft_limit_ratio = 0.8
hard_stop = false
[inline_suggest]
enabled = true
idle_ms = 800
max_chars = 120
model = "grok-code-fast-1":budget- Show current budget status:budget-set 10- Set monthly budget to $10:budget-reset- Reset budget for current month:budget-export- Export budget history to CSV
Run tests:
pytestBuild package:
python -m build