flowdeck ui mac.
Common Flags
Most macOS UI automation commands support:--appto target a specific app by name, bundle ID, or PID. Required on most commands. Examples:--app "Safari",--app "com.apple.Safari",--app "12345".--jsonfor machine-readable output.
- Numeric string → PID
- Contains a dot → bundle ID
- Otherwise → fuzzy match against running app names
Permissions
| Command | Purpose | Key Options |
|---|---|---|
ui mac check-permissions | Check Accessibility and Screen Recording permissions | --json |
ui mac request-permissions | Trigger system permission dialogs | --json |
Capture
| Command | Purpose | Key Options |
|---|---|---|
ui mac screen | Screenshot + accessibility tree from app window | --app, --tree, --output, --json |
Query
| Command | Purpose | Key Options |
|---|---|---|
ui mac find | Locate elements by label/ID/role | --app, --by-id, --by-role, --contains |
ui mac list apps | List running GUI apps | --include-agents, --include-system |
ui mac list windows | List app windows | --app |
ui mac list screens | List connected displays | --json |
ui mac list permissions | Check permission status | --json |
Interaction
| Command | Purpose | Key Options |
|---|---|---|
ui mac click | Click element or coordinates | --app, --point, --by-id, --duration |
ui mac double-click | Double-click element or coordinates | --app, --point, --by-id |
ui mac right-click | Right-click element or coordinates | --app, --point, --by-id |
ui mac type | Type text into focused element | --app, --clear, --delay-ms, --mask |
ui mac erase | Erase text from focused field | --app, --characters |
ui mac scroll | Scroll in a direction | --app, --direction, --amount, --smooth, --until, --timeout |
ui mac move | Move cursor to a point | --point, --app |
ui mac drag | Drag from one point to another | --app, --from, --to, --duration |
ui mac swipe | Swipe in a direction | --app, --direction, --distance, --duration |
Keyboard
| Command | Purpose | Key Options |
|---|---|---|
ui mac key | Press a key by name or keycode | --app, --name, --keycode |
ui mac hotkey | Press a keyboard shortcut | --app, combo argument (e.g., cmd+s) |
Wait and Assert
| Command | Purpose | Key Options |
|---|---|---|
ui mac wait | Wait for element condition | --app, --condition, --timeout, --by-id |
ui mac assert visible | Assert element is visible | --app, --by-id |
ui mac assert hidden | Assert element is hidden | --app, --by-id |
ui mac assert enabled | Assert element is enabled | --app, --by-id |
ui mac assert disabled | Assert element is disabled | --app, --by-id |
ui mac assert text | Assert element text matches | --app, --expected, --contains, --by-id |
App Lifecycle
| Command | Purpose | Key Options |
|---|---|---|
ui mac launch | Launch an app by bundle ID | --bundle-id |
ui mac activate | Bring an app to front | --app |
ui mac quit | Quit an app | --app, --force |
Window Management
| Command | Purpose | Key Options |
|---|---|---|
ui mac window list | List app windows | --app |
ui mac window move | Move a window | --app, --to, --index |
ui mac window resize | Resize a window | --app, --size, --index |
ui mac window focus | Focus a window | --app, --index |
Menu Interaction
| Command | Purpose | Key Options |
|---|---|---|
ui mac menu list | List app menu bar items | --app |
ui mac menu click | Click a menu item by path | --app, path argument |
Key Options Explained
Screen
--outputsets the screenshot file path (PNG). If omitted, FlowDeck writes to a temp file and prints the path.--treereturns only the accessibility tree (no screenshot).- Screenshots require macOS 14+ and Screen Recording permission.
- Screenshot dimensions are in pixels.
Find
--by-idmatches accessibility identifiers instead of labels.--by-rolematches element roles (e.g.,button,textField).--containsdoes a substring match against labels.- Returns element role, center coordinates, enabled state, and text value.
- Suggestions are provided when no exact match is found.
Click, Double-Click, and Right-Click
--by-idtreats the target as an accessibility identifier.--pointexpectsx,ycoordinates (screen-absolute, matchingfindoutput).--durationonclickis a long-press hold time in seconds.tapanddouble-tapare hidden aliases forclickanddouble-click.
Type and Erase
--clearclears the focused field before typing (Select All + Delete).--delay-msoverrides the per-character typing delay.--maskhides the typed text in terminal output and JSON (useful for passwords).erase --characters 5deletes a specific number of characters; omit to clear all.
Key and Hotkey
key --nameaccepts key names:return,escape,tab,delete,space,f1–f12, arrow keys, etc.key --keycodeaccepts raw virtual keycodes.hotkeyaccepts modifier+key combos:cmd+s,cmd+shift+z,ctrl+alt+delete.- Supported modifiers:
cmd/command,shift,ctrl/control,alt/option.
Scroll
--directionis required:up,down,left, orright.--amountsets the scroll magnitude in discrete ticks (default:3).--smoothenables many small ticks with delays for smooth scrolling.--untilscrolls repeatedly until the target element appears. Useid:myElementfor accessibility ID matching.--timeoutsets the deadline for--untilin seconds (default:30).- Scroll is performed at the center of the app’s focused window.
Move, Drag, and Swipe
move --pointexpectsx,yscreen-absolute coordinates.drag --fromand--toexpectx,ycoordinates.--durationis in seconds (default:0.5).swipe --directionacceptsup,down,left,right.--distanceis in points (default:200).
Wait
--conditionaccepts:exists(default),gone,enabled,stable. Invalid values are rejected with an error.--timeoutis in seconds (default:30).--by-idtreats the target as an accessibility identifier.
Assert
Assert element conditions with immediate pass/fail (no polling). Exits with failure if the assertion does not hold. Subcommands:| Subcommand | Description |
|---|---|
visible <target> | Assert the element is visible |
hidden <target> | Assert the element is hidden |
enabled <target> | Assert the element is enabled |
disabled <target> | Assert the element is disabled |
text <target> | Assert the element text matches |
| Option | Description |
|---|---|
--by-id | Treat target as accessibility identifier |
--app | Target app |
| Option | Description |
|---|---|
--expected <text> | Expected text value (required) |
--contains | Check whether the text contains the expected value |
App Lifecycle
launch --bundle-idstarts an app by its bundle identifier.activate --appbrings a running app to the foreground.quit --appsends a graceful terminate.--forceforce-quits.
Window Management
--indexselects which window (default:0, the first/main window).window move --toexpectsx,yfor the new origin.window resize --sizeexpectsw,hfor the new dimensions.
Menu Interaction
menu listshows the app’s menu bar hierarchy with titles, shortcuts, and enabled state.menu clicknavigates a menu path using>separators.
List
list appsshows running GUI applications with PID, name, and bundle ID.--include-agentsincludes background agent apps.--include-systemincludes system processes.list windowsrequires--app.list screensshows connected displays with frame and scale info.list permissionsshows Accessibility and Screen Recording status.
Coordinate System
- All coordinates are screen-absolute points (matching what
findreturns). - Multi-display setups use the global coordinate space (origin at primary display top-left).
- Do not apply Retina scaling; use coordinates as reported by
findandlist screens. - Use
flowdeck ui mac list screensto see display layouts and pixel densities.
Timing Tuning
Set these environment variables to adjust input timing:FLOWDECK_HID_STABILIZATION_MSadds settle time between input events (default:25)FLOWDECK_TYPE_DELAY_MSadds per-character typing delay (default:1)
flowdeck ui mac --help.