Skip to content
English

Residents

Pixling is preparing for Mac App Store release. Join the waitlist on pixling.app to hear when it launches.

Operations for listing, placing, following, setting states, animating, summoning, and reading pixels of desktop residents. For CLI flags, see CLI commands; for selectors, see CLI selectors; for session ownership, see Resident binding.

Task MCP tool CLI command
List desk residents pixling_residents_list pixling residents
List Field Guide pixling_zukan_list pixling zukan
Move, resize, rotate, mirror pixling_resident_place pixling resident place
Follow a window edge CLI only pixling resident follow
Set temporary status pixling_resident_status pixling resident status
Define status looks pixling_status_define pixling status define
Stream user clicks CLI only pixling resident events
Pop emote or throw pixling_resident_emote, pixling_resident_throw pixling resident emote, throw
Squash bounce pixling_resident_bounce pixling resident bounce
Summon, duplicate, stow pixling_resident_summon, duplicate, stow pixling resident summon, duplicate, stow
Show or hide on this desktop pixling_resident_desktopVisibility pixling resident desktop-visibility
Inspect shapes and ASCII sketch pixling_resident_sketch pixling resident sketch
Read source palette and pixels pixling_resident_pixels pixling call resident.pixels

Lists placed residents and connected displays. All arguments are optional; CLI pixling residents returns the same document.

MCP arguments
{"layer": "floating", "detail": "brief", "client": "my-agent/main"}
Argument Values
layer floating, window, or wallpaper
detail brief (default) or full
query Substring of the name, case-insensitive
client Your namespace/key; marks your bound resident mine: true

The response contains displays and residents. Residents are sorted per display (main display first), then by layer front to back, then by stacking order. All coordinates are in macOS logical points.

Brief response (result)
{
"displays": [
{
"id": "display-1",
"name": "Built-in Retina Display",
"isMain": true,
"frame": { "x": 0, "y": 0, "width": 1512, "height": 982 },
"visibleFrame": { "x": 0, "y": 46, "width": 1512, "height": 899 },
"displayUUID": "37d8832a-2d66-02ca-b9f7-8f30a301b230",
"safeAreaTop": 37,
"auxiliaryTopLeftArea": { "x": 0, "y": 945, "width": 656, "height": 37 },
"auxiliaryTopRightArea": { "x": 856, "y": 945, "width": 656, "height": 37 },
"backingScaleFactor": 2
}
],
"residents": [
{
"entityID": "0194e1a2-7b3c-7000-8000-000000000001",
"number": 7,
"name": "Moku",
"selector": "No.7#1",
"layer": "floating",
"presence": "everywhere",
"displayID": "display-1",
"footprint": { "x": 240, "y": 120, "width": 128, "height": 160 },
"size": 160,
"visibility": "visible",
"clientBinding": {
"namespace": "my-agent",
"entityID": "0194e1a2-7b3c-7000-8000-000000000001",
"assetID": "pack/moku"
},
"mine": true
}
]
}
  • Display rows (displays[]): id, name, isMain, frame, visibleFrame, displayUUID, safeAreaTop, auxiliaryTopLeftArea, auxiliaryTopRightArea, and backingScaleFactor, which is 2 on Retina displays.
  • Brief resident rows (detail: brief): entityID, number, name, selector, layer, presence, displayID, footprint, size, visibility, refusal, clientBinding, and mine. rotationDegrees and mirrored appear only when non-default.
    • selector: pass directly into to.
    • footprint: bounding box of the resting body in global points.
    • size: apparent long side of the idle body in points. This matches resident.place’s size, so use it as the base for relative resizes.
    • visibility: visible, otherDesktop, offscreen, hidden, notShown, or unknown. Right after creation, notShown can be transient; re-read before changing presence or placement.
    • refusal: present only when the resident cannot receive messages or questions. A resident pinned to the wallpaper reports refusal: wallpaper and takes neither.
    • mine: present on your own resident only.
  • Full resident rows (detail: full): add kind, ordinal, zIndex, spanningDisplayIDs, scale, rotationDegrees, mirrored, canReceiveMessage, canReceiveQuestion, and conversation. See Messages and questions.

