Command reference

Every glimmer command, its arguments and its options.

glimmer help lists the commands; glimmer COMMAND --help explains one.

CommandWhat it does
captureCapture a region, window, display or the whole screen. See Capture from the command line.
ocrRead the text in an image file, standard input or a capture
grab-textPick a region on screen and print its text
uploadUpload a file or text to a destination
destinationsList upload destinations, Wherry’s and your own
windowsList capturable windows, front to back
displaysList displays in arrangement order
pipelinesList workflows
runRun a workflow by name
diffCompare two images, or an image with a live capture
watchReport changes in a region, window or display until stopped
axPrint a window’s accessibility tree as JSON
cardRender code as an image
mcpRun the MCP server for coding agents
install, uninstallAdd or remove the glimmer link in your home folder (--dir DIR to choose where)
versionPrint the command’s and the app’s versions. Never starts the app. glimmer --version does the same.
help [COMMAND]Help

Options for every command#

OptionMeaning
--json, -jPrint JSON. See JSON output and exit codes.
--quiet, -qPrint less.
--no-launchDon’t start Glimmer; fail with exit 11 if it isn’t running.
--timeout SECONDSDefault 120; 600 for commands that wait for you; none for watch and mcp. 0 means no limit.
--help, -hHelp for the command.

ocr and grab-text#

glimmer ocr FILE | ocr - | ocr (--rect … | --window … | --display D | --screen) [--fast] [--lang en-US,de-DE] [--hint automatic|prose|code|table] [--allow-empty] [--no-codes]
glimmer grab-text [--fast] [--lang LIST] [--hint automatic|prose|code|table] [--allow-empty] [--no-codes]

Prints the text. --fast skips the accurate pass. --lang pins the languages to read. --hint says what kind of text to expect: automatic (the default, decided from the image), prose, code (keeps indentation) or table. --no-codes skips QR codes and barcodes. Exits 13 when no text is found, unless --allow-empty.

upload and destinations#

glimmer destinations
glimmer upload (FILE | -) --to DESTINATION-ID [--name NAME] [--type UTI | --text]

Destination IDs come from glimmer destinations. The command prints the link only after it’s been checked, or exits 8. --text uploads standard input as text, after the same secret check as Upload Text…. Keys stay in Wherry or your Keychain; no option takes a secret.

pipelines and run#

glimmer pipelines
glimmer run NAME [--input FILE]

NAME is a workflow’s ID or name. --input FILE hands the workflow an existing file (up to 512 MB) to work on. See Workflows.

diff#

glimmer diff BASELINE (CANDIDATE | --window … | --display D | --rect … | --screen) [--tolerance 0…1] [--threshold PCT] [--mask X,Y,W,H]… [-o DIFF.png]
  • --tolerance: per-channel difference ignored as antialiasing (default 0.02).
  • --threshold: percent of pixels allowed to change (default 0). Exits 7 when exceeded.
  • --mask X,Y,W,H: ignore a region, in baseline pixels. Repeat for more.
  • Images of different sizes count as 100 % changed.

watch#

glimmer watch (--rect … | --window … | --display D | --screen) [--threshold PCT] [--interval SEC] [--count N] [--duration SEC]

Prints a line per change. --threshold is the percent that counts as a change (default 1); --interval is how often to look, 0.1–3600 seconds (default 1). Stops after --count changes, after --duration, or on Ctrl-C.

ax#

glimmer ax [--bundle-id ID | --app NAME | --title REGEX | --window-id N] [--index N] [--depth N]

Prints a window’s accessibility tree as JSON. Needs Glimmer’s Accessibility permission.

card#

glimmer card [FILE | -] [--language LANG] [--theme NAME] [-o FILE] [--format FMT]

Renders UTF-8 code (up to 1 MB) as an image. See Code cards.

In CI#

Capturing needs a logged-in session with a screen. Over SSH, from a launchd daemon or on a headless runner, capture commands fail straight away with exit 9. A self-hosted runner needs a user who’s logged in automatically, with Screen Recording allowed for Glimmer once by hand (or by an MDM profile). --region and grab-text need a person, so don’t use them in CI.

For visual tests, use diff with --mask over clocks and cursors and a small --tolerance, and treat exit 7 as a failure.

Next#

Something missing or unclear? Write to [email protected].

↑ ↓ to move, Enter to open, Esc to close