# Command reference Every `baguette` command and flag, generated from the binary. For how to use a feature, start at the [docs index](README.md). **Common flag** (on every simulator command, not repeated below): `--device-set `: a custom device set (defaults to Xcode's default set). **Exit codes:** `0` on success, `1` on any error, `3` when an iPhone Duo `orientation` or `hinge` change is unconfirmed: its guest helper timed out, so the change may have landed and will not land later. Errors print `{"ok":false,"error":"…"}`, so parse stdout, not just the exit code. **Commands:** [list](#baguette-list) · [boot](#baguette-boot) · [shutdown](#baguette-shutdown) · [lifetime](#baguette-lifetime) · [input](#baguette-input) · [stream](#baguette-stream) · [tap](#baguette-tap) · [double-tap](#baguette-double-tap) · [swipe](#baguette-swipe) · [pinch](#baguette-pinch) · [pan](#baguette-pan) · [press](#baguette-press) · [key](#baguette-key) · [type](#baguette-type) · [paste](#baguette-paste) · [clipboard](#baguette-clipboard) · [chrome](#baguette-chrome) · [screenshot](#baguette-screenshot) · [record](#baguette-record) · [render-3d](#baguette-render-3d) · [describe-ui](#baguette-describe-ui) · [logs](#baguette-logs) · [serve](#baguette-serve) · [orientation](#baguette-orientation) · [hinge](#baguette-hinge) · [shake](#baguette-shake) · [status-bar](#baguette-status-bar) · [interface](#baguette-interface) · [location](#baguette-location) · [motion](#baguette-motion) · [network](#baguette-network) · [install](#baguette-install) · [add-media](#baguette-add-media) · [openurl](#baguette-openurl) · [schemes](#baguette-schemes) · [plugin](#baguette-plugin) · [bakery](#baguette-bakery) · [diag-digitizer-trackpad](#baguette-diag-digitizer-trackpad) · [heal](#baguette-heal) ## baguette list List simulators in the default or a custom device set ``` baguette list [--json] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--json` | | | Emit one running/available JSON envelope (matches /simulators.json) | ## baguette boot Boot a simulator headlessly ``` baguette boot --udid [--no-heal] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--no-heal` | | | Leave the input surface alone even if Xcode 27's Device Hub has shadowed it (see `baguette heal`). | ## baguette shutdown Shut down a booted simulator ``` baguette shutdown --udid ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | ## baguette lifetime Show or change whether Simulator.app leaves devices booted ``` baguette lifetime [--detach] [--shutdown] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--detach` | | | Leave devices booted when a window closes or Simulator.app quits. | | `--shutdown` | | | Restore Apple's default: closing a window or quitting shuts the device down. | ## baguette input Read newline-delimited JSON gestures from stdin, ack each on stdout ``` baguette input --udid [--display ] [--require-existing-display] [--expected-screen ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--display` | | | Target display plane: phone \| carplay | | `--require-existing-display` | | | Require the target display to be attached; never enable CarPlay implicitly | | `--expected-screen` | | | Require fresh observations to match this describe-ui screen JSON before coordinate input | ## baguette stream Stream framebuffer to stdout (mjpeg / avcc). Reads runtime config commands from stdin. ``` baguette stream --udid [--format ] [--fps ] [--quality ] [--bitrate ] [--scale ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--format` | | `mjpeg` | Output format: mjpeg \| avcc | | `--fps` | | `60` | Frames per second | | `--quality` | | `0.7` | JPEG quality (0.0 – 1.0) | | `--bitrate` | | `8000000` | H.264 average bitrate (bps) | | `--scale` | | `1` | Integer downscale divisor (1 = native) | ## baguette tap Single tap at a point ``` baguette tap --udid --x --y --width --height [--duration ] [--edge ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--x` | yes | | | | `--y` | yes | | | | `--width` | yes | | | | `--height` | yes | | | | `--duration` | | `0.05` | Hold duration in seconds | | `--edge` | | | Screen edge the tap lands on: left \| top \| right \| bottom. Omit for an interior tap. | ## baguette double-tap Two taps at one point — fires UITapGestureRecognizer / TapGesture(count: 2) ``` baguette double-tap --udid --x --y --width --height [--interval ] [--duration ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--x` | yes | | | | `--y` | yes | | | | `--width` | yes | | | | `--height` | yes | | | | `--interval` | | `0.05` | Gap between tap-1-up and tap-2-down, seconds | | `--duration` | | `0.08` | Hold duration per tap, seconds | ## baguette swipe One-finger drag from start to end ``` baguette swipe --udid --start-x --start-y --end-x --end-y --width --height [--duration ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--start-x` | yes | | | | `--start-y` | yes | | | | `--end-x` | yes | | | | `--end-y` | yes | | | | `--width` | yes | | | | `--height` | yes | | | | `--duration` | | `0.25` | | ## baguette pinch Two-finger pinch / spread around a centre point ``` baguette pinch --udid --cx --cy --start-spread --end-spread --width --height [--duration ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--cx` | yes | | | | `--cy` | yes | | | | `--start-spread` | yes | | | | `--end-spread` | yes | | | | `--width` | yes | | | | `--height` | yes | | | | `--duration` | | `0.6` | | ## baguette pan Two-finger parallel drag ``` baguette pan --udid --x1 --y1 --x2 --y2 --dx --dy --width --height [--duration ] ``` | Flag | Required | Default | Description | |---|---|---|---| | `--udid` | yes | | Simulator UDID | | `--x1` | yes | | | | `--y1` | yes | | | | `--x2` | yes | | | | `--y2` | yes | | | | `--dx` | yes | | | | `--dy` | yes | | | | `--width` | yes | | | | `--height` | yes | | | | `--duration` | | `0.5` | | ## baguette press Press-and-release a hardware button (home \| lock \| power \| volume-up \| volume-down \| action \| digital-crown \| side-button \| left-side-button \| app-switcher \| swipe-to-app-switcher \| swipe-to-home \| pull-down-to-lock-screen \| pull-down-to-notification-center) ``` baguette press --udid --button