Stoat Quickstart
chimera stoat Quickstart
Section titled “chimera stoat Quickstart”chimera stoat is the sixth Chimera coding-agent CLI. Where
chimera weasel ships a four-mode minimal
harness and chimera shrew tunes for small
local models, stoat ships a shell-mode toggle: in the same REPL,
each line either feeds the LLM agent or runs as a direct shell command,
and you flip between the two without leaving the prompt.
A single slash (/shell) — or the Ctrl-X s chord when
prompt_toolkit is installed — toggles between agent mode (stoat>)
and shell mode (stoat$). A second posture, plan mode, freezes the
agent into a planner that produces a plan and asks for confirmation
rather than acting. Plans persist to ~/.chimera/plans/ and can be
resumed.
Deeper dives:
shell-mode.md— the toggle in detail.slash-commands.md— the slash palette.providers.md— Kimi-first provider chain.sessions.md— list / show / cost / share.parity-matrix.md— surface mapping.
Prerequisites
Section titled “Prerequisites”- Python 3.11+
uv- One of: a Moonshot key, an Anthropic key, an OpenAI key, an OpenRouter key, or a reachable Ollama daemon / cloud account
uv --version # >= 0.4uv sync --extra dev --extra anthropic # core + Anthropic SDKFor the keyboard chords (Ctrl-X s / Ctrl-X p / Ctrl-X h), install
the optional readline replacement:
uv pip install prompt_toolkitWithout it, stoat falls back to plain input() and only the slash
forms work.
Provider configuration
Section titled “Provider configuration”Stoat’s chain is Kimi-first because the shell-toggle workflow is tuned for Kimi K2.6 chat models. Resolution order (first match wins):
--model <id>on the CLI.$STOAT_MODELenvironment variable.$MOONSHOT_API_KEYset → defaults tokimi-k2.6.$ANTHROPIC_API_KEYset → defaults toclaude-sonnet-4-6.$OPENAI_API_KEYset → defaults togpt-4o.$OPENROUTER_API_KEYset → defaults tomoonshot/kimi-k2.6.$OLLAMA_API_KEYset → defaults tokimi-k2.6:cloud(Ollama Cloud).- Friendly error pointing at the env vars above.
export MOONSHOT_API_KEY=...# OR — recommended free pathexport OLLAMA_HOST=https://ollama.comexport OLLAMA_API_KEY=<your-key>First run — the toggle
Section titled “First run — the toggle”chimera stoatstoat — Chimera coding agent (shell-mode toggle: /shell)model: kimi-k2.6 · mode: agent · cwd: /Users/me/projType /help for commands, /exit to quit.stoat> list the top-level files and read the READMEI'll list the repo first, then read the README.…stoat> /shell(shell mode: each input runs as 'bash -c <input>'. Type /shell to return to agent mode.)stoat$ lsCHANGELOG.md CLAUDE.md README.md chimera/ docs/ examples/ tests/stoat$ git statusOn branch master…stoat$ /shell(agent mode)stoat> commit the staged changes with a one-line message…Two lines, two modes. The same buffer, no extra terminal.
Boot straight into shell mode:
chimera stoat --shell-modeThe Ctrl-X chord
Section titled “The Ctrl-X chord”When prompt_toolkit is installed, three Ctrl-X <key> chords are
wired:
| Chord | Effect |
|---|---|
Ctrl-X s | Toggle shell ⇔ agent mode (same as /shell). |
Ctrl-X p | Toggle plan mode (same as /plan). |
Ctrl-X h | Show inline help (same as /help). |
The chord is consumed inline — the buffer continues for the next
character, so you can type a chord mid-prompt and the partial line is
preserved. Without prompt_toolkit, the chord is a no-op and the
slash forms remain the only path.
Tip: stoat supports bracketed paste via the same prompt_toolkit
input adapter, so pasting a multi-line snippet doesn’t trigger the
mode toggle even if it happens to contain \x18 (Ctrl-X) bytes.
Plan mode walkthrough
Section titled “Plan mode walkthrough”Plan mode swaps the system prompt so the model emits a structured plan and waits for confirmation. No edit / write / bash tools fire on plan turns — only read-only inspection.
stoat> /plan(plan mode: agent will plan, not act. Toggle with /plan or Ctrl-X p.)stoat> refactor auth from session cookies to JWTPLAN (id: plan-20260514T120505-a1b2) Phase 1 — survey [r] read chimera/auth/*.py [r] grep 'session_id' tests/ Phase 2 — shape new JWTAuth class with refresh-rotation support migrate AuthMiddleware to call JWTAuth.validate() Phase 3 — migrate backfill existing sessions with a one-time JWT exchange endpoint 24-hour grandfather window Phase 4 — verify add tests/test_jwt_auth.py run uv run pytest -k authConfirm with /plan accept or /plan abort.stoat> /plan accept(agent mode — plan persisted to ~/.chimera/plans/plan-20260514T120505-a1b2.json)stoat>Saved plans:
chimera stoat sessions list # includes plan IDsls ~/.chimera/plans/ # raw plan fileschimera stoat --session plan-20260514T120505-a1b2 # resumeSlash commands
Section titled “Slash commands”Stoat keeps the slash palette deliberately small. The nine commands:
/help Show this help message./exit Exit the REPL./clear Reset conversation history./model [<id>] Show or set the active model id./shell Toggle agent ⇔ shell mode. ← headline/plan Toggle plan mode (planner posture, no actions)./cost Show running cost for the current session./history [<n>] Show the last n submitted lines (default 10)./sessions [list|show] List recent stoat sessions or show one by id.Worked examples:
stoat> /modelmodel: kimi-k2.6stoat> /model gpt-oss:120b-cloudmodel: gpt-oss:120b-cloudstoat> /costsession cost: $0.0072 (4 turns, 2 tool calls)stoat> /history 31: list the top-level files2: /shell3: lsstoat> /sessions listSESSION_ID DATE MODEL PROMPTstoat-20260514T120505-a1b2 2026-05-14 12:05 kimi-k2.6 refactor auth from …Subagent registry
Section titled “Subagent registry”Stoat exposes a chimera stoat agents subcommand that walks the same
project > user > built-in chain as the other CLIs, plus four
stoat-specific defaults that pre-tune the system prompt for the
shell-toggle ergonomic:
chimera stoat agents listNAME SOURCE MODEL DESCRIPTIONshell builtin - Lives in shell mode, escalates to agent only on demand.planner builtin - Plan-only profile (forces /plan on every turn).review builtin - Read-only code review; no edits.build builtin - Full build profile (read/write/edit/bash + tests).Inspect one:
chimera stoat agents show plannerUse one for a single run:
chimera stoat -p "audit auth module" --agent reviewchimera stoat --agent planner # boots in plan mode automatically—continue and —session
Section titled “—continue and —session”Two persistence flags for resuming work:
# Resume the newest stoat session for this cwd.chimera stoat -c
# Resume an explicit session id (wins over --continue).chimera stoat --session stoat-20260514T120505-a1b2
# Resume in plan-mode posture from a saved plan id.chimera stoat --session plan-20260514T120505-a1b2 --plan-modeEither flag drops you back at the prompt with the full conversation history rehydrated; tools, model, and mode are restored exactly.
One-shot print mode
Section titled “One-shot print mode”-p runs a single agent turn and exits. Plain text on stdout by
default, JSON with --json:
chimera stoat -p "list the top-level files and read the README"chimera stoat -p "summarize TODO comments in src/" --jsonchimera stoat -p "ship it" --max-steps 5chimera stoat --model gpt-oss:120b-cloud -p "draft a release note"chimera stoat -p "audit" --allowed-tools Read,BashPrint mode does not engage shell mode — it always runs the agent loop. For one-off shell commands, use your shell directly; that’s the whole point of stoat’s toggle.
Sessions and shares
Section titled “Sessions and shares”chimera stoat sessions listchimera stoat sessions list --all-clis # include every Chimera CLIchimera stoat sessions show stoat-20260514T120505-a1b2chimera stoat sessions cost --since 7dchimera stoat share stoat-20260514T120505-a1b2 --share-format mdThe cost rollup re-uses the canonical schema from
chimera mink runs cost so JSON / CSV / text is
byte-identical across all CLIs.
Choose your model
Section titled “Choose your model”Recommended models for the shell-toggle ergonomic (low-latency, short-turn-friendly):
| Backend | Tag | Why for stoat |
|---|---|---|
| Moonshot | kimi-k2.6 | Default; tuned for the shell-toggle ergonomic. |
| Ollama Cloud | kimi-k2.6:cloud | Same model, free with an Ollama account. |
| Ollama Cloud | gpt-oss:120b-cloud | Native tools; fast first token. |
| Anthropic | claude-sonnet-4-6 | Strongest tool calling fallback. |
See the Ollama Cloud recipe for the auth handshake.
Env vars at a glance
Section titled “Env vars at a glance”| Variable | Default | Meaning |
|---|---|---|
STOAT_MODEL | (unset) | Default model id. |
MOONSHOT_API_KEY | (unset) | Activates the Kimi-first chain. |
MOONSHOT_BASE_URL | https://api.moonshot.ai/v1 | Override for self-hosted gateways. |
ANTHROPIC_API_KEY | (unset) | Anthropic chain. |
OPENAI_API_KEY | (unset) | OpenAI chain. |
OPENROUTER_API_KEY | (unset) | OpenRouter chain. |
OLLAMA_API_KEY | (unset) | Ollama Cloud (:cloud tags). |
OLLAMA_HOST | http://localhost:11434 | Daemon URL. |
BASH | bash | Override bash binary for shell mode. |
NO_COLOR | (unset) | Plain output handler. |
What gets written to disk
Section titled “What gets written to disk”| Path | What |
|---|---|
~/.chimera/eventlog/stoat-<id>/ | Per-run event stream + summary. |
~/.chimera/plans/plan-<id>.json | Plan-mode artifacts (resumable). |
~/.chimera/shares/stoat-<id>.<ext> | Rendered share files. |
~/.chimera/credentials.json | OAuth tokens (mode 0o600). |
Everything is local-only. Purge with
rm -rf ~/.chimera/eventlog/stoat-* ~/.chimera/plans/plan-*.
Where to go next
Section titled “Where to go next”shell-mode.md— master the toggle.slash-commands.md— full palette.providers.md— pick a provider.parity-matrix.md— surface mapping.security-and-trademarks.md— policy.
Verified (2026-05-14)
Section titled “Verified (2026-05-14)”Two commands from this quickstart, against Ollama Cloud:
$ OLLAMA_HOST=https://ollama.com OLLAMA_API_KEY=*** \ chimera stoat -p "Hello, please reply with one word: hello" \ --model gpt-oss:120b-cloud --max-steps 2 --no-colorhello
$ chimera stoat --versionchimera stoat 0.7.0