clientBinding omits the binding key. Every row with clientBinding includes lastSpokeAt (ISO 8601) once anything has been said through the resident from any sender, including lines the user types in Studio. Sequences and the tour do not update it, and it is absent right after resident.ensure.

While the app runs, lastSpokeAt never moves earlier. After a restart it is derived from the saved conversation, so it can move back or disappear if the last item was not kept (such as a cancelled question or a card dropped to make room). Deciding when a binding is stale is up to you.

CLI human output prints one line per copy (selector name layer visibility coordinates). Plain pixling residents omits spans: and conversation:; --detail full includes them.

Lists the Field Guide (the residents the user owns, whether on the desk or stowed) in number order, paginated. All arguments are optional, and filtering runs before paging.

Argument Values
detail brief or full
query Substring of the name, case-insensitive
onDesk true: at least one copy on the desk. false: stowed only. CLI: --on-desk / --stowed
limit 1–500, default 50
offset Default 0
  • Brief entries rows: selector (No.N), id, name, kind, and onDesk (copies on the desk).
  • Full rows: add number and shapes (the stored sizes of its picture; see Shapes and pixling_resident_sketch).
  • Paging and loading: total is the filtered count; nextOffset is the next page’s offset or null at the end. loadState (unread, loading, or failed) appears on a row until its pixels finish loading.

CLI human output prints selector name kind on desk ×n|stowed, plus a trailing (N of TOTAL; next page: --offset M) line when more pages exist.

Moves, resizes, rotates, or mirrors one resident. Pass to plus at least one of x, y, size, scale, rotation (degrees), or mirrored. Omitted axes stay unchanged, so passing size alone keeps the feet and left edge fixed. Passing no axis fails with nothingToPlace (CLI usage error, exit 64).

MCP arguments
{"to": "No.7#1", "x": 240, "y": 120, "size": 160, "rotation": 15, "mirrored": false}
  • Coordinates (x, y): bottom-left of footprint in global points, origin at the bottom-left of the main display with +y pointing up, matching residents.list.
  • Size (size vs. scale): size is the apparent long side of the idle body in points (the opaque extent of the idle loop only, excluding sideways-reaching motions). footprint and footing use the rest frame’s body; hit testing, shadow, and window bounds still use the union of all motions. size and scale cannot be given together.
  • Bounds and snapping: ranges and steps match drag editing. The union of all motions stays between 16pt and the destination display’s long side, and the current scale is always allowed. Out-of-range size is clamped; out-of-range scale is refused. Pixel-art residents snap to the pixel grid and 15° increments; native residents accept values as given.
  • Refusals: a placement overlapping no display returns rejected / offscreen with CLI exit 5; partial overlap is allowed. Non-finite values return invalidValue. If the user is currently holding the resident (pressing, dragging, carrying, or editing), Pixling returns rejected / held with CLI exit 5 before anything moves; retry once the user lets go.
  • Result: resident contains the updated brief residents.list row. CLI human output prints placed SELECTOR: x=.. y=.. WxHpt size=.. [rotation=..] [mirrored].

Read scale from residents.list {"detail":"full"} or resident.describe with "sections":["resident"], and send it back to place unchanged.

Because size snaps to the pixel grid, requesting an initial size: 160 again can yield 157.5. scale is not re-quantized, though it is refused outside the current display’s allowed scale range. Restore position from footprint.x/y and mirroring from mirrored; rotation still rounds to 15°. If the display or expression changed, identical size and footprint are not guaranteed.

pixling resident follow --to SELECTOR anchors one resident against the outer edge of a window watched by your own program. Pixling never inspects other apps’ windows: your program streams one JSON frame object per line on stdin, and the resident follows until EOF. For a ready-to-run Chrome watcher, see Follow a window.

Terminal
printf '%s\n' '{"x":300,"y":200,"width":900,"height":600}' \
'{"x":340,"y":220,"width":900,"height":600}' \
'{"x":380,"y":240,"width":900,"height":600}' |
pixling resident follow --to 'No.1#1'

