# App settings

> Read and change the app-wide settings through settings.get and settings.set, and what stays read only.

`settings.get` reads the app-wide settings shown on Studio's **Settings** page and the **All residents** side of the speech paper. `settings.set` writes them the same way a person does there. Every key in a `settings.set` call is validated first, so one call is one atomic save and a refusal saves nothing.

## `settings.get`

Returns three top-level objects: `settings` for writable values, `readOnly` for observable values, and `options` for the valid vocabulary accepted by `settings.set`.

```json title="MCP result (abbreviated)"
{
  "settings": {
    "menuBarIcon": true,
    "motionEnabled": true,
    "longPressToMove": false,
    "refoldAfterAnswer": true,
    "motionPlayback": "smooth",
    "notify": true,
    "textScale": 100,
    "appearance": "system",
    "avoid": true,
    "speechWindow": null,
    "loginItem": "enabled"
  },
  "readOnly": {
    "cli": true,
    "mcp": true,
    "mcpProtected": false,
    "notificationPermission": "allowed"
  },
  "options": {}
}
```

### Writable `settings` keys

| Category | Key | Values and notes |
| --- | --- | --- |
| General | `menuBarIcon` | **Show menu bar icon** (default `true`). |
| Interaction & playback | `motionEnabled` | **Animate residents** across the desk (default `true`). |
| Interaction & playback | `longPressToMove` | Boolean toggle. |
| Interaction & playback | `refoldAfterAnswer` | **Fold again after answering** (default `true`). |
| Interaction & playback | `motionPlayback` | `smooth` or `economy`. |
| Notifications & sound | `notify`, `notifyQuestion`, `notifyMessage` | Master and per-kind notification switches. |
| Notifications & sound | `sound`, `soundQuestion`, `soundMessage` | Master and per-kind arrival sound switches. |
| Appearance | `textScale` | Whole percent, `100`–`130`. |
| Appearance | `appearance` | `system`, `light`, or `dark`. |
| Speech paper defaults | `speech` | All-residents look; `own` lists axes changed from factory. |
| Speech paper defaults | `avoid` | Speech paper **No overlap** row (keeps nearby windows clear). |
| Speech paper defaults | `speechWindow` | Starting frame for new residents' windows, or `null` for automatic. |
| Login item | `loginItem` | **Show residents at login**: `enabled`, `requiresApproval`, `notRegistered`, or `notFound`. |

