π₯οΈ AITerm-CLI - Terminal AI Chat for Old-School Hackers πΎ
Remember when the best tools lived in the terminal? AITerm-CLI brings that magic back. A retro-styled terminal interface, powered by Python, that connects you with the most powerful AI models: OpenAI's GPT, Anthropic's Claude, DeepSeek, and any OpenAI-compatible API.
πΉοΈ For true command-line devotees - Those old-school developers who prefer vim over VS Code, think GUIs are for rookies, and know that real productivity happens where the cursor blinks. β‘ No breaking your workflow. No annoying windows. Just you, your favorite terminal, and the power of AI one command away. Because real developers never leave the terminal. π€
Vintage computing vibes meets cutting-edge AI β¨
0.9.5 Stable Release
- OpenAI (GPT-3.5, GPT-4, GPT-4o, o1, o3)
- Anthropic Claude (Claude-3, Claude-3.5, Claude Sonnet 4)
- DeepSeek (DeepSeek-Chat, DeepSeek-Coder, DeepSeek-V3)
- OpenRouter (GPT-4, GPT-4o, Claude-3.5-Sonnet, Claude-3-Opus, Gemini-Pro, Llama-3.1-405B, Mistral-Large, DeepSeek-V3, DeepSeek-R1, Qwen-2.5-72B, Command-R+)
- Custom APIs (Any OpenAI-compatible endpoint)
- Interactive Setup - First-run configuration wizard
- Persistent Configuration - Your settings are saved automatically
- Session Logging - Optional conversation history with timestamps
- Audio Feedback - Customizable notification sounds (with quick disable)
- Smart Markdown Formatting - Beautiful headers, lists, tables, and code blocks
- Retro Mode - Clean slate after each response for focused interactions
- Table Support - Clean markdown table rendering with multiple border styles
- Stealth Mode - Minimal UI for distraction-free sessions
- Color Toggle - Enable/disable colored output on the fly
- Smart Code Detection - Automatically detects and preserves code formatting
- Context Management - Set custom system prompts for specialized tasks
- History Navigation - Review and clear conversation history
- Raw Output - View unformatted responses when needed
- Connection Testing - Verify API connectivity and model availability
- Debug Mode - Detailed timing and process information
pip install aiterm-cli
aiterm-cli-
Clone the repository
git clone https://github.com/fosilinx/AITerm-CLI.git cd AITerm-CLI -
Install dependencies
pip install openai pip install wcwidth
-
Run AITerm-CLI
python AITerm-CLI.py
On first launch, AITerm-CLI will guide you through configuration:
-
Choose your AI provider
- Select from OpenAI, Anthropic, DeepSeek, or custom URL
-
Enter your API key
- Your key is stored locally in
AITerm-CLI_config.json
- Your key is stored locally in
-
Select a model
- Browse available models for your provider
-
Optional: Set system context
- Define how the AI should behave
Recommended system context for optimal performance of all features "You are an intelligent and helpful assistant. Respond concisely and accurately.\nAlways Always use markdown format for responses, avoid using ``` and the language name if it is code, and do not use emojis."
{
"api_url": "https://api.openai.com/v1",
"api_key": "your-api-key",
"model": "gpt-4",
"provider": "OpenAI",
"system_context": "You are an intelligent and helpful assistant. Respond concisely and accurately.\nAlways Always use markdown format for responses, avoid using ``` and the language name if it is code, and do not use emojis."
}> Hello, can you help me debug this Python function?| Command | Description |
|---|---|
/exit, quit, exit |
Exit the application |
/clear |
Clear screen and conversation history |
/history |
View conversation history |
/raw |
Show last unformatted response |
/context |
View current system prompt |
/setcontext |
Modify system prompt |
/resetcontext |
Reset system prompt |
/config |
View current configuration |
/reconfig |
Reconfigure API settings |
/changeai |
Change AI provider (resets configuration) |
/beep |
Toggle notification beep |
/beepoff |
Disable notification beep |
/testbeep |
Test notification sound |
/testapi |
Test API connection |
/colors |
Toggle color output |
/tablestyle |
Switch table border style (box/ascii) |
/models |
List available models |
/debug |
Toggle debug mode |
/retro |
Toggle retro answer mode |
/help |
Show all commands |
python AITerm-CLI.py -c "You are a senior Python developer focused on clean, efficient code."python AITerm-CLI.py -cf system_prompt.txtpython AITerm-CLI.py --logpython AITerm-CLI.py --no-beeppython AITerm-CLI.py --retropython AITerm-CLI.py --debugAITerm-CLI stores configuration in AITerm-CLI_config.json:
{
"api_url": "https://api.openai.com/v1",
"api_key": "your-api-key",
"model": "gpt-4",
"provider": "OpenAI",
"system_context": "You are a helpful assistant."
}When logging is enabled, conversations are saved to history_terminal_AI/session_YYYYMMDD_HHMMSS.txt with:
- Session metadata (provider, model, timestamp)
- Complete conversation history
- Command history
- Timestamps for each interaction
Place your custom beep sound at sounds/beep-02.wav to override the default system beep.
Switch between two beautiful table styles:
- Box (default): Elegant Unicode borders
ββββββ - ASCII: Classic terminal style
+-+||
Use /tablestyle to toggle between styles.
AITerm-CLI automatically detects code content and preserves formatting for:
- Programming languages (Python, JavaScript, Java, C++, Go, Rust, etc.)
- COBOL and legacy languages
- SQL queries
- Shell scripts
- Markup languages (HTML, XML)
- Configuration files
Triple backticks (```) in responses are properly handled by the markdown formatter.
Perfect for presentations or teaching - each response is isolated:
- Get AI response
- Press Enter
- Screen clears
- Fresh conversation starts
Easily switch between models to compare responses:
> /models # List available models
> /reconfig # Switch to different modelPerfect for different types of tasks:
> /setcontext # Change context for coding tasks
> /resetcontext # Set up for writing tasks> /testapi # Verify connection
> /config # Check current settings
> /raw # See unprocessed responses
> /debug # Toggle detailed logging- Python 3.6+
- openai library (
pip install openai) - API key from your chosen provider
- wcwidth (optional, for better unicode support)
For enhanced audio feedback:
- Windows: Built-in
winsound - Linux:
aplay,paplay, orplay - macOS:
afplay
usage: AITerm-CLI.py [-h] [-c CONTEXT] [-cf CONTEXT_FILE] [-nb] [-lo] [-d] [-r]
AI Terminal - Chat with various AI providers
optional arguments:
-h, --help show this help message and exit
-c CONTEXT, --context CONTEXT
System context/prompt for the AI
-cf CONTEXT_FILE, --context-file CONTEXT_FILE
File containing system context
-nb, --no-beep Disable notification beep
-lo, --log Enable session logging
-d, --debug Enable debug output
-r, --retro Enable retro answer mode
We welcome contributions! Here are some ways you can help:
- π Bug Reports - Found an issue? Let us know!
- π‘ Feature Requests - Have an idea? We'd love to hear it!
- π§ Pull Requests - Code improvements and new features
- π Documentation - Help improve our docs
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with the OpenAI Python SDK
- Inspired by terminal-based AI tools and developer workflows
- Thanks to all AI providers for their APIs
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
If AITerm-CLI has been helpful in your development workflow, consider buying me a coffee:
Your support helps maintain and improve AITerm-CLI, add new AI provider integrations, and keep the project actively developed.
Made with β€οΈ for old school computer users who live in the terminal
