Terminal-first. Multi-model. Approvals-first.
MahanAI runs in your shell, routes to
claude, codex, nvidia, or any
OpenAI-compatible endpoint, and asks before it touches a thing.
███╗ ███╗ █████╗ ██╗ ██╗ █████╗ ███╗ ██╗ █████╗ ██╗ ████╗ ████║██╔══██╗██║ ██║██╔══██╗████╗ ██║██╔══██╗██║ ██╔████╔██║███████║███████║███████║██╔██╗ ██║███████║██║ ██║╚██╔╝██║██╔══██║██╔══██║██╔══██║██║╚██╗██║██╔══██║██║ ██║ ╚═╝ ██║██║ ██║██║ ██║██║ ██║██║ ╚████║██║ ██║██║ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝
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.
Every shell, git, gh, and file op prompts with
[A] [W] [D]. Destructive commands are flagged and
Always-Allow is disabled. No surprises.
mahanai --server exposes every provider behind one
OpenAI- or Anthropic-compatible endpoint. Point Cursor, Continue,
or Claude Code at it.
midnight, light, and
colorblind-friendly variants. The banner gradient, prompt, and
status colors all update together.
/effort low|medium|high|very-high maps to
reasoning.effort on Codex and prepends thinking guidance on
Claude. One knob, every backend.
/plan on makes MahanAI outline its approach
before every response. Useful for multi-step refactors where
you want to read the plan before code moves.
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.
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 default switches back.
/api-key clear removes it.
MahanAI ships on PyPI. One import, one command, you're in the loop.
mahanai --compact · small MAI banner, trimmed header.
mahanai --server --port 8080 · local gateway.
MAHANAI_STREAM=0 · wait for full response.
Ten seconds from pip install to a streaming chat loop with every model you own, in every format you need, asking politely before it touches your repo.