devbox desktop to open the desktop of a macOS Devbox in a local VNC client, capture screenshots, click, type text, and press keys. The screenshot, click, type, and press commands let a script or an agent drive apps that have no command-line interface.
The desktop is available on macOS Devboxes only. Every subcommand takes the Devbox as an optional positional argument. On a terminal, omitting it opens a picker.
Usage
Options
boolean
default:"false"
Include Devboxes owned by other workspace members in the Devbox picker. Every
devbox desktop subcommand accepts this option.devbox desktop connect
Open the desktop in a local VNC client. The connection is forwarded through a local port until the VNC client disconnects or you press Ctrl+C. If no VNC client opens, connect one to the printed address with the printed credentials.
devbox desktop view is an alias for devbox desktop connect.Usage
Use another VNC client
Options
boolean
default:"false"
Print the connection details instead of opening a VNC client.
devbox desktop screenshot
Save a PNG screenshot of the desktop. The CLI prints the screenshot size, in the same pixels that devbox desktop click uses.
Usage
Save a screenshot
Write the PNG to stdout
Options
string
required
Write the PNG to this path, or to stdout when the value is
-.devbox desktop click
Click a point on the desktop. Coordinates are screenshot pixels, measured from the upper-left corner, so a point read from a screenshot can be passed as is.
Usage
Right-click a point
Options
int
required
Set the horizontal position in screenshot pixels.
int
required
Set the vertical position in screenshot pixels.
string
default:"left"
Click this mouse button:
left, middle, or right.devbox desktop type
Type text into the focused application. A newline in the text presses Enter. To press shortcuts or named keys, use devbox desktop press.
Usage
Type text
Options
string
required
Type this text.
devbox desktop press
Press keys on the desktop, in the order given. A key is one character or a named key, optionally preceded by modifiers joined with +, such as cmd+space or shift+tab.
Usage
Open Spotlight
Press several keys in order
Options
stringArray
required
Press this key, such as
enter or cmd+space. Repeat the option to press several keys in order.Related topics
Computer Controls
Capture, click, and type on a macOS Devbox from a script or an agent.
devbox exec
Launch apps and run commands without the screen.