Chat with AI from your terminal. Track costs automatically.
npm install -g cost-katana-cli# Setup (one-time)
cost-katana init
# Start chatting
cost-katana chat- Interactive Chat - Real-time chat with AI
- Quick Questions - Single-question mode
- Model Selection - Choose and compare models
- With Caching - Save costs with cache
- With Optimization - Enable Cortex
- Cost Comparison - Compare model costs
- Budget Tracking - Set spending limits
- Enable Cortex - 40-75% cost savings
- Long-Form Content - Blog posts, articles
- Workflows - Batch processing, piped input, daily routines
- Automation & CI/CD - GitHub Actions, cron jobs, hooks
- Configuration - Config files, profiles, project settings
# Basic chat
cost-katana chat
# With specific model
cost-katana chat --model claude-3-sonnet
# With system prompt
cost-katana chat --system "You are a coding expert"
# With Cortex optimization
cost-katana chat --cortex# Single question
cost-katana ask "What is Docker?"
# Save to file
cost-katana ask "Explain Python" --output answer.md
# Different model
cost-katana ask "Write a poem" --model gpt-4# View spending
cost-katana analyze
# Last 7 days
cost-katana analyze --days 7
# Export to CSV
cost-katana analyze --export costs.csv# List available models
cost-katana models
# Filter by provider
cost-katana models --provider openai
# Show with prices
cost-katana models --prices# Set daily budget
cost-katana budget set --daily 10
# Check status
cost-katana budget status
# Get alerts
cost-katana budget alertsWhile in a chat session:
help- Show commandscost- Show session costmodels- Switch modelclear- Clear historysave- Save conversationquit- Exit
# View current config
cost-katana config
# Update default model
cost-katana config set model gpt-4
# Set temperature
cost-katana config set temperature 0.7# Alternative to init command
export COST_KATANA_API_KEY="dak_your_key"
export COST_KATANA_MODEL="gpt-4"$ cost-katana chat --system "You are a senior developer. Be concise."
You: Review this code: [paste code]
AI: Here are the issues...
💰 Cost: $0.0045
You: How do I fix issue #2?
AI: Here's how to fix it...
💰 Session: $0.0067$ cost-katana chat --model gpt-4 --cortex
You: Write a blog post about AI
AI: [Generates comprehensive post with 70% cost savings]
💰 Cost: $0.0123 (saved $0.041 with Cortex!)# Get quick answers
$ cost-katana ask "How to use async/await in JavaScript?"
> Async/await is used for handling asynchronous operations...
💰 Cost: $0.0002
# Save to file
$ cost-katana ask "Python best practices" --output best-practices.md
✅ Saved to best-practices.md# For simple questions (10x cheaper)
cost-katana chat --model gpt-3.5-turbo
# For complex analysis
cost-katana chat --model gpt-4# 40-75% savings on long-form content
cost-katana chat --cortex# Free repeated answers
cost-katana chat --cache- Complex setup with multiple API keys
- Different commands for each provider
- No cost visibility
- No optimization
- Simple 2-step setup
- One command for all providers
- Real-time cost tracking
- Built-in 40-75% optimization
- Dashboard integration
- ✅ Universal AI access (all providers)
- ✅ Real-time cost tracking
- ✅ 40-75% cost savings with Cortex
- ✅ Smart caching
- ✅ Budget alerts
- ✅ Beautiful terminal UI
- ✅ Conversation history
- ✅ Dashboard integration
All CLI usage is automatically tracked at costkatana.com/dashboard:
- Real-time cost tracking
- Usage by model
- Daily/weekly/monthly stats
- Budget alerts
- Optimization recommendations
# Re-run init
cost-katana init
# Or set environment variable
export COST_KATANA_API_KEY="dak_your_key"# List available models
cost-katana models
# Try a different model
cost-katana chat --model gpt-3.5-turbo# CLI automatically retries
# Try a different model if persistent
cost-katana chat --model claude-3-haiku- Docs: docs.costkatana.com/cli
- NPM: npmjs.com/package/cost-katana-cli
- GitHub: github.com/Hypothesize-Tech/costkatana-cli
- Discord: discord.gg/Wcwzw8wM
Start chatting with AI in your terminal!
npm install -g cost-katana-cli
cost-katana init
cost-katana chat