Workflow file reference

The TOML format of a workflow file: the workflow table, settings, limits, every step type and its keys.

Each workflow is one .toml file in the workflows folder (see Settings ▸ Workflows ▸ Folder). Files can be symlinks into a dotfiles repo.

Example#

# Bug report workflow
schema = 1

[workflow]
name = "Bug report"          # shown in menus
hotkey = "ctrl+shift+E"
on_interrupt = "resume"      # or "rollback"

[workflow.settings]
tags = ["bug"]

[[step]]
type = "capture"
target = "region"

[[step]]
type = "auto_redact"
review = "always"            # always | when_flagged | never

[[step]]
type = "upload"
destination = "direct:6F1C"  # the destination's ID, never its name
destination_name = "shots.example.com"   # display only
remote_name = "{random}"
on_failure = { retry = 3, delay_s = 2, then = "stop" }

[[step]]
type = "copy_link"

[[step]]
type = "delete_local"

Top level#

KeyRequiredNotes
schemaYes1. Lets future versions read the file.

[workflow]#

KeyNotes
nameRequired. Shown in menus.
idOptional. Lowercase letters, digits and -. Used by the CLI, links and Shortcuts.
descriptionOptional.
hotkey"ctrl+shift+B" or "⌃⇧B". Needs at least one of ctrl, opt, shift or cmd. Capture shortcuts win over a workflow that uses the same keys.
enabledtrue (default) or false.
on_interruptWhat happens if Glimmer quits mid-run. "resume" (default) carries on where it’s safe; "rollback" undoes what the run made and stops. Saved Library files and finished uploads stay either way.

[workflow.settings]#

KeyNotes
format"png", "jpeg", "heic" or "tiff".
quality0.1–1.
copy_at_1xCopy Retina captures at point size.
sound, toastOverride the app’s settings for this workflow.
tagsTags added to the capture, for example ["bug"].

[workflow.limits]#

KeyDefaultRange
per_minute301–600 runs a minute
burst61–60 runs at once from a burst of triggers
concurrent41–16 runs at the same time

Steps#

Each [[step]] has a type, and can have id, label, enabled (default true) and on_failure.

on_failure is "stop", "skip", "retry", or a table: { retry = 3, delay_s = 2, backoff = 2, max_delay_s = 60, then = "stop" } (then is "stop" or "skip"). By default uploads retry and then stop; Notify, Pin and Open editor skip; everything else stops.

TypeKeys
capturetarget: "region" (default), "window", "screen", "all_displays", "frontmost_window", "last_region". kind: "screenshot" (default) or "text". cursor, shadow, exclude_menu_bar, freeze (true/false). delay_ms: 0–60000.
annotatepreset: a background preset: "Indigo", "Teal", "Plum" or "Slate".
auto_redactreview: "always" (default), "when_flagged" (review only when unsure) or "never" (apply every finding without review). detectors: a list of kinds. min_confidence: 0–1. timeout_s: 1–600.
effectspreset: the name of a look. Must come after auto_redact.
savefolder, filename (both templates), format. Without a folder, saves to the Library.
copywhat: "image" (default), "text" or "file".
uploaddestination: required, the destination’s ID (names change, IDs don’t). destination_name (display only), remote_name (default "{random}"), subfolder, link_lifetime_days (0.01–3650), allow_guessable_name (default false).
copy_linkNo keys. Copies the checked link from an earlier upload.
notifytitle, body (templates), sound.
open_editortab: "style", "effects" or "redact".
pinNo keys.
run_scriptSee Run a script.
delete_localinclude_exports: also delete copies saved to folders. Needs an upload before it.

Rules checked when a file loads#

  • Capture comes first.
  • Auto-redact comes before any upload, and looks come after Auto-redact.
  • Copy link needs an upload before it; Delete local needs an upload, and only Notify may follow it.
  • Upload names must be hard to guess unless allow_guessable_name = true.
  • Secrets can’t be written into the file. A key that looks like a token or password is an error. Use { keychain = "item name" } to read a value from your Keychain.

Errors point at the line and column. Unknown keys are warnings with a “did you mean” suggestion.

Backups#

Before Glimmer rewrites a file (when you save in the editor or upgrade an older file), it keeps a copy in .backups in the workflows folder: the last 20 per file. Comments in the file are kept when Glimmer rewrites it.

Next#

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

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