miao Coding agent

Read first.Then edit.

Reads the repo, makes the change, runs the checks, returns the result. Lean context; cost recorded per turn.

Budgets over money, tokens, turns and time.

macOS / Linux

curl -fsSL https://mtty.dev/miao/install | bash

Windows (PowerShell)

irm https://mtty.dev/miao/install.ps1 | iex

Single binary · macOS, Linux and Windows · MIT

Current miao terminal UI showing an example code review, an inline edit diff, the response and context telemetry.
Build agent · inline code changes and context telemetry · illustrative session

01 steering

Add a requirement while it runs.

A new input is saved, then folded in at a safe turn boundary; the running call is not interrupted.

Explicitly queued inputs wait for idle; promoting a new input resets the turn allowance.

  1. ›

    Find the cause of this failing test, fix it, run the relevant checks, and explain the diff.

  2. ›

    Preserve the public API and avoid new runtime dependencies.

    steer · saved, folds in at the next turn boundary
  3. ›

    Then prepare a draft pull request description.

    queue · waits until the session would go idle

02 why miao

Mechanism

  1. 01

    Context

    The baseline stays fixed and changes are appended in order, so prompt caches keep hitting. Cache policy and TTL are configurable per provider.

  2. 02

    Compaction

    Starts near the threshold; the summary reuses the current prefix. Old output is pruned; oversized results stay on disk and remain recallable.

  3. 03

    Cost

    Tokens, cache-hit rate, time to first token and estimated cost per turn. Warn at four fifths of budget, stop at the next safe boundary.

  4. 04

    Install

    One binary, no engine or TUI. One command for macOS, Linux and Windows.

Costs are estimates; the provider bill is authoritative. Saved history does not resume work after a crash; an unfinished turn needs an explicit resume.

03 everyday engineering

Everyday work.

What you needWhat miao provides
Understand an unfamiliar repositoryFile reading, search, project instructions, skills and specialist subagents
Implement and verify a changeFile edits and patches, shell commands, optional LSP diagnostics and formatting
Compare models without changing toolsIn-session model selection, provider configuration, per-agent models and reasoning variants where supported
Work through a larger taskTodos, mid-task input, durable sessions and an opt-in autonomous continuation loop
Connect your own toolsLocal and remote MCP servers, custom commands, skills and plugins
Review and reuse workDiffs, session forks, history export and permission prompts
Integrate with another applicationHTTP server, browser UI, CLI automation, and generated clients in the workspace

04 the app

Runs in the terminal.

Review the work, choose the modelAn illustrative code-review session with an inline diff and context telemetry; open model selection without leaving the conversation.View full size ↗
Bring your own providerBrowse the provider picker and its available services. Connect OpenAI, Anthropic, GitHub Copilot, Google or your own endpoint.View full size ↗
The same session, in a browserExpand the edit diff and open the file-review panel in miao's browser UI. This is the same illustrative session as the terminal capture.View full size ↗
A compact interactive modeThe development build's opt-in mini interface: task progress, an edit diff and a multi-select question, using the built-in demo mode.View full size ↗
The mini interface's edit-permission prompt shows the proposed diff and Allow once, Allow always and Reject choices. Built-in demo mode.
Review before allowing an editThe mini interface's edit-permission prompt shows the proposed diff and Allow once, Allow always and Reject choices. Built-in demo mode.View full size ↗
The current terminal start screen, with the selected agent, model and reasoning variant beside the input.
Start with a promptThe current terminal start screen, with the selected agent, model and reasoning variant beside the input.View full size ↗

05 longer tasks

Long tasks.

Autonomous continuation is opt-in, bounded by an iteration cap and stall detection. At the cost threshold, no new provider turn is scheduled.

The budget is not a hard cap on a provider bill or on a turn already in flight. Put this in .miao/miao.jsonc for one project, or ~/.config/miao/miao.jsonc for all of them.

// .miao/miao.jsonc
{
  "loop": { "enabled": true, "max_iterations": 25 },
  "cost": { "budget_usd": 5 },
  "compaction": { "prune": true },
}

06 isolation

Command sandbox.

The Rust layer handles two things: kernel-level isolation around bash, and the matching and patch paths behind edit and apply_patch.

Kernel isolation

macOS seatbelt and Linux Landlock restrict writes to the active Location, the command directory and approved paths.

Intercept and approve

A blocked write reports the required path and stops. Approving the directory reruns the command with access.

Default on

Native matching and patches run through the addon; MIAO_NATIVE=0 hands them to TypeScript.

The sandbox is opt-in and off by default, and Windows has no backend yet. It fails open: a requested sandbox whose backend is unavailable warns and runs the command unsandboxed unless on_unavailable is set to "fail".

07 status

Before 1.0: capabilities and limits.

CapabilityAvailability
Saved sessions, mid-task input and project-local session messagingImplemented
Autonomous continuation and cost budgetsOpt-in
Old tool-output pruning and automatic compactionOn by default · configurable
Code ModeExperimental
Kernel sandbox for bash; native accelerators in edit and apply_patchSandbox opt-in · accelerators default
Generated clients and the embedded hostEvolving API

08 quick start

Three commands to a first session.

$ curl -fsSL https://mtty.dev/miao/install | bash        # macOS / Linux
PS> irm https://mtty.dev/miao/install.ps1 | iex        # Windows
$ miao providers login   # choose a provider, connect an account or API key
$ cd /path/to/project
$ miao                   # start the terminal UI

# one-shot, without the TUI
$ miao run "Explain this repository's architecture"
$ miao web               # the browser interface
$ miao upgrade           # update the release binary

Inside the TUI, ctrl+p opens the command palette and ctrl+x m picks a model. miao models lists what is available.

Your models. Your terminal.