Look up the YAML fields, CLI commands, execution rules, and retained results for hob automations.
Use this reference for the detailed automation contract and examples. Start with
Automations to build and run the guestbook
check-and-review workflow. Continue with
Building automations to add inputs,
validated agent results, and deliberate failure behavior. Use
Secrets, schedules, and trust to prepare unattended work.
Both people and agents use the same managed registry. Commands below begin with
hob automation, except the final view command. Use --help for command flags.
Command
Result
list [--scope shared|private|global]
Registry entries, including invalid definitions and diagnostics
init <name> [--scope …]
Create a scaffold; default scope is shared
init --stdin [--scope …]
Create from a complete ID-free definition; invalid input writes nothing
init --bundle <dir> [--scope …]
Create from an ID-free manifest plus all supporting assets, atomically
show <id-or-name>
Definition details and exact managed paths
apply <id-or-name> --stdin
Validate and replace the complete definition; preserve identity
apply <id-or-name> --bundle <dir>
Replace manifest and all assets together; include everything to retain
validate <bundle-or-automation.yaml> or validate --stdin
YAML examples below are fragments unless they include version. Add them to a
complete definition; provide any referenced scripts, schema files, and child automations.
Common field
Contract
id, name
Required; IDs are unique across steps and finally, matching [A-Za-z_][A-Za-z0-9_-]*
description
Optional step description
Action
Exactly one: run, exec, agent, present, automation, web, or refresh
if
One condition expression; false records a skipped step
os
windows, macos, or linux, or a list of them; on another system the step is skipped
A web step runs one flow in a web pane: the same flows and the same Host
engine as hob web flow run (see hob web --help for the step grammar).
Web panes render only in the hob desktop app. A web step therefore runs only
while a hob desktop app is attached to the Host, on the same machine or from
another one; with none attached, or with only the browser IDE or hob mobile, it
fails at once with pane_unavailable (no desktop). A desktop app that
disconnects during the step fails it the same way.
Field
Contract
file
A flow file. Same path rules as presentfile: interpolated, relative to the automation's working directory; use ${{ automation.dir }}/flows/… for a file in the bundle (covered by the bundle's trust hash)
steps
Inline flow steps instead of file; exactly one of the two
url
Where the flow starts; replaces the flow's own url:. Interpolated. A flow file's url: can also use ${{ vars.x }}, for example a base URL from this step's vars
pane
Run in an existing web pane, for example ${{ steps.sign-in.pane-id }}; without it, the flow opens a new pane
show
on-failure (default): a new pane that no window shows; a failed flow keeps it and shows it in the run's window, or records an Open pane link when the run has no window. never: a failure stays hidden with its link. always: the pane opens in the run's window; a run without a window runs the step hidden and says so in its output
keep
true keeps a passing new pane for a later step until the run ends
vars
Flow variable → interpolated value; fills ${{ vars.x }} in the flow
secrets
Flow secret → declared automation secret; fills ${{ secrets.x }} in the flow. Secret values never reach outputs or output text
pace
fast, human, demo, or milliseconds
timeout
The lower of the step's timeout and the flow's own timeout (at most 300 s) is the flow's budget
Inside a flow, ${{ vars.x }} and ${{ secrets.x }} are flow variables, set
by the step's vars and secrets; automation expressions apply only to the
step's file, url, pane, and vars values.
Reference
Value
steps.<id>.status
success when the flow passed; failure when a step failed or the flow could not run
steps.<id>.pane-id
The kept pane, for a later web step's pane
steps.<id>.outputs.passed
true or false
steps.<id>.outputs.failed-step
The first failed step, for example step 2 expect text=Paid: timeout
steps.<id>.outputs.artifacts-dir
${{ run.dir }}/web-flows/<id>: steps log, result, final snapshot, and failure screenshot
steps.<id>.outputs.open-pane
The Open pane link of a kept hidden pane
steps.<id>.outputs.<name>
Each read … as: <name> value in the flow
The run keeps the steps log and the failure screenshot as step artifacts and
shows the screenshot and an Open pane button in the run log. A pane kept
with keep: true closes when the run ends, unless a later failure keeps it;
a scheduled run leaves no hidden panes behind. hob automation validate
parses each flow and notes that web steps need an attached desktop app.
refresh: on-reconnect arms connected browser clients to reload once a replacement
backend is serving. Use it for a rebuild-and-relaunch workflow, not to refresh a report.
A step with os runs only on the systems it names and is recorded as skipped
on the others. Use it for commands that differ between systems:
Open the report on each system
- id: open-mac name: Open on macOS os: macos exec: open args: [report.html]- id: open-other name: Open on Linux or Windows os: [linux, windows] run: xdg-open report.html || start report.html
Skills run no commands on this computer. When work needs commands that run
here, or different commands per system, put it in an automation.
Top-level outputs: { verdict: "${{ steps.review.result }}" } publishes named
values to a parent via its nested step's outputs. Values cannot contain secrets.
Definition sourcing and execution targeting are separate. Shared bundles come
from the canonical checkout; choosing a worktree to execute in does not select
its copy of the definition.
Field
Contract
Omitted
Manual/nested runs inherit the admitted environment; scheduled/restart runs use the project default
environment: default
Pin the project checkout
environment: floating
Use the project checkout while permitting branch changes; later steps see its current files
environment.branch
Local target branch; global automations cannot target a branch
environment.if-missing
fail (default), or create
environment.start-point
Explicit committed ref required for creating a missing branch
Branch expressions
Only non-secret inputs.* and run.id in branch/start-point fields
Manual override
run --environment <id> or --branch <name> [--if-missing create --start-point <ref>]; literal values, no expressions
Execution rule
Contract
Worktree
Reuse a matching hob environment or create a managed worktree for an unoccupied branch; reject unattached external worktrees
Creation
No dirty-file copy, visible workspace, or switching of another checkout
Cwd
Within resolved environment, captured bundle, or run directory; arbitrary outside working directories invalid
Pinned identity
Commits allowed on the pinned branch; changing that branch or pinned detached commit fails the run
Floating identity
Initial branch/HEAD retained as provenance; branch changes permitted
Detached lifetime
Bundle/run paths retained until exit; if the Host exits first, it leaves them available
History
Records definition source/hash, execution branch/initial HEAD, creation and override markers; Open in workspace reveals the target
Branch lifecycle
No automatic cleanup, deletion, merge, rebase, push, commit, or checkout