Haiku
CLI

CLI Reference

Complete reference for all haiku commands and flags.

haiku recite

Run a test. Input can be:

  • A .haiku file (any platform — iOS, Python, Rust, …). Haiku compiles it first when needed, then runs it.
  • A .sim file (a pre-compiled iOS action sequence).
  • A generated backend test file (e.g. test_foo.py, foo_test.go, cache_test.rs) — runs directly without re-compilation.
haiku recite <file> [flags]
FlagDescription
--fresh / --no-cacheBypass compile cache when input is a .haiku file
-m, --model <shorthand>Coder-model shorthand
--trace[=PATH]Forensic recite-session log. A log is always written; this flag controls where. Omitted → /tmp/haiku-recite-<timestamp>.log. Bare --trace<output>.haiku.log next to the spec. --trace=PATH → user-supplied path.

For iOS targets, the simulator is taken from the spec's target.device field in the frontmatter. There is no --device flag at the CLI — the spec owns its simulator pinning so a recite is reproducible without invocation arguments. The xctest-driver picks a free localhost port automatically; no configuration needed.


haiku record

Record a session and generate a .haiku file you can edit and re-run.

haiku record <command> [flags]

For iOS, <command> is a bundle ID (reverse-DNS), optionally prefixed or suffixed with a simulator device name:

haiku record com.apple.Maps
haiku record "iPhone 16 Pro com.apple.Maps" -o checkout.ios.haiku

For backend targets, <command> is the command you'd normally run to execute or test your service. The -o filename's <lang>.haiku extension chooses the generated file's language:

haiku record "pytest tests/test_api.py" -o api.py.haiku
haiku record "cargo test --test parser" -o parser.rs.haiku
haiku record "go test ./internal/..." -o internal.go.haiku
FlagDescription
-o, --output <file>Output .haiku file path; omit to stream to stdout (backend)
-m, --model <shorthand>Coder-model shorthand
--trace[=PATH]Forensic record-session log (see haiku recite --trace)

haiku completions

Print a shell completion script to stdout.

haiku completions <shell>

Supported shells: bash, zsh, fish, elvish, powershell.

The installer sets this up automatically for zsh and bash. For other shells, or to set it up manually:

# fish — add to ~/.config/fish/config.fish
haiku completions fish | source

haiku models

List downloaded coder models and their -m shorthands. Pass any of these to recite/record via -m <shorthand> to override the default coder model.

haiku models

Output looks like:

SHORTHAND     MODEL                                     SIZE      ROLE                STATUS
------------------------------------------------------------------------------------------
llama         Llama-3.2-3B-Instruct-4bit                ~2 GB     text/compile        ✓ installed
qwen3-vl      Qwen3-VL-2B-Instruct-4bit                 ~1.8 GB   vision              ✓ installed
qwen3         Qwen3-8B-4bit                             ~4.3 GB   coder (default)     ✓ installed
qwen3-moe     Qwen3-30B-A3B-4bit                        ~16 GB    coder (MoE)         not installed
qwen3-6       Qwen3.6-27B-4bit                          ~16 GB    coder+vision        not installed

haiku models install

Download an additional model by its shorthand. The default install only fetches the three required models (llama, qwen3-vl, qwen3, ~8 GB total). The larger optional coder models (qwen3-moe, qwen3-6, each ~16 GB) can be pulled on demand:

haiku models install qwen3-moe
haiku models install qwen3-6

Once installed, pass them to recite / record via -m:

haiku recite test_parser.rs.haiku -m qwen3-moe

haiku models remove

Remove an installed optional model and reclaim its disk space:

haiku models remove qwen3-moe
FlagDescription
-y, --yesSkip the confirmation prompt

Required models (llama, qwen3-vl, qwen3) cannot be removed individually — removing any of them would break recite. To wipe haiku and all of its models, run haiku uninstall.


haiku skill

Install Haiku integrations into your AI coding agent's skills directory (Claude Code, Cursor, …).

haiku skill install

haiku uninstall

Remove haiku binaries, AI models, and shell PATH entries. Prompts for confirmation before making any changes.

haiku uninstall

Removes:

  • ~/.haiku/bin/haiku, haiku-vl-assert, Haiku.app
  • ~/.haiku/models/ — all downloaded models (~6 GB total)
  • The PATH export line from ~/.zshrc, ~/.bash_profile, and ~/.profile

On this page