`speech` uses the shape of [`resident.describe`'s `settings.speech`](/docs/reference/resident-settings/#speech-paper-speech). `avoid` places nearby residents' speech windows clear of each other and their bodies. `loginItem` reflects the status macOS reports.

### Observable `readOnly` keys

| Key | Meaning |
| --- | --- |
| `cli`, `mcp`, `mcpProtected` | Connection and bearer-token switches. |
| `mcpTools` | Each MCP tool group a person can turn off. |
| `wallet` | Wallet row balance `{state, usdMicrounits?, seenAt?}`. |
| `notificationPermission` | macOS permission: `allowed`, `denied`, or `notDetermined`. |

- **`wallet` privacy:** `state` is `current`, `lastSeen`, `unknown`, or `stopped`. The bearer token, wallet owner, and purchase history are never returned, and reading never contacts the server for a balance.
- **Notification permission:** Turning `notify` on does not grant permission; only the person can allow notifications in Studio or **System Settings**.

> [!NOTE]
> **Fields supplied by Pixling Studio**
> `loginItem` and `wallet` come from Pixling Studio, so they are populated only while Studio is open. Otherwise they are `null`, accompanied by `loginItemUnavailable` and `walletUnavailable` explaining why: `studioNotRunning` or `studioNotAnswering` (Studio did not answer within 5 seconds). `loginItemUnavailable` alone means this build has no login switch.

## `settings.set`

Omitted keys stay unchanged; `null` resets a key to its default. Unknown keys fail with `invalidArguments` naming the field. On success, returns `{settings}` reflecting the updated values.

```json title="MCP request (pixling_settings_set)"
{
  "notifyMessage": false,
  "speech": { "kit": "timber-plaque", "size": 16 }
}
```

### Switches, appearance, and speech defaults

- **Switches and display rows:** The boolean switches plus `motionPlayback`, `textScale`, and `appearance` write the same values as Studio's **Settings** page.
- **`speech`:** Accepts the same axes as [`resident.set`'s `speech`](/docs/reference/resident-settings/#speech-paper-speech) and writes the **All residents** side of the speech paper. Pass `null` for one axis to restore its factory value, or `speech: null` to reset the entire paper. A kit the desk does not offer is refused with `path: "speech.kit"`, and nothing in the call is saved.
- **`avoid`:** `true`, `false`, or `null` (default).
- **`speechWindow`:** `{corner, dx, dy, width, height}`, matching `resident.set`. Sets where new residents' speech windows start (like placing a window by hand), while existing desk residents keep theirs. New residents take the pinned width and height as they are. Pass `null` to restore automatic placement.

### Login item (`loginItem`)

Pass `true`, `false`, or `null` (off) to toggle **Show residents at login** through Pixling Studio. Returns the status macOS reports, including `requiresApproval` (the person approves it in **System Settings**). Calls that omit `loginItem` never contact Studio and omit `loginItem` from the result.

- **Execution order:** Other keys validate first, Studio updates the login item, then the remaining keys save against current settings. A validation refusal leaves everything untouched. If saving fails after Studio changed the login item, `reason` reports the login item's current status.

| Refusal (`rejected`) | Cause |
| --- | --- |
| `studioNotRunning` | Studio is closed; nothing was saved. |
| `studioNotAnswering` | No reply within 5 seconds or Studio closed. Read `settings.get` before retrying, as the change may have happened. |
| `loginItemFailed` | macOS refused the change; `reason` gives its status. |
| `loginItemUnavailable` | This build has no login switch. |

> [!CAUTION]
> **Person-only settings cannot be changed by agents**
> Attempting to write `cli`, `mcp`, `mcpProtected`, `mcpTools`, or `wallet` is refused with `rejected` / `personOnly`, and nothing in the call is saved. An agent can never open or widen its own access; a person changes those rows in **Settings** › **Connect**.

### MCP groups and `app.quit`

In MCP, `pixling_settings_get` belongs to the **View** group, while `pixling_settings_set` lives in its own **App settings** group that a person can turn off; the CLI keeps both.

The **App settings** group also includes `pixling_app_quit` (`app.quit`, CLI `pixling app quit`), which quits Pixling and Studio like **Quit Pixling** in the resident menu. It replies `{quitting: true}` first and Pixling exits a moment later.

## CLI

```sh title="Terminal"
pixling settings get
pixling settings set --notify false --appearance dark
pixling settings set --input '{"notifyMessage":false,"speech":{"kit":"timber-plaque","size":16}}'
pixling call settings.set '{"speechWindow":{"corner":"bottomLeft","dx":40,"dy":30,"width":320,"height":240}}'
```

Everyday shorthand flags on `settings set`:

| Flags | Values |
| --- | --- |
| `--menu-bar-icon`, `--motion-enabled`, `--login-item`, `--notify`, `--sound` | `true`, `false`, or `default` |
| `--appearance` | `system`, `light`, `dark`, or `default` |

Pass `--input <json|@file|->` (exclusive with shorthand flags) or use `pixling call settings.set` for any other key, including `speech`, `avoid`, `speechWindow`, `textScale`, `longPressToMove`, `motionPlayback`, `refoldAfterAnswer`, and per-kind notification/sound switches.

## Related

- [Resident settings](/docs/reference/resident-settings/): Per-resident speech papers, windows, notification overrides, and settings.
- [MCP tools](/docs/reference/mcp-tools/): Tool groups, destructive hints, and how users turn groups off.
