A powerful command-line AI assistant that helps you get answers to your questions directly from your terminal. Supports multiple AI providers including OpenAI and Groq.
- 🔍 Ask questions directly from your terminal
- 🤖 Multiple AI provider support (OpenAI, Groq)
- ⚙️ Configurable model selection
- 🔑 Secure API key management
- 🎨 Beautiful terminal output formatting
- 📝 Markdown support in responses
- Bun (v1.0.0 or later)
- Node.js (v18 or later)
- Clone the repository:
git clone https://github.com/yourusername/terminal-ai.git
cd terminal-ai
- Install dependencies:
bun install
bun run index.ts "your question here"
# Specify AI provider
bun run index.ts "your question" --provider openai
# Specify model
bun run index.ts "your question" --model gpt-4
# Reset API keys
bun run index.ts --reset
Add the following to your ~/.zshrc
or ~/.bashrc
:
alias ask-ai="bun run /path/to/terminal-ai/index.ts"
Then reload your shell:
source ~/.zshrc # or source ~/.bashrc
Now you can use:
ask-ai "your question"
- OpenAI
- Groq
- OpenAI: gpt-3.5-turbo, gpt-4, etc.
- Groq: mixtral-8x7b-32768, llama2-70b-4096, etc.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.