Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

cuewire CLI reference

cuewire is the command that agents use to work together on a canvas. It talks to Cuewire’s bridge: the part of Cuewire’s background service that passes tasks, results and notes between wired agents.

You rarely type it yourself. Agents run it in their terminals, and Cuewire’s cuewire skill teaches them how. Ask an agent in plain words, for example “Ask Reviewer to check this change”, and it picks the command.

  • It works only in a terminal on a Cuewire canvas.
  • It reaches only the agents, notes and portals wired to that terminal.

To learn how wires, tasks and notes fit together, see Agents working together. The full list of commands follows.

cuewire lets an agent in a Cuewire terminal work with the agents, notes and portals wired to it on the canvas.

Output goes to stdout; errors go to stderr as cuewire: <message> with exit code 2. Run this command inside a Cuewire terminal: it needs CUEWIRE_BRIDGE_SOCKET, CUEWIRE_PEER_ID and CUEWIRE_PEER_TOKEN.

Agents

CommandWhat it does
cuewire listWho and what is connected to you
cuewire peersThe same agents as JSON
cuewire ask <agent> <prompt...>Give an agent a task and wait for its result (up to 10 minutes)
cuewire ask <agent> --raw <input...>Type raw keystrokes (escapes: \ \n \r \t \e \xHH)
cuewire ask --batch '{"A":"...","B":"..."}'Ask several agents in parallel; JSON results sorted by name
cuewire send <agent> <prompt...>Give a task without waiting; prints the task id
cuewire ask|send <agent> --done-when <text> <prompt...>A task with a contract: also –minutes, –tokens, –max-rounds, –file, –decision
cuewire ask|send <agent> --reroute <prompt...>If that agent is at a usage limit, an idle agent with its role takes it
cuewire check <agent>Show an agent’s current screen
cuewire wait <task-id> [ms]Wait for a task’s result (JSON, or null on timeout; default 30000)
cuewire tasksTasks you sent or received (JSON)
cuewire cancel <task-id> [reason...]Stop a task you sent, and every task handed on from it

When you are given a task

CommandWhat it does
cuewire next [ms]Wait for your next task (JSON, or null on timeout; default 30000)
cuewire result [--failed] <task-id> <summary...>Report the outcome; only this completes a task

Notes

CommandWhat it does
cuewire note listConnected notes (JSON)
cuewire note read <note> [start [count]]Numbered lines
cuewire note write <note> <content...>Replace the content (- reads it from stdin)
cuewire note append <note> <content...>Add to the end (- reads it from stdin)
cuewire note edit <note> <old> <new>Replace one exact occurrence

Portals

CommandWhat it does
cuewire portal devicesConnected devices (device portals are not available yet)
cuewire portal <verb> <portal> [args...]navigate, click, fill, type, key, screenshot, … (all verbs: help –markdown)

A target is @e<n> (a ref from snapshot), x,y (a point) or a CSS selector.

Portal verbWhat it does
cuewire portal navigate <portal> <url>Open a URL
cuewire portal back <portal>Back one page
cuewire portal forward <portal>Forward one page
cuewire portal reload <portal>Load the page again
cuewire portal tabs <portal>List the portal’s tabs
cuewire portal tab-new <portal> [url]Open another tab and show it
cuewire portal tab <portal> <n>Show tab n (from 1)
cuewire portal tab-close <portal> <n>Close tab n (not the first)
cuewire portal info <portal>URL, title and viewport
cuewire portal snapshot <portal>Accessibility snapshot with @e refs
cuewire portal screenshot <portal>Save a PNG and print its path
cuewire portal click <portal> <target>Click an element
cuewire portal fill <portal> <target> <value...>Set a field’s value
cuewire portal type <portal> <text...>Type into the focused element
cuewire portal select-all <portal> [target]Select all text
cuewire portal clear <portal> [target]Clear a field
cuewire portal hover <portal> <target>Hover an element
cuewire portal focus <portal> <target>Focus an element
cuewire portal select <portal> <target> <option...>Choose a select option
cuewire portal check <portal> <target>Tick a checkbox
cuewire portal uncheck <portal> <target>Untick a checkbox
cuewire portal scroll <portal> <up|down|left|right> [px] [target]Scroll (default 600 px)
cuewire portal scroll-into-view <portal> <target>Scroll an element into view
cuewire portal text <portal> <target>An element’s text
cuewire portal html <portal>The page HTML
cuewire portal eval <portal> <expression...>Evaluate JavaScript
cuewire portal logs-start <portal>Start capturing console logs
cuewire portal logs <portal>Captured console logs
cuewire portal resize <portal> <WxH>Set the viewport (100–8192 px per side)
cuewire portal ua <portal> [preset]Set or reset the user agent
cuewire portal key <portal> <chord>Press a key chord such as ctrl+a
cuewire portal button <portal> <home|lock|side>Press a device button (device portals; not yet)
cuewire portal launch <portal> <app>Launch a device app (device portals; not yet)
cuewire portal terminate <portal> <app>Stop a device app (device portals; not yet)
cuewire portal swipe <portal> <from> <to>Swipe on a device (device portals; not yet)
cuewire portal boot <portal>Boot a device (device portals; not yet)
cuewire portal shutdown <portal>Shut a device down (device portals; not yet)
cuewire portal adb <portal> <args...>Run adb against an Android device (device portals; not yet)

ORCHESTRATOR only (the app must have the canvas open)

CommandWhat it does
cuewire recruit <name> [--preset <agent>] [--role <role>] [--replace <agent>]Add an agent to the canvas
cuewire dismiss <agent>Remove an agent
cuewire connect <from> <to>Wire two things together
cuewire note create <name> [content...]Create a note
cuewire portal create <url> [--name <name>] [--size WxH]Open a browser portal
cuewire portal close <portal>Close a portal’s page (it reopens on next use)

Agent integrations

CommandWhat it does
cuewire agent-event [--if-bridged]Forward a hook payload from stdin
cuewire codex-notify <json>Forward a Codex notify payload