Each stdin line is one of two JSON objects:

  • {"x":…,"y":…,"width":…,"height":…}: window frame in points, origin at the top-left of the main display with +y pointing down. This matches the Accessibility API (kAXPositionAttribute, kAXSizeAttribute) and CGWindowListCopyWindowInfo (kCGWindowBounds). Add "window" with the window number (kCGWindowNumber, a positive integer) to stack the resident right above that window.
  • {"hidden":true}: temporarily hides the resident until the next visible frame (for example when minimized, closed, or on another desktop). Nothing is saved.
Flag Default Meaning
--edge top Outer edge the body touches: top (stands on window), bottom, left, or right
--at 0.85 Body center along that edge (0–1, left-to-right or top-to-bottom)
--offset-x, --offset-y 0 Shift in points using input directions (+x right, +y down)
--layer above-target Temporary layer while following: above-target, floating, or window

The --layer flag applies only while following, is never saved, and reverts to the resident’s own layer on exit:

  • above-target: when lines carry "window", places the resident among ordinary windows right above that window. Windows covering the target cover the resident too, and sending the target behind another app moves the resident behind it. Lines without "window" keep the resident’s own layer.
    • Reordering: when the target window returns to the front or after a desktop switch, resend the same line once to reorder the resident on top without moving it. Avoid repeating unnecessarily because each repeat triggers a reorder.
    • Visibility check: before ordering, Pixling checks on arrival whether that window is on screen. If not (minimized, other desktop, or closed), the resident hides as with {"hidden":true} until an on-screen frame arrives.
    • Menu bar overlap: while overlapping the menu bar, the resident keeps its own layer so the bar does not cover it.
  • floating: keeps the resident above other apps’ windows for this follow.
  • window: places the resident among ordinary windows, unordered against the target window.
  • The attached body uses footprint from residents.list; size, rotation, mirroring, and idle motion remain intact.
  • Frames placing the body off every display hide the resident until an on-screen frame arrives. While hidden (via {"hidden":true} or offscreen), idle motion pauses, and questions, the talk entrance, and new speech bubbles wait until it reappears.
  • Following survives sleep, screen lock, display changes, Reduce Motion, and non-geometric edits (name, look, motion settings, status); the next frame after wake restores its position.
  • Nothing is written to disk while streaming, and updates apply at most once per display frame (~60 Hz). Unchanged frames are no-ops unless they carry "window", which only reorders; bursts skip straight to the newest frame.
  • When following ends, the last shown position is saved once. A resident with gravity then falls according to its gravity, as after place; it never moves on its own.

The command exits 0 with one result line containing reason, samples (lines read), and applied. applied counts applied frames and excludes reorder-only repeats. Stop writing once it exits, as the next pipe write fails.

reason What happened
callerEnded stdin ended. Stopping the CLI process ends the same way and saves.
userGrabbed The user dragged, held (with long-press-to-move on), carried, or edited the resident.
replaced Another resident follow or a validated sequence start took over the resident.
residentStowed The resident was put away.
residentHidden The resident was hidden (resident set hidden or Studio).
stateChanged resident place, Studio, or the user moved or resized the resident; follow position is not saved.
saveFailed Final position could not be saved (such as disk full); returns to the previous saved position.

A plain click does not end following: the resident stays on the window, resident events hears the click, and its click shortcut opens, though its click reaction does not play while riding. A touch reaction does not replace following.

Refusals: a line matching neither JSON shape ends the command with rejected / malformedSample, path line N, and the problem (exit 5; last shown position is saved). A hidden, wallpaper-pinned, or user-held resident is refused up front (hidden, wallpaperPinned, held); busy means it is mid-motion (a throw or small action). Resident binding applies: a bound resident follows only through its client: selector.

Assigns a temporary state (a defined state name, an idle motion, or a pose) to your own bound resident. Nothing is saved.

MCP arguments
{"to": "client:my-agent/main", "name": "thinking", "ttlMs": 120000}
Argument Value
to Only client:<namespace>/<key> from resident.ensure; others fail with invalidArguments on to
name 1–64 UTF-8 bytes, no edge spaces or control characters; look from pixling_status_define
animation An ID from describe options.idleAnimation
pose A frame ID from describe options.pose
clear true clears the active status
ttlMs 1000–3600000, default 600000 (10 minutes); cannot be used with clear

