AI-powered terminal assistant
Project description
>AITerm
🖥️ AITerm - Terminal AI Chat for Old-School Hackers 💾
Remember when the best tools lived in the terminal? AITerm 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 ✨
✨ Features
Version
0.9.2 Stable Release
🌐 Multi-Provider Support
- 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)
- Custom APIs (Any OpenAI-compatible endpoint)
💫 Smart Terminal Experience
- 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
- Color Toggle - Enable/disable colored output on the fly
⚡ Developer-Friendly
- 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
🚀 Quick Start
Installation
-
Clone the repository
git clone https://github.com/fosilinx/aiterm.git cd aiterm
-
Install dependencies
pip install openai # Optional for better unicode support pip install wcwidth
-
Run AITerm
python aiterm.py
First Run Setup
On first launch, AITerm 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_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."
}
🎯 Usage
Basic Chat
> Hello, can you help me debug this Python function?
Available Commands
| 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 |
Advanced Usage
Custom System Context
python aiterm.py -c "You are a senior Python developer focused on clean, efficient code."
Context from File
python aiterm.py -cf system_prompt.txt
Enable Session Logging
python aiterm.py --log
Silent Mode (No Beeps)
python aiterm.py --no-beep
Retro Mode (Fresh Start After Each Response)
python aiterm.py --retro
Debug Mode
python aiterm.py --debug
⚙️ Configuration
AITerm stores configuration in aiterm_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."
}
Session Logs
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
🎨 Customization
Custom Notification Sounds
Place your custom beep sound at sounds/beep-02.wav to override the default system beep.
Table Styles
Switch between two beautiful table styles:
- Box (default): Elegant Unicode borders
╔═╗║╚╝ - ASCII: Classic terminal style
+-+||
Use /tablestyle to toggle between styles.
Code Detection
AIterm 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.
🛠️ Advanced Features
Retro Mode
Perfect for presentations or teaching - each response is isolated:
- Get AI response
- Press Enter
- Screen clears
- Fresh conversation starts
Multiple Model Testing
Easily switch between models to compare responses:
> /models # List available models
> /reconfig # Switch to different model
Context Switching
Perfect for different types of tasks:
> /setcontext # Change context for coding tasks
> /resetcontext # Set up for writing tasks
API Debugging
> /testapi # Verify connection
> /config # Check current settings
> /raw # See unprocessed responses
> /debug # Toggle detailed logging
📋 Requirements
- Python 3.6+
- openai library (
pip install openai) - API key from your chosen provider
- wcwidth (optional, for better unicode support)
Optional Dependencies
For enhanced audio feedback:
- Windows: Built-in
winsound - Linux:
aplay,paplay, orplay - macOS:
afplay
🔧 Command-Line Arguments
usage: aiterm.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
🤝 Contributing
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
Development Setup
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with the OpenAI Python SDK
- Inspired by terminal-based AI tools and developer workflows
- Thanks to all AI providers for their APIs
📞 Support
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
☕ Support the Project
If AITerm has been helpful in your development workflow, consider buying me a coffee:
Your support helps maintain and improve AITerm, add new AI provider integrations, and keep the project actively developed.
Made with ❤️ for old school computer users who live in the terminal
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiterm_cli-0.9.3.tar.gz.
File metadata
- Download URL: aiterm_cli-0.9.3.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5ec87c5743d377a2c16f421cfd53a94737b89dbec8f410e2caf0053f90b96d
|
|
| MD5 |
5d344ab78ed4081af0f00426927b96d9
|
|
| BLAKE2b-256 |
9d14b6de3454998a63e2a9616a1bcf7cd64323056ce2b3908c0bdba9917f40ab
|
File details
Details for the file aiterm_cli-0.9.3-py3-none-any.whl.
File metadata
- Download URL: aiterm_cli-0.9.3-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16530dc2c51a1fc70c563e026854e1305c7e0e292f15e41f3ae92b29c567b692
|
|
| MD5 |
25ac2eda8cfb3efe1ae9dad3b9d6fd91
|
|
| BLAKE2b-256 |
da48f8f3d16117b1c7b9bcedf52cbad515b94f197120461049e0e4f026677039
|