A powerful, feature-rich AI chat application built in Go with a beautiful terminal GUI using Bubble Tea and Lipgloss.
- Beautiful Terminal GUI - Modern, responsive interface with scrolling, keyboard navigation, and visual indicators
- Multiple AI Models - Support for various AI models including GPT-4, Claude, and others
- API Key Management - Secure storage and management of multiple API keys
- Custom Prompts - Create and manage custom system prompts for different use cases
- Chat Management - Save, load, favorite, and organize your conversations
- Real-time Streaming - See AI responses as they're generated with a spinner indicator
- Stop Functionality - Cancel ongoing requests with Ctrl+S
- Custom Chat Creation - Specify API key, model, and prompt before starting a chat
- Scroll Controls - Navigate through long conversations with Page Up/Down, Home/End, and arrow keys
- Auto-scroll - Automatically scroll to new messages
- Vim-style Commands - Use
:g
to generate titles,:f
to favorite chats,:q
to quit - Clipboard Integration - Add API keys and prompts directly from clipboard
- Error Handling - Comprehensive error handling with user-friendly messages
- Go 1.22 or later
- Windows, macOS, or Linux
git clone https://github.com/aculd/go-ai-cli.git
cd go-ai-cli
go build -o aichat.exe .
Download the latest release from the Releases page.
-
Run the application:
./aichat.exe
-
Add your first API key:
- Navigate to "API Keys" → "Add API Key"
- Enter a name for your key
- Paste your API key (or press Enter to read from clipboard)
-
Start chatting:
- Choose "New Chat" for a quick start
- Or use "Custom Chat" to specify model and prompt
The application automatically creates the following directory structure on first run:
.util/
├── api_keys.json # API key storage
├── models.json # AI model configurations
├── prompts.json # Custom prompts
└── chats/ # Saved chat conversations
- Store multiple API keys with descriptive names
- Set an active key for current sessions
- Secure storage with proper file permissions
- Pre-configured with popular AI models
- Add custom models as needed
- Set default model for new chats
- Create custom system prompts
- Set default prompt for new chats
- Organize prompts by use case
- Use arrow keys (↑↓) to navigate
- Press Enter to select
- Press ESC to go back
- Press 'q' to quit
- Type your message and press Enter to send
- Ctrl+S to stop/cancel ongoing requests
- Ctrl+C to quit the application
- Page Up/Down to scroll through messages
- Home/End to jump to top/bottom
- Arrow keys to scroll when not typing
:g
- Generate chat title from last user message:f
- Toggle favorite status:q
- Save and quit
- Select "Custom Chat" from the Chats menu
- Choose your API key
- Select the AI model
- Pick a system prompt
- Start chatting with your custom configuration
The application supports various AI providers through OpenRouter:
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude)
- Meta (Llama)
- And many more
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Bubble Tea for the terminal UI framework
- Lipgloss for styling
- OpenRouter for AI model access
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include your operating system and Go version
- Please note this project was entirely vibe-coded 😎
Note: This application stores sensitive information (API keys) locally. Ensure your system is secure and never share your .util
directory.