Ninoo Code
An agent loop, a toolbox, one rule
Your machine changes only when you say yes. Everything else is detail, and it is below.
01 — The loop
Steps, not magic
You describe an outcome. Each step, the model either answers you or calls a tool. Tool results stream back, the model reads them, and it decides the next step until the task is done.
- 01
You describe the task
- 02
The model picks a tool
- 03
You approve any change
- 04
The result feeds the next step
02 — The tools
Sixteen tools
| Tool | What it does | Asks first |
|---|---|---|
| read_file | Reads a file, paged for large ones | asks first: read-only |
| list_dir | Lists a directory | asks first: read-only |
| glob | Finds files by pattern | asks first: read-only |
| grep | Searches file contents by regex | asks first: read-only |
| write_file | Creates or overwrites a file, preview first | asks first: yes |
| edit_file | Replaces an exact string, diff first | asks first: yes |
| multi_edit | Several edits to one file, all or nothing | asks first: yes |
| bash | Runs a shell command, or starts a background job | asks first: yes |
| bash_output | Reads new output from a background job | asks first: read-only |
| bash_kill | Stops a background job | asks first: read-only |
| web_fetch | Fetches a URL such as docs or a changelog | asks first: yes |
| remember | Saves a note to NINOO.md, shown first | asks first: yes |
| todo_write | Writes the task plan, pinned live in the terminal | asks first: read-only |
| todo_read | Re-reads the current plan | asks first: read-only |
| ask_user | Asks you a multiple-choice question mid-task | asks first: read-only |
| task | Delegates a subtask to a subagent with a fresh context | asks first: read-only |
The task tool runs a subagent with its own fresh context. Its tool calls pass through the same confirmation gate; only its final report returns.
03 — Safety
Nothing happens without a yes
Before any write, edit, shell command or web fetch, Ninoo shows the full command, a red and green diff, or a file preview, then waits. Decline and the model is told, so it adjusts instead of retrying blind.
esc interrupts a running turn and discards the half-finished step. For tasks you fully trust, ninoo -y auto-approves, as an explicit flag, never a default.
Every file is snapshotted before it is touched, one frame per turn, so /undo reverts the last turn in one step and tells the model what was rolled back.
04 — Memory
It remembers the repo
Every session starts by reading ~/.ninoo/NINOO.md, then the project's own NINOO.md. Run /init in a new repo and Ninoo writes the first draft: build and test commands, layout, conventions.
As you work it saves new non-obvious facts with the remember tool, each shown for approval first. For multi-step tasks it pins a live todo list in the terminal and checks items off as they land.
05 — Models
Pick a model or a mode
/model opens a picker: Nicrron's routing modes first, then the live catalog with per-million-token prices. The choice is saved.
- nicrron/auto
- Right-sizes the model per request. The default.
- nicrron/coding
- Strongest coding models first, cheaper fallbacks.
- nicrron/reasoning
- Deep-reasoning models for hard problems.
- nicrron/fastest
- Lowest-latency lightweight models.
- nicrron/cheapest
- Cheapest model per token; quality varies.
06 — Billing
One balance, no surprises
Ninoo authenticates with the key from ninoo login, so every request debits the same Nicrron balance as the rest of your gateway traffic, at the same published rates. The CLI itself is free.
The status line shows a live token estimate, /status totals the session, and each request appears in your usage logs with its exact cost. If the balance runs out, Ninoo stops with a clear message; top up and continue.