A modern, open-source AI terminal assistant. Free, beautiful, and lives in your terminal.
βββββββββββββββββββββββββββββββ
β T e r m M i n d β
β AI Terminal Assistant β
βββββββββββββββββββββββββββββββ
TermMind is a CLI tool that lets you chat with AI models directly in your terminal. It can read, write, and edit files, run commands, understand your codebase, and help you code faster β all with a beautiful, rich terminal UI.
Think Claude Code or Aider, but free, open-source, and lightweight.
/undo/provider.termmindignore supportpip install termmind
Or from source:
git clone https://github.com/rudra496/termmind.git
cd termmind
pip install -e .
termmind init
This walks you through selecting a provider and entering your API key. You can also manually edit ~/.termmind/config.json.
termmind chat
termmind ask "Explain async/await in Python"
termmind edit main.py "Add input validation to the parse_args function"
termmind review ./src
| Command | Description |
|---|---|
termmind init |
Configure API provider, key, and model |
termmind chat |
Start interactive chat session |
termmind ask "q" |
One-shot question (no session) |
termmind edit file |
Edit a file with AI |
termmind review path |
Review code in directory |
termmind explain file |
Explain a file |
termmind test file |
Generate tests for a file |
termmind history |
Show saved sessions |
termmind config |
Show current configuration |
Inside termmind chat, use slash commands:
| Command | Description |
|---|---|
/edit <file> [instruction] |
Edit a file with AI |
/run <command> |
Run a shell command |
/files |
List files in context |
/add <file> |
Add file to context |
/search <query> |
Search project files |
/tree |
Show file tree |
/clear |
Clear conversation |
/save [name] |
Save session |
/load <name> |
Load saved session |
/model [name] |
Show/switch model |
/provider [name] |
Show/switch provider |
/cost |
Show token usage & cost |
/theme dark/light |
Change color theme |
/undo |
Undo last file edit |
/diff |
Show session changes |
/status |
Git status + context info |
/git [status/log/diff] |
Git operations |
/snippet save <name> |
Save code as a snippet |
/snippet list |
List saved snippets |
/snippet load <name> |
Load snippet into context |
/snippet search <query> |
Search snippets |
/template list |
List project templates |
/template use <name> |
Scaffold a project |
/refactor <op> <file> |
AI-powered refactoring |
/refactor undo |
Undo last refactoring |
/help |
Show all commands |
gemini during termmind initcurl -fsSL https://ollama.ai/install.sh | shollama pull llama3.2ollama during setupConfig is stored at ~/.termmind/config.json:
{
"provider": "gemini",
"api_key": "your-key-here",
"model": "gemini-2.0-flash",
"max_tokens": 4096,
"temperature": 0.7,
"theme": "dark"
}
Like .gitignore but for AI context. Create in your project root:
node_modules/
__pycache__/
*.min.js
dist/
.env
| Feature | TermMind | Claude Code | Aider | Open Interpreter |
|---|---|---|---|---|
| Open Source | β MIT | β | β Apache | β MIT |
| Free Tier | β (Gemini/Groq) | β | β | β |
| Local/Offline | β (Ollama) | β | β | β |
| Streaming | β | β | β | β |
| Multi-Provider | β 6+ | β | β | β |
| Rich Terminal UI | β | β | β | β |
| File Editing | β | β | β | β |
| Undo Edits | β | β | β | β |
| Cost Tracking | β | β | β | β |
| Session Save/Load | β | β | β | β |
| Dependencies | 4 | Heavy | Moderate | Heavy |
| Python | β 3.8+ | Node.js | Python | Python |
# Build and run
docker compose up --build
# With local Ollama (fully offline)
docker compose --profile local-llm up --build
# One-shot question via Docker
docker compose run --rm termmind ask "Explain async/await in Python"
# Auto-install for your current shell
termmind completions install
# Or manually: generated scripts live in ~/.termmind/completions/
# Bash:
echo 'source ~/.termmind/completions/termmind.bash' >> ~/.bashrc
# Zsh:
echo 'fpath=(~/.termmind/completions $fpath)' >> ~/.zshrc
# Fish:
cp ~/.termmind/completions/termmind.fish ~/.config/fish/completions/
βββββββββββββββββββββββββββββββββββββββββββββββ
β CLI (cli.py) β
β click commands: chat, ask, edit, reviewβ¦ β
ββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ
β β
ββββββββΌβββββββ ββββββΌβββββββββββ
β Commands β β Diff Engine β
β (/edit,β¦) β β (diff_ β
β commands.py β β engine.py) β
ββββββββ¬βββββββ βββββββββββββββββ
β
ββββββββΌβββββββββββββββββββββββββββ
β Context Engine β
β context.py + memory.py β
β (smart file selection, β
β code index, caching) β
ββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββΌβββββββ βββββββββββββββββ
β File Ops β β Git Module β
β file_ops.py β β git.py β
ββββββββ¬βββββββ βββββββββββββββββ
β
ββββββββΌβββββββββββββββββββββββββββ
β API Client β
β api.py + providers.py β
β (streaming, multi-provider) β
ββββββββββββββββββββββββββββββββββ
β
ββββββββΌβββββββββββββββββββββββββββ
β Plugin System β
β plugins.py (on_start, on_msgβ¦) β
ββββββββββββββββββββββββββββββββββ
These features set TermMind apart from every other AI coding assistant:
termmind completions install,, ,, ``, etc.~/.termmind/snippets/ β portable and shareablepython-package β Modern Python package with pyproject.toml, tests, CIfastapi-api β FastAPI REST API with auth, DB, Dockerflask-api β Flask REST API with SQLAlchemycli-tool β Python CLI tool with clickreact-app β React + TypeScript + Vitenextjs-app β Next.js with App Routerexpress-api β Express.js REST APIdjango-app β Django with Django REST Framework,, ``, etc.~/.termmind/templates//refactor history| Operation | Time |
|---|---|
| Startup (cold) | ~0.3s |
| Startup (warm) | ~0.1s |
| Context selection (10 files) | ~0.05s |
| Code index build (100 files) | ~0.8s |
| Code index update (incremental) | ~0.05s |
| Diff render (1000 lines) | ~0.02s |
Measured on a typical developer machine. Actual times vary.
# Clone
git clone https://github.com/rudra496/termmind.git
cd termmind
# Install in dev mode
pip install -e .
# Run directly
python -m termmind.cli chat
# Test
python -m pytest
# Docker dev environment
docker compose up --build
termmind/
βββ termmind/
β βββ __init__.py # Version info
β βββ cli.py # Main CLI entry point
β βββ api.py # API client (streaming, multi-provider)
β βββ config.py # Configuration management
β βββ context.py # Smart file context builder
β βββ commands.py # Slash command handlers
β βββ file_ops.py # File read/write/edit/search
β βββ git.py # Git operations
β βββ providers.py # Provider implementations
β βββ plugins.py # Plugin system
β βββ sessions.py # Session save/load
β βββ themes.py # Color themes
β βββ diff_engine.py # Smart diff preview system
β βββ memory.py # Code context memory/index
β βββ shell.py # Shell integration & completions
β βββ snippets.py # Snippet manager (save/search/reuse)
β βββ templates.py # Project scaffolding templates
β βββ refactor.py # AI-powered refactoring engine
β βββ utils.py # Token counting, utilities
βββ tests/
βββ Dockerfile
βββ docker-compose.yml
βββ pyproject.toml
βββ README.md
βββ CODE_OF_CONDUCT.md
βββ SECURITY.md
βββ CONTRIBUTING.md
βββ LICENSE
See CONTRIBUTING.md for detailed guidelines on:
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold this standard.
See SECURITY.md for our security policy, supported versions, and vulnerability reporting guidelines.
Quick start:
git checkout -b feature/amazinggit commit -m 'Add amazing feature'git push origin feature/amazingMIT License β see LICENSE for details.
Made with β€οΈ by the TermMind contributors
| Role | How They Use It |
|---|---|
| Full-Stack Devs | Quick code generation, refactoring, and debugging across languages |
| DevOps Engineers | Generate Dockerfiles, CI configs, and Terraform files |
| Students | Learn programming with an AI tutor that explains concepts |
| Open Source Contributors | Understand unfamiliar codebases quickly |
| AI Enthusiasts | Experiment with multiple LLM providers side by side |
Built with β€οΈ by rudra496 Β· LinkedIn
MIT License Β· Free & Open Source Forever