# CLI commands

> The commands of the bundled pixling CLI.

Most `pixling` subcommands connect to the running app, run one operation, and exit. Five long-lived commands stay open instead:

- `rpc`: keeps one connection open, reading NDJSON request lines from stdin and printing one JSON response line per request until EOF.
- `inbox wait`: blocks until unread IDs arrive, and keeps waiting while the app is down.
- `inbox receive`: holds a receiver until the user puts the resident away or the connection ends.
- `resident follow`: reads window rectangles from stdin until EOF to keep a resident against a window edge.
- `resident events`: prints one JSON line per click on your resident until it is put away.

> [!TIP]
> **JSON output, exit codes, and per-command help**
> `pixling call`, `pixling rpc`, and `pixling schema` always print JSON. For all other commands, pass `--json` or set `PIXLING_FORMAT=json` to print one JSON document on stdout for both success and failure, matching MCP's `structuredContent`. See [Read refusals](/docs/connect/errors/) and [CLI exit codes](/docs/reference/cli/#exit-codes) for exit codes, and run `pixling schema` or `pixling <command> --help` for full arguments and values.

## Quick index by task

| Task | Commands | Reference |
| --- | --- | --- |
| Programmatic RPC & schema | `call`, `rpc`, `schema` | [CLI](/docs/reference/cli/) |
| Session & inbox | `resident ensure`, `resident request-close`, `inbox wait`, `inbox receive`, `inbox watch`, `inbox read` | [Resident binding](/docs/reference/resident-binding/), [Inbox](/docs/reference/inbox/) |
| Speech & questions | `message send`, `question ask`, `question result`, `question cancel`, `conversation read` | [Messages and questions](/docs/reference/messages-and-questions/) |
| Residents & layout | `residents`, `resident place`, `resident follow`, `resident desktop-visibility`, `resident summon`, `resident duplicate`, `resident stow`, `resident events`, `call resident.pixels` | [Residents](/docs/reference/residents/) |
| Settings & appearance | `resident describe`, `resident set`, `resident sketch`, `settings get`, `settings set` | [Resident settings](/docs/reference/resident-settings/), [App settings](/docs/reference/settings/) |
| Speech kits | `kit list`, `kit describe`, `kit set`, `kit duplicate`, `kit delete`, `kit import` | [Speech kits](/docs/reference/speech-kits/) |
| Motion & sequences | `resident glow`, `resident emote`, `resident bounce`, `resident throw`, `resident status`, `status define`, `sequence *` | [Light (glow)](/docs/reference/light/), [Sequences](/docs/reference/sequences/), [Residents](/docs/reference/residents/) |
| Groups & relations | `call group.*`, `call relation.*` | [Groups and relations](/docs/reference/groups-and-relations/) |
| Library & import | `zukan`, `note get`, `note set`, `import prepare`, `import adopt` | [Residents](/docs/reference/residents/#pixling_zukan_list), [Notes](/docs/reference/notes/), [Import](/docs/reference/import/) |
| Diagnostics & app | `capabilities`, `doctor`, `app quit` | [CLI](/docs/reference/cli/), [App settings](/docs/reference/settings/) |

## Command catalog

The table and usage block below are generated from the built command tree (hidden developer commands and `help` are omitted).

| command | summary |
| --- | --- |
| `pixling call` | Send one typed operation as JSON and print one JSON document to stdout. |
| `pixling rpc` | Run a persistent NDJSON request/response worker on stdin and stdout. |
| `pixling schema` | Print the JSON input schema for one operation or all operations. |
| `pixling capabilities` | List operations supported by the app. |
| `pixling doctor` | Diagnose why the CLI or MCP cannot reach Pixling (read-only). |
| `pixling inbox wait` | Block until unread IDs newer than --since exist, waking on the app's notification. Keeps waiting while the app is down. |
| `pixling inbox receive` | Hold a receiver: it tells the app your session hears what the user writes at once. Exits 0 when the user puts it away, 3 when Pixling is unreachable or the connection ends, 5 when refused. |
| `pixling inbox watch` | Wait once for unread IDs, without reading bodies. Repeats unread IDs until read. |
| `pixling inbox read` | Read a message body and persist its read status. |
| `pixling residents` | List residents on the desktop, per display from front to back. |
| `pixling resident place` | Move, resize, rotate, or mirror exactly one resident. Omitted axes stay as they are. |
| `pixling resident follow` | Keep one resident against a window's edge, following rectangles read from stdin until it ends. |
| `pixling resident describe` | Show one resident's current settings and the values it can take. |
| `pixling resident set` | Change one resident's settings. Use shorthand flags for common fields, or --input JSON / `pixling call resident.set` for all fields. |
| `pixling resident desktop-visibility` | Hide here, show here, or show only here; keeps position and physical display. |
| `pixling resident ensure` | Create or recover one resident by stable client namespace/key. Stowed keys stay stowed while bound. |
| `pixling resident summon` | Bring one resident from the zukan to the desk as a new copy. |
| `pixling resident duplicate` | Duplicate exactly one placed resident, settings included. |
| `pixling resident stow` | Put exactly one placed resident back into the zukan. |
| `pixling resident sketch` | Print a coarse ASCII sketch of a resident (its resting frame, or frames of one motion) plus the shape of each stored size of its picture. |
| `pixling resident glow` | Light one resident once: what (all, colors, color groups, points), which color, and how (pulse, sweep, blink). Success means accepted, not confirmed playback. |
| `pixling resident emote` | Pop an emoji or short text above one resident's head. Success means accepted, not confirmed playback. |
| `pixling resident bounce` | Squash one resident against a side and spring back, like hitting a wall. Calls stack. Success means accepted, not confirmed playback. |
| `pixling resident throw` | Throw one resident with an initial velocity (pt/s, +x right, +y up). The endpoint is saved before it moves. |
| `pixling resident status` | Give your own resident a temporary status (a name, idle motion or pose) until replaced, cleared or expired. Nothing is saved. |
| `pixling resident request-close` | Ask the user on your own resident whether to close this session; yes puts the resident away. |
| `pixling resident events` | Print one JSON line per click on your own resident until it is put away. Nothing is kept. |
| `pixling note get` | Read a local note. |
| `pixling note set` | Replace a local note; empty text clears it. |
| `pixling settings get` | Read the app-wide settings, the read-only connection values and the options. |
| `pixling settings set` | Change app-wide settings in one save; pass --input JSON (or `pixling call settings.set`) for all fields. |
| `pixling conversation read` | Read one resident's conversation, oldest first, in pages. The user's words carry text only through your client: selector. |
| `pixling app quit` | Quit Pixling, as the resident menu's Quit Pixling does (Studio quits too). |
| `pixling zukan` | List the residents in the zukan (library), with how many copies are on the desk, in pages. |
| `pixling import prepare` | Start a draft from a file (or add it to --draft as another motion), change a motion, or reopen --asset. |
| `pixling import adopt` | Save a prepared draft into the zukan as one resident, once; a reopened draft replaces its resident. |
| `pixling kit list` | List the speech kits: built in, and the user's own. |
| `pixling kit describe` | Read one kit as drawn: its parts, colours, motion, presets, forms and notes. |
| `pixling kit set` | Change a kit from a JSON patch object (inline, @file, or stdin). Built-in kits copy to <id>.mine on first change. |
| `pixling kit duplicate` | Copy a kit as one of the user's; prints its id. |
| `pixling kit delete` | Delete one of the user's kits; copies over it stay as standalone kits. Built-in kits are refused. |
| `pixling kit import` | Import a kit folder copied into the import folder (`pixling capabilities` shows it), by its bare name. |
| `pixling kit export` | Export a built-in or user kit into the import folder as kit.json + parts/*.png. |
| `pixling kit preview` | Render a static offscreen PNG preview of a speech kit into the import previews folder. |
| `pixling kit prop-list` | List registered prop PNGs (`speech-props/<sha256>.png`) usable in frameSpec and props. |
| `pixling kit prop-import` | Register a PNG inside the import folder as a speech prop asset (`speech-props/<sha256>.png`). |
| `pixling message send` | Show a speech bubble on residents, or with --keep leave a letter that waits for the user. |
| `pixling question ask` | Ask one resident a question and wait for the answer. |
| `pixling question result` | Read, or wait for, the answer to a question asked earlier. |
| `pixling question cancel` | Take back your own pending question (it closes as cancelled; nothing goes to the inbox). |
| `pixling sequence start` | Run steps, or a saved sequence by --name, on exactly one resident. |
| `pixling sequence get` | Read a run's state. |
| `pixling sequence cancel` | Cancel a run and its remaining steps. |
| `pixling sequence save` | Save steps under a name for a resident's asset (the same name replaces it). |
| `pixling sequence list` | List the sequences saved for an asset. |
| `pixling sequence delete` | Delete one saved sequence by name. |
| `pixling status define` | Save or remove a status name's look: a saved sequence to enter with and/or an idle motion or pose to hold (the same name replaces it). |

## Full usage synopsis

<details>
<summary>Show full CLI flag synopses for all subcommands</summary>

```text
pixling [--json] call <operation> [<input>]
pixling [--json] rpc [--concurrency <concurrency>]
pixling [--json] schema [<operation>]
pixling [--json] capabilities
pixling [--json] doctor
pixling [--json] inbox wait [--namespace <namespace>] [--key <key>] [--since <since>]
        [--timeout-ms <timeout-ms>] [--multiplex]
pixling [--json] inbox receive [--namespace <namespace>] [--key <key>] [--multiplex]
pixling [--json] inbox watch --namespace <namespace> --key <key> [--wait-ms <wait-ms>]
pixling [--json] inbox read --namespace <namespace> --key <key> <message-id>
pixling [--json] residents [--layer <layer>] [--client <client>] [--detail <detail>]
        [--query <query>]
pixling [--json] resident place --to <to> [--x <x>] [--y <y>] [--size <size>] [--scale <scale>]
        [--rotation <rotation>] [--mirrored <mirrored>]
pixling [--json] resident follow --to <to> [--edge <edge>] [--at <at>] [--offset-x <offset-x>]
        [--offset-y <offset-y>] [--layer <layer>]
pixling [--json] resident describe --to <to> [--section <section> ...]
pixling [--json] resident set [--to <to>] [--input <input>] [--layer <layer>]
        [--presence <presence>] [--gravity <gravity>] [--click-through <click-through>]
        [--throw <throw>] [--hidden <hidden>] [--pose <pose>] [--motion <motion>]
        [--idle-animation <idle-animation>] [--order <order>]
pixling [--json] resident desktop-visibility --to <to> --action <action>
pixling [--json] resident ensure --namespace <namespace> --key <key> [--asset-id <asset-id>]
        [--name <name>] [--note <note>] [--initial-note <initial-note>] [--group-id <group-id>]
        [--initial <initial>]
pixling [--json] resident summon --who <who> [--x <x>] [--y <y>] [--size <size>] [--note <note>]
        [--group-id <group-id>]
pixling [--json] resident duplicate --to <to>
pixling [--json] resident stow --to <to>
pixling [--json] resident sketch --to <to> [--columns <columns>] [--animation <animation>]
        [--frame <frame> ...] [--colors]
pixling [--json] resident glow --to <to> [--select <select>] [--color-of <color-of> ...]
        [--point <point> ...] [--color <color>] [--shape <shape>] [--direction <direction>]
        [--duration-ms <duration-ms>] [--steps-json <steps-json>]
pixling [--json] resident emote --to <to> --text <text> [--count <count>] [--color <color>]
        [--palette <palette>]
pixling [--json] resident bounce --to <to> [--strength <strength>] [--direction <direction>]
pixling [--json] resident throw --to <to> --vx <vx> --vy <vy>
pixling [--json] resident status --to <to> [--name <name>] [--animation <animation>] [--pose <pose>]
        [--clear] [--ttl-ms <ttl-ms>]
pixling [--json] resident request-close --to <to> [--author <author>] [--wait-ms <wait-ms>]
pixling [--json] resident events --to <to> [--exclusive]
pixling [--json] note get --scope <scope> --to <to>
pixling [--json] note set --scope <scope> --to <to> --note <note>
pixling [--json] settings get
pixling [--json] settings set [--input <input>] [--menu-bar-icon <menu-bar-icon>]
        [--motion-enabled <motion-enabled>] [--login-item <login-item>] [--notify <notify>]
        [--sound <sound>] [--appearance <appearance>]
pixling [--json] conversation read --to <to> [--offset <offset>] [--limit <limit>]
pixling [--json] app quit
pixling [--json] zukan [--detail <detail>] [--query <query>] [--on-desk] [--stowed]
        [--limit <limit>] [--offset <offset>]
pixling [--json] import prepare [<paths> ...] [--draft <draft>] [--asset <asset>]
        [--motion <motion>] [--from <from>] [--to <to>] [--name <name> ...] [--dots <dots>]
        [--scale <scale>] [--foot <foot>] [--remove] [--type <type>]
pixling [--json] import adopt --draft <draft> [--name <name>] [--note <note>] [--dots <dots>]
        [--dots-rule <dots-rule>] [--dots-thicken <dots-thicken>]
pixling [--json] kit list
pixling [--json] kit describe <kit>
pixling [--json] kit set <kit> [<input>]
pixling [--json] kit duplicate <kit> [--name <name>]
pixling [--json] kit delete <kit>
pixling [--json] kit import <folder> [--replace]
pixling [--json] kit export <kit> [--folder <folder>] [--overwrite] [--flatten]
pixling [--json] kit preview <kit> [--mode <mode>] [--text <text>] [--resident-name <resident-name>]
        [--width <width>] [--scale <scale>] [--for <for>]
pixling [--json] kit prop-list
pixling [--json] kit prop-import <file> [--label <label>]
pixling [--json] message send --to <to> ... --text <text> [--font <font>] [--size <size>]
        [--glow-ms <glow-ms>] [--glow-point <glow-point> ...] [--action <action>] [--mood <mood>]
        [--author <author>] [--keep] [--status <status>] [--request-id <request-id>] [--notify]
        [--no-notify] [--sound] [--no-sound]
pixling [--json] question ask [--request-id <request-id>] --to <to> --question <question>
        [--detail <detail>] --choice <choice> ... [--choice-note <choice-note> ...]
        [--choice-recommended <choice-recommended> ...] [--multi-select] [--free-text]
        [--no-free-text] [--free-text-label <free-text-label>] [--free-text-id <free-text-id>]
        [--wait-ms <wait-ms>] [--author <author>] [--status <status>] [--notify] [--no-notify]
        [--sound] [--no-sound]
pixling [--json] question result <prompt-id> [--wait-ms <wait-ms>]
pixling [--json] question cancel <prompt-id>
pixling [--json] sequence start --to <to> [--steps <steps>] [--name <name>] [--commit <commit>]
        [--request-id <request-id>] [--dry-run] [--wait]
pixling [--json] sequence get --run <run> [--wait-ms <wait-ms>]
pixling [--json] sequence cancel --run <run>
pixling [--json] sequence save --to <to> --name <name> --steps <steps> [--occasional]
        [--no-occasional]
pixling [--json] sequence list --to <to> [--name <name>]
pixling [--json] sequence delete --to <to> --name <name>
pixling [--json] status define --to <to> --name <name> [--enter <enter>]
        [--hold-animation <hold-animation>] [--hold-pose <hold-pose>] [--remove]
```

</details>
