recipes
Runner reference

Cheatsheet

mm-harness is the runner; these are its commands. mm-harness <command> [target] [flags], from inside any MetaMask checkout. The product is auto-detected; the positional target forces it; everything else is a flag on the same command. Filter by what you actually work on.

mm-harness 0.34+ one bin, 21 commands --json on most commands
Platform

Daily loop

What you run many times a day. The overlay is auto-ensured; you do not install it by hand.

SituationCommand
Where am I, what is live, what is nextmm-harness status
…without waiting for live probesmm-harness status --fast
Launch the extension (fullscreen)mm-harness launch
Launch into the sidepanelmm-harness launch --sidepanel
Launch beside a dappmm-harness launch --sidepanel --url <dapp-url>
Start / relaunch iOSmm-harness launch ios
Start / relaunch Androidmm-harness launch android
Pick the device explicitlymm-harness launch ios --device <udid|name>
Native or bundler output changed — clean buildmm-harness launch --build
Launch, then wait until it is genuinely readymm-harness launch --verify
Tail the dev server and app logsmm-harness logs
Stop what this checkout ownsmm-harness stop
Open Chrome DevTools over CDPmm-harness debug
Service-worker DevToolsmm-harness debug --worker
Open React Native DevToolsmm-harness debug
Open the RN developer menumm-harness debug --dev-menu

stop is scoped to this checkout, so parallel checkouts are untouched, and it is idempotent — stopping nothing is success.

Discover

You never guess capabilities. These commands print what exists; anything not listed does not exist for this checkout.

SituationCommand
Every action available heremm-harness actions
Just the categories and countsmm-harness actions --categories
One UI categorymm-harness actions --category ui
Search (typo-tolerant)mm-harness actions positions
One wallet action's fields, in detailmm-harness actions --action read_state
One Core action's fields, in detailmm-harness actions --action read_positions
What call accepts heremm-harness call --list
Recipes you can run heremm-harness run --list
What a recipe does before running itmm-harness run <recipe> --describe
The raw registry, for toolingmm-harness actions --raw --json

Drive one action

call runs a single action as a one-node recipe through the real engine path — the same trace and evidence a full run produces. Short names resolve when unambiguous.

SituationCommand
Read wallet state (redacted)mm-harness call read_state
Unlock if lockedmm-harness call ensure_unlocked
Navigate by page intentmm-harness call navigate page=perps
Press by visible textmm-harness call press text="Account 1"
Capture a screenshotmm-harness call screenshot path=proof.png
Run a shell command (every adapter)mm-harness call command cmd="echo hi"
Pass a field the explicit waymm-harness call navigate --arg page=perps
Keep wallet evidence somewhere you chosemm-harness call read_state --artifacts-dir ./out
Keep Core evidence somewhere you chosemm-harness call read_positions mode=all --artifacts-dir ./out
More than one device connectedmm-harness call read_state --device <udid>

Prove — run recipes

SituationCommand
Validate without touching anything (exit 5 if invalid)mm-harness run <recipe> --plan
Execute and write evidencemm-harness run <recipe>
Evidence in a directory you chosemm-harness run <recipe> --artifacts-dir ./out
A recipe with parametersmm-harness run perps.clean-market-testnet market=BTC
A recipe file on diskmm-harness run ./my-recipe.json
Add a team recipe librarymm-harness run <recipe> --library perps=/path/to/library
Record video of the whole run (Extension or iOS)mm-harness run <recipe> --record-video=full-run
Streaming progress for an agentmm-harness run <recipe> --json-stream
What did I last run, and how did it gomm-harness last

Extension and iOS can record full-run video through capture-helper. Android replay video is not implemented yet; use screenshot evidence there.

Health and repair

SituationCommand
Full readiness check — no launch, read-onlymm-harness doctor
Repair runtime state without launchingmm-harness doctor --fix
Findings in machine formmm-harness doctor --json
Is the overlay present and healthymm-harness verify
Install the overlay explicitly (CI, agents)mm-harness install
Remove the overlay, restore the checkoutmm-harness cleanup
Install a cached dev client on a prepared simulatormm-harness provision runway ios --adapter mobile

doctor --fix repairs what the harness owns. It will not launch the app, invent credentials, or choose a wallet fixture — those need a human.

Wallet fixtures

One canonical fixture per checkout, holding wallet data only. The password is read from the fixture and never typed.

SituationCommand
Status and the safe next commandmm-harness fixtures
Create from a fixture you already havemm-harness fixtures init --from <path>
Create a disposable public test walletmm-harness fixtures init --dev
Apply it to the app (no typing)mm-harness fixtures set
Refresh the fixture files on the targetmm-harness fixtures sync
Render pre-launch profile statemm-harness fixtures generate --fixture <path> --out <path>
--dev wallets are disposable

A --dev fixture is a public test wallet. It must never hold real funds.

Repo checks

SituationCommand
Lint/format/test just your diffmm-harness check diff --profile fast
…and typecheck toomm-harness check diff --profile full
Fix what is fixable, then validatemm-harness check diff --fix
Write validation artifactsmm-harness check diff --artifacts-dir artifacts/validation

check is bounded to the active git diff. It launches no app and runs no recipe.

For agents and scripts

Flag / conceptWhat it does
--jsonMachine-readable output on most commands. This is the agent contract.
--json-streamLine-flushed JSONL progress plus a terminal event, on run and launch.
--heal offFail fast, preserve the repro. Nothing is repaired under you.
--heal infra-onlyHeal transport, never wallet state. Default for run and call.
--heal autoAuto-ensure the overlay and heal. Default for launch.
--adapterForce the product when auto-detection is not what you want.
--target <path>Operate on a checkout other than the current directory.
--library <name=path>Add or override a recipe-library source. Repeatable.

Exit codes

CodeMeaningWhose problem
0Success
1Runtime / action failureThe thing under test. A real result.
2Invalid CLI usageYour command line.
3Infrastructure failureThe environment — app or dev server.
4Bounded recovery refusalHealing hit its limit and stopped rather than thrashing.
5Validation / trust failureThe recipe. Nothing executed.

The distinction that matters when triaging: 1 means it ran and failed; 3 and 5 mean it never got to run.

Setup and upkeep

SituationCommand
Install or updatenpm i -g @deeeed/metamask-harness@latest
Update in placemm-harness update
Is there a newer version (no install)mm-harness update --check
Tab completion for zsh / bashmm-harness completions install
Silence the daily update nudgeMM_HARNESS_NO_UPDATE_CHECK=1
Point at a source checkout instead of the global installMM_HARNESS_BIN=/path/to/checkout/bin/mm-harness

When this page and your terminal disagree

Your terminal wins. The CLI ships fast, and every command carries its own help: mm-harness --help for the map, mm-harness <command> --help for flags and worked examples. Run mm-harness update first — most disagreements are a stale global install.