Pass exactly one of name, animation, pose, or clear: true. An unknown ID fails with rejected / animationUnknown or poseUnknown. A name with no defined look is accepted and shows nothing.

Status response (result)
{
"entityID": "0194e1a2-7b3c-7000-8000-000000000001",
"status": {
"name": "thinking",
"animation": "idle",
"entering": false,
"expiresInMs": 120000,
"shown": true,
"yieldsTo": null
}
}
  • Lifecycle: a new call replaces the current status; resending the same name extends its TTL without replaying its enter sequence. A status ends on clear, TTL expiry, or app restart.
  • Result fields: returns {entityID, status} (status is null after clear; describe reports the same object).
    • name appears when set by name; animation or pose names the held expression when active.
    • entering is true while the status’s enter sequence plays.
    • missing lists enter or hold if a referenced sequence, motion, or frame no longer exists, and that part is skipped.
    • question (promptID) and expiresInMs: null appear when the status was set by question.ask.
  • When shown is false: the status is stored but not displayed, and yieldsTo names why: pose (user pinned a pose), motionOff, reduceMotion (animation only), hidden, asleep, sequence (resumes once the run ends), or unbound (no look defined for name).
  • When enter is skipped: enter is never queued. It is skipped if it cannot play immediately because of a pinned pose, motion off, Reduce Motion with a moving step, hidden, asleep, wallpaper layer, no free run, another sequence running, or the user composing to the resident or editing its settings. A question’s own state still plays while its card waits.
  • Combined with messages and questions: message.send and question.ask also accept status (a state name) for the same client: resident (Messages and questions).

CLI: pixling resident status --to client:<namespace>/<key> with --name, --animation, --pose, or --clear, plus --ttl-ms.

Saves what a status name looks like for a resident’s asset locally.

Argument Value
to Any selector naming the asset (like sequence.save); No.7 works even off the desk
name The state name
enter A sequence saved for this asset (sequence.list), played once when the state starts
hold {animation: <options.idleAnimation id>} or {pose: <options.pose id>}, held for the rest of the state
remove true deletes the name; cannot be combined with enter or hold

Provide enter, hold, or both. Redefining an existing name replaces its look; each asset stores up to 32 names. Updating a look updates residents already showing that state. Deleting a referenced sequence keeps the definition and reports it in missing.

  • Result: {assetID, statuses: [{name, enter?, hold?, missing?}]} listing all names for the asset (describe mirrors them in options.statuses).
  • Refusals (rejected): sequenceUnknown, animationUnknown, poseUnknown, bindingEmpty (neither enter nor hold), tooManyStatuses, and notFound (remove of an unknown name).

CLI: pixling status define --to <selector> --name <name> with --enter, --hold-animation, --hold-pose, or --remove.

pixling resident events --to client:<namespace>/<key> streams one JSON line per user click on your own resident while running. Nothing is buffered before you connect: clicks while no listener is attached are not replayed later. See Hear clicks for a runnable script.

Terminal
pixling resident events --to client:me/key --exclusive |
while read -r line; do echo "got $line"; done
Line Meaning
{"event":"click"} The user clicked the resident.
{"event":"ended","reason":"residentStowed"} The resident left the desk (put away or binding moved). The command exits 0.
  • Targeting: only client: selectors from resident.ensure are accepted; others fail with invalidArguments on to. Unbound or stowed keys are refused like resident.status; a binding off the desk fails with rejected / notOnDesk.
  • What counts: plain clicks on the resident itself only; Pixling never observes other input. Clicks that only dismiss another resident’s edit frame, drags, long presses, right-clicks, hovers, and wallpaper residents emit nothing.
  • --exclusive: suppresses the resident’s click reaction and click shortcut while listening, leaving hover reactions unchanged. Without --exclusive, normal click actions run alongside streaming. Every active listener receives every click.
  • Stopping: press Ctrl-C to stop and restore normal click behavior immediately. If only the downstream pipe reader exits, pixling notices on the next click; with --exclusive, that click does nothing.
  • Exit codes and limits: exit 3 means Pixling is unreachable or disconnected; exit 5 means refused (tooManyWaiters once 32 listeners are already active on the desk). Slow readers queue at most 64 clicks per connection and drop newer clicks.

