An AI-powered terminal assistant with 7 providers, 40+ commands, code analysis, file editing with undo, snippet management, and project templates β all in pure Python with zero cost options.
The Problem
AI coding assistants like Claude Code and Aider are incredible β but they're either:
- Expensive (Claude Code: $20-200/month)
- Locked to one provider (Claude Code β Anthropic only)
- Heavy (Node.js, lots of dependencies)
- No free tier for local/offline use
I wanted something that:
- Works with any AI provider
- Has a free tier (Gemini, Groq, Ollama)
- Runs in the terminal with a beautiful UI
- Is truly open source
What Is TermMind?
TermMind is a modern, open-source AI terminal assistant. Think Claude Code or Aider β but free, open-source, and lightweight.
pip install termmind
termmind init # Select provider & API key
termmind chat # Start chatting with AI
Supported Providers (7!)
| Provider | Free Tier? | Setup |
|---|---|---|
| Google Gemini | β Yes (free API key) | aistudio.google.com |
| Groq | β Yes (free tier) | console.groq.com |
| Ollama | β Yes (fully offline!) | ollama pull llama3.2 |
| OpenAI | β Paid | platform.openai.com |
| Anthropic Claude | β Paid | console.anthropic.com |
| Together.ai | β Paid | together.ai |
| OpenRouter | β Paid | openrouter.ai |
Yes, you can use TermMind completely free with Gemini, Groq, or Ollama.
Core Features
π¨ Beautiful Terminal UI
- Syntax highlighting
- Markdown rendering
- Streaming responses
- Dark/Light themes
βοΈ Smart File Editing
- AI-powered file creation and editing
- Side-by-side diff view in the terminal
- Hunk-by-hunk confirmation (accept/reject individual changes)
- Undo system β every edit is tracked
π Smart Context Engine
- Automatically includes relevant files from your project
- .termmindignore support (like .gitignore)
- Persistent code index β function signatures, class definitions, imports
- Supports 9 languages: Python, JS, TS, Go, Rust, Java, Ruby, C, C++
π Git Integration
- Status, diff, log
- AI-generated commit messages
π Cost Tracking
Real-time token count and cost estimation
πΎ Session Management
Save and load conversations
π Provider Switching
Change models mid-conversation with /provider
40+ Commands
CLI Commands
termmind init # Configure provider & API key
termmind chat # Interactive chat session
termmind ask "q" # One-shot question
termmind edit file # Edit a file with AI
termmind review ./src # Review code in directory
termmind explain file # Explain a file
termmind test file # Generate tests
termmind history # Show saved sessions
termmind config # Show current configuration
In-Chat Slash Commands
/edit <file> [instruction] β Edit a file with AI
/run <command> β Run a shell command
/files β List files in context
/search <query> β Search project files
/tree β Show file tree
/save [name] / /load <name> β Session management
/model / /provider β Switch mid-conversation
/cost β Show token usage & cost
/undo β Undo last file edit
/diff β Show session changes
/snippet save/search/load β Code snippet management
/template list/use β Project scaffolding
/refactor <op> <file> β AI-powered refactoring
Standout Features
π¦ Snippet Manager
- Save code snippets from conversations
- Search by name, description, tags, or code content
- Template variables:
{{filename}},{{datetime}},{{year}}, etc. - Auto-suggest relevant snippets based on context
ποΈ Project Templates
Scaffold projects from 8 built-in templates:
- Python, FastAPI, React, Next.js, and more
π§ Refactoring Engine
AI-powered refactoring with:
- Diff preview
- Confirmation prompt
- Full undo support
π³ Docker Support
# Build and run
docker compose up --build
# Fully offline with Ollama
docker compose --profile local-llm up --build
Shell Completions
Auto-generated completions for Bash, Zsh, and Fish:
termmind completions install
How It Compares
| Feature | TermMind | Claude Code | Aider |
|---|---|---|---|
| Open Source | β MIT | β | β Apache |
| Free Tier | β (Gemini/Groq) | β | β |
| Local/Offline | β (Ollama) | β | β |
| Multi-Provider | β 7 providers | β | β |
| Rich Terminal UI | β | β | β |
| Undo Edits | β | β | β |
| Cost Tracking | β | β | β |
| Session Save/Load | β | β | β |
| Dependencies | 4 packages | Heavy | Moderate |
The Architecture
CLI (click commands)
βββ Commands Layer (chat, ask, edit, reviewβ¦)
βββ Diff Engine (side-by-side diffs)
βββ Context Engine (smart file selection, code index)
β βββ File Ops (read, write, edit)
β βββ Git Module (status, diff, log)
β βββ API Client (streaming, multi-provider)
βββ Plugin System (on_start, on_msg hooks)
Get Started
pip install termmind
termmind init # Walks you through setup
termmind chat # Start chatting!
Or for free usage:
# Get a free Gemini API key from aistudio.google.com
termmind init # Select "gemini" as provider
termmind chat # Start chatting β it's free!
β GitHub: github.com/rudra496/termmind
π¦ PyPI: pypi.org/project/termmind
Rudra Sarker β student researcher and full-stack developer from Bangladesh. Building free, open-source developer tools because great tools shouldn't cost a fortune.
π Connect:
- GitHub | LinkedIn | Twitter/X | ResearchGate | Personal Site
Top comments (0)