Super 2.0 now with claude haiku 4.5 default

The perfect
coding agent.

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.

$ pip install mahanai
$ mahanai
12+
Models supported
4
Provider backends
1
Local gateway
0
Unapproved tool calls
~/code/mahanai — mahanai
zsh
================================================================
================================================================
Super 2.0  |  Claude Haiku 4.5  |  /api-key to save key (persists)
Replies stream live (MAHANAI_STREAM=0 to wait for full text)
/help /exit /quit
================================================================
You: run npm install react
Shell Command
npm install react
A Allow W Always Allow (npm) D Deny
→ npm install react
added 4 packages in 2.1s
MahanAI: done. exit 0.
MahanAI: anything else?
§ 01 · features

Built for people
who live in the terminal.

Every surface is shaped by the shell: monospace rhythm, bracketed keys, ASCII rules, and a gradient banner that tweens while you wait.

Chat loop, streaming, tool-runtime — all in your shell.

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.

Claude Claude Haiku 4.5 claude-haiku-4-5 · default
Claude Claude Sonnet 4.6 /mode claude
Codex GPT-5.4 · GPT-5.2-Codex /codex-login
NVIDIA Llama 3.3 70B /api-key-nvidia
Custom Any OpenAI-compatible endpoint /custom <url> <model>

Approvals, always.

Every shell, git, gh, and file op prompts with [A] [W] [D]. Destructive commands are flagged and Always-Allow is disabled. No surprises.

Local gateway.

mahanai --server exposes every provider behind one OpenAI- or Anthropic-compatible endpoint. Point Cursor, Continue, or Claude Code at it.

Four themes.

midnight, light, and colorblind-friendly variants. The banner gradient, prompt, and status colors all update together.

Effort dial.

/effort low|medium|high|very-high maps to reasoning.effort on Codex and prepends thinking guidance on Claude. One knob, every backend.

Plan mode.

/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 stay local.

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.

Streaming, end-to-end.

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.

§ 02 · gateway

One endpoint.
Every provider.

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.

Clients

Cursor
Continue.dev
Claude Code
LM Studio
curl / raw HTTP
MahanAI Gateway

localhost · routes by model

POST/v1/chat/completions
POST/v1/messages
GET/v1/models

Backends

Anthropic · claude-*
OpenAI Codex · gpt-5.*
NVIDIA NIM · llama-3.3
Mahan NIM · mahanai
Custom · any /v1
§ 03 · approvals

It asks before
it acts.

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.

Shell Command
rm -rf ./dist  [DESTRUCTIVE]
[A] Allow [W] Always Allow disabled [D] Deny
>
Write / Create File
~/project/src/main.py
[A] Allow [W] Always Allow (Write / Create File) [D] Deny
>
Git Command
git push origin main
[A] Allow [W] n/a for git [D] Deny
>
GitHub Command
gh pr create --title "..."
[A] Allow [W] n/a for gh [D] Deny
>
§ 04 · reference

Every command
is a slash away.

Slash-prefixed, lowercase, kebab-case when multi-word. POSIX flags for launch options. No menus, no mice.

/models Interactive model selector. ↑↓ to navigate, Enter to confirm, Esc to cancel.
/mode claude Quick-switch to Claude Sonnet 4.6. /mode default switches back.
/effort <level> Set reasoning effort: low, medium, high, or very-high.
/plan on · /plan off Toggle plan mode. MahanAI outlines its approach before every response.
/themes <name> Switch theme: midnight, light, midnight-cb, light-cb.
/approvals · /approvals clear List or wipe all Always Allow rules.
/codex-login · /codex-logout Sign in to OpenAI via browser OAuth (PKCE). Tokens refresh silently.
/api-key [key] Save server API key. Omit to enter via hidden prompt. /api-key clear removes it.
/custom <url> [model] [key] Point at any OpenAI-compatible server — Ollama, LM Studio, vLLM, OpenRouter.
/help · /exit · /quit The usual.
§ 05 · install

Two lines. That's it.

MahanAI ships on PyPI. One import, one command, you're in the loop.

$ pip install mahanai
$ mahanai

Compact mode

mahanai --compact · small MAI banner, trimmed header.

Server mode

mahanai --server --port 8080 · local gateway.

No-stream

MAHANAI_STREAM=0 · wait for full response.

Stop clicking.
Start shipping.

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.