pixling_resident_emote and pixling_resident_throw

Section titled “pixling_resident_emote and pixling_resident_throw”

Pops an emoji or short text above one resident’s head without a speech bubble. Each copy pops in, floats upward, and fades within ~2 seconds.

Argument Value
to One placed resident
text One line, 1–12 characters (such as ♪ or !?)
count Number of copies, 1–8 (default 1)
color Single #RRGGBB: text color (inverse outline) and OKLab emoji tint. Without palette, overrides the resident palette
palette resident (default: this resident’s worn picture palette; uncolored text uses its accent with a high-contrast edge), source (original emoji / white text), any resident.set color set id (25 presets), or 1–16 #RRGGBB hex colors

Launches one resident with velocity: {x, y} in points per second (+x right, +y up, global coordinates unaffected by resident mirroring), capped at 3000 pt/s.

With gravity, the resident arcs, bounces, and slides to rest on its gravity edge; without gravity, it glides, reflects off edges, and eases to a stop. displayBoundary and top-edge settings apply as in Gravity. The final endpoint is saved before movement begins. Each call is a new throw, so do not retry an unanswered call.

Both return {entityID, accepted: true}, and throw adds durationMs (the planned time to rest). Acceptance does not guarantee the user saw it. Refusals return rejected using the codes in Light (glow); throw adds throwDisabled (the resident’s throw setting is off), noTrajectory, and saveFailed.

CLI: pixling resident emote --to SELECTOR --text TEXT [--count N] [--color '#RRGGBB'] [--palette resident|source|SET|'#RRGGBB,...'] and pixling resident throw --to SELECTOR --vx VX --vy VY.

Squashes one resident’s body against a side and springs it back once, like hitting a wall or floor. The anchored side stays fixed, the body shrinks only inward (never past its outline), and it returns with a small secondary dip.

Argument Value
to One placed resident
strength > 0 and <= 1 (default 0.5); 1 compresses to 0.75× along that axis over ~0.35 s
direction down, up, left, or right (anchored side); default is gravity side (down if no gravity)

Bounces stack multiplicatively on top of throws, landings, and other bounces, up to 4 overlapping (a fifth replaces the one ending soonest). Returns {entityID, accepted: true}.

Refusals use the same codes as Light (glow), including reduceMotion and sequenceRunning (inside a sequence, use a cut’s bounce), plus spansDisplays while straddling two displays.

CLI: pixling resident bounce --to SELECTOR [--strength 0.5] [--direction down].

