Terminal-first. Multi-model. Approvals-first.
MahanAI gives you a chat interface, agentic tool use, a local
gateway server, and a plugin ecosystem—with custom themes, conversation branching,
and searchable chat history.
███╗ ███╗ █████╗ ██╗ ██╗ █████╗ ███╗ ██╗ █████╗ ██╗ ████╗ ████║██╔══██╗██║ ██║██╔══██╗████╗ ██║██╔══██╗██║ ██╔████╔██║███████║███████║███████║██╔██╗ ██║███████║██║ ██║╚██╔╝██║██╔══██║██╔══██║██╔══██║██║╚██╗██║██╔══██║██║ ██║ ╚═╝ ██║██║ ██║██║ ██║██║ ██║██║ ╚████║██║ ██║██║ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝
Every surface is shaped by the shell: monospace rhythm, bracketed keys, ASCII rules, and a gradient banner that tweens while you wait.
mahanai launches a full-width chat loop with a gradient ASCII banner,
a status line with your model / effort / plan / theme, and an approval-first tool
runtime that refuses to touch your machine without a key press.
Install community .mmd plugins with /store install,
publish your own with /store upload. GitHub-backed.
/branch save snapshots state, /branch load
restores. Explore multiple paths without losing work.
Find saved sessions by keyword with /history search <query>.
Pull up old chats fast instead of scrolling forever.
/interact lets MahanAI control your computer
with screenshots, mouse, and keyboard. Remove anytime with
/interact remove.
Get pinged when a long generation finishes. Focus elsewhere, stay in the loop.
/shell-history inject adds recent bash/zsh history
to context. Code suggestions know your workflow.
/cost shows session token usage and estimated spend
across all backends.
Keys save to ~/.config/mahanai/config.json
(or %APPDATA%\MahanAI\ on Windows). Env-var overrides
via MAHANAI_API_KEY. Nothing leaves your box unless
you told it to.
SSE preserved across the gateway in every direction — OpenAI→Anthropic,
Anthropic→OpenAI, or transparent proxy. Set
MAHANAI_STREAM=0 to wait for the full response.
Write your own .mmd plugins to add slash commands, delegate to Claude Code or the shell, and publish to the store. Custom .mai themes with gradients, color aliases, and display overrides.
/store browse to find plugins. /store install author/namespace.plugin to add one.
/store upload path/to/plugin.mmd publishes yours publicly.
Write a .mai file with gradients, color aliases, and display name overrides.
/theme-load mytheme.mai to apply. Includes four built-in themes.
Place a .mahanairc in your project root to auto-load context files, plugins, and enable
dev kit extras scoped to that workspace.
/branch save milestone snapshots state. /branch load to restore.
Explore multiple refactor paths or reasoning chains without losing work.
mahanai --server --port 8080 --type openai — a local HTTP
gateway that routes every request to the right backend based on the
model field. Format conversion happens transparently.
localhost · routes by model
MahanAI's tool runtime stops at every shell, git, gh, and file op. You press one key. Always-Allow saves a rule; destructive commands can't be saved at all.
Slash-prefixed, lowercase, kebab-case when multi-word. POSIX flags for launch options. No menus, no mice.
/mode claude or /mode default.
author/namespace.plugin.name.
.mmd plugin file.
.mai theme file.
/api-key clear removes it.
localhost 11434.
MAHANAI.md workspace context file.
MahanAI ships on PyPI. An onboarding wizard runs on first launch to help you pick a model and set up API keys.
Run ./scripts/get-started.sh (Linux/macOS) or .\scripts\get-started.ps1 (Windows) to auto-install Python via uv, then MahanAI.
Pick a model, set API keys, choose theme on first run.
mahanai --server --port 8080 · OpenAI-compatible gateway.
Complete reference · commands, config, plugins
ten seconds from pip install to a streaming chat loop with every model you own, a local gateway for Cursor/Continue/Claude Code, plugins, custom themes, and approvals on every tool call.