A powerful, privacy-focused AI assistant for your terminal
TermAI is a versatile command-line AI assistant built in Rust that brings the power of modern large language models directly to your terminal. It supports both OpenAI and Anthropic Claude APIs (now with Claude Opus 4 support) with a focus on privacy, speed, and developer productivity.
- Multi-Provider Support: Works with both OpenAI and Claude APIs
- Claude Opus 4: Now powered by Anthropic's most capable model with superior intelligence
- Local Context Understanding: Analyze your code and files for more relevant responses
- Session Management: Save and restore conversations for later reference
- Privacy-Focused: Redact sensitive information before sending to APIs
- Developer-Optimized: Perfect for generating code, explaining concepts, and assisting with daily dev tasks
- Fully Terminal-Based: No web interfaces or external dependencies needed
- Fast Response Times: Asynchronous processing with progress indicators
- Rust and Cargo
- API key from OpenAI or Anthropic Claude
git clone https://github.com/kyco/termai.git
cd termai
cargo install --path .
Set up TermAI with your API keys:
termai --chat-gpt-api-key YOUR_OPENAI_API_KEY
termai --claude-api-key YOUR_CLAUDE_API_KEY
termai --provider claude # or openapi
# Ask a simple question
termai "What is the capital of France?"
# Get coding advice
termai "How do I implement binary search in Rust?"
# Create a README for your project
termai "Create a README for this project" .
# Generate tests for a specific file
termai "Write unit tests for this file" ./src/main.rs
# Provide explanations for complex code
termai "Explain what this function does" ./path/to/complex_code.rs
git diff | termai "Write a concise git commit message"
git show | termai "Explain what changes were made in this commit"
termai --session my_project "Tell me about Rust's ownership model"
termai --sessions-all
termai --redact-add "supersecretpassword"
termai --redact-list
termai --redact-remove "supersecretpassword"
TermAI is built with a clean architecture focusing on:
- Repository Pattern: Data access through well-defined interfaces
- Service Layer: Business logic separated from presentation
- Modular Design: Support for multiple LLM providers
- Local Storage: SQLite for configuration and session persistence
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
Please ensure your code follows the project's coding style and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Stream responses for faster feedback
- Auto-completion plugins for common shells
- Voice input/output support
- Additional LLM providers
- Custom fine-tuned models
Made with โค๏ธ by kyco