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#
| Key | Required | Notes |
|---|---|---|
schema | Yes | 1. Lets future versions read the file. |
[workflow]#
| Key | Notes |
|---|---|
name | Required. Shown in menus. |
id | Optional. Lowercase letters, digits and -. Used by the CLI, links and Shortcuts. |
description | Optional. |
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. |
enabled | true (default) or false. |
on_interrupt | What 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]#
| Key | Notes |
|---|---|
format | "png", "jpeg", "heic" or "tiff". |
quality | 0.1–1. |
copy_at_1x | Copy Retina captures at point size. |
sound, toast | Override the app’s settings for this workflow. |
tags | Tags added to the capture, for example ["bug"]. |
[workflow.limits]#
| Key | Default | Range |
|---|---|---|
per_minute | 30 | 1–600 runs a minute |
burst | 6 | 1–60 runs at once from a burst of triggers |
concurrent | 4 | 1–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.
| Type | Keys |
|---|---|
capture | target: "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. |
annotate | preset: a background preset: "Indigo", "Teal", "Plum" or "Slate". |
auto_redact | review: "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. |
effects | preset: the name of a look. Must come after auto_redact. |
save | folder, filename (both templates), format. Without a folder, saves to the Library. |
copy | what: "image" (default), "text" or "file". |
upload | destination: 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_link | No keys. Copies the checked link from an earlier upload. |
notify | title, body (templates), sound. |
open_editor | tab: "style", "effects" or "redact". |
pin | No keys. |
run_script | See Run a script. |
delete_local | include_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].