Always creates a new copy on the desk and returns its brief row (No.N#k). Takes who plus optional x, y, size, note, and groupID.

  • who: a Field Guide No.N or exact name from zukan.list. Passing a desk No.N#k, UUID, or everyone fails with rejected / invalidWho.
  • Placement: without coordinates, spawns at the center of the current display at an apparent idle body of ~160 pt. With x, y, or size, follows resident.place rules (offscreen returns offscreen).
  • groupID (CLI --group-id): joins that group in the same save. If no position is given, the copy appears beside an existing member on the desk where that member was last seen, matching resident.ensure’s groupID. An unknown group returns groupNotFound without creating anything.

Clones one placed resident along with its settings and group memberships. The clone is placed slightly offset and in front on the source’s desk (unless the source is hidden) and returns the new copy’s brief row.

Removes one resident from the desk back to the Field Guide and returns stowed (entityID, selector, name, number, ordinal) and remainingOnDesk (remaining copies of the same asset). There is no bulk stow call.

The Field Guide entry remains, while this copy and its conversation are removed. Calling summon later creates a fresh copy, and a resident.ensure binding stays stowed.

Shows or hides residents on the currently active desktop, matching right-click › On this desktop. Takes to and action. Unlike other operations on this page, to may resolve to several residents (No.7, everyone); auto fails with rejected / autoNotSupported.

action Effect
hideHere Hides the residents on the current desktop of each display they occupy; visible on other desktops.
showHere Undoes hideHere on the current desktop and also clears Hide (hidden).
onlyHere Shows the residents, clears every hideHere, and moves them once onto the current desktop (saved).
  • Operates per physical display on whichever desktop that display is showing; position, size, and physical display stay unchanged.
  • hideHere lasts only until Pixling quits (not persisted; residents reappear after restart). Use resident.set with hidden: true for a persistent hide.
  • onlyHere is a one-time move: residents summoned later are unaffected, and after restart residents appear on the desktop Pixling started on.
  • Residents bound to another client move as well, because moving is open to any caller. If no active desktop can be acted on, fails with rejected / noActiveDesktop.

Result: {action, residents}, where each resident entry carries entityID, visibility (read immediately from residents.list), and for onlyHere a placement value: placed (moved now), preparing (picture loading; moves once ready, so re-read residents.list), or offscreen (on no display, not moved).

CLI: pixling resident desktop-visibility --to SELECTOR --action hideHere|showHere|onlyHere. Human output prints desktop visibility ACTION: N resident(s) followed by one line per resident with ID, visibility, and (for onlyHere) placement.

Full zukan.list rows and resident.describe include shapes: one entry per stored resolution in the resident’s pack, coarsest first, with canvas and subject dimensions in px, aspect (width ÷ height), frames, and pixelArt.

These reflect pack resolutions rather than live desk rendering, which is controlled by settings.dots and resident.set’s dots.

resident.sketch returns a coarse ASCII rendering of one resident cropped to its subject and scaled to columns, useful for understanding body geometry before choreographing motion or glow.

  • Target (to): either a desk copy (No.N#k, UUID, or No.N/name when exactly one copy is on the desk, drawn with its mirroring and active desk dots) or a Field Guide entry (No.N/name when off the desk or multiple copies exist, drawn from its coarsest stored pixel-art size).
  • columns: 8–64 (default 32, or 24 with animation); out of range fails with rejected / invalidColumns. Glyphs are @ (dark), #, +, . (light), and space (transparent); each character cell is roughly 2 px tall.
  • Frames: omitting animation draws the rest frame. Passing animation (an ID from describe sequence.animations) draws that motion’s frames (0-based indices matching sequence cut from/to, up to 16; omitting frames picks 8 evenly spaced frames).
  • Color groups (colors: true): replaces brightness glyphs with color-group letters a–p (a is the largest share) and adds legend: [{glyph, color, share}]. Pass a legend color directly to glow’s select.groups.
  • Result: name, selector, width, height (in dots of the sketched picture), mirrored, columns, frames[] (frameID, rows, lines, and frame for motion frames), shapes, and animation / legend when requested. Full-color-only residents fail with rejected / noPixelArt.

Reads exact source palette and pixel indices for one frame of the dots a placed resident is drawn with, without moving it or capturing the screen.

Argument Meaning
to Exactly one placed resident (required)
frame A frame ID from describe options.pose; default is rest pose (not currently displayed frame)
offset Starting pixel index, 0–262143 (default 0)
count Pixel indices per page, 1–1024 (default 1024)

Result: entityID, frame, width, height (matching the dots the desk draws), coordinateSpace: "source-top-left", colorSpace: "source-rgba", offset, indices, palette (#RRGGBBAA), and nextOffset (integer, or null at the end).

  • Indexing: indices are row-major (x = (offset + i) % width, y = (offset + i) / width) from top-left, before mirroring, rotation, or block projection. 0 is transparent; n maps to palette[n - 1]. Source colors exclude palette swaps, tone, and outline settings.
  • Pagination: follow nextOffset until null with the same frame; restart from 0 if width or height changes mid-read.
  • Refusals (rejected): unsupportedRepresentation (full-color-only resident), invalidFrame, invalidPage (offset past the end), invalidPixels, and busy (only one pixel read runs at a time).
  • Use with glow: pass palette colors or coordinates directly to Light (glow).