Commands step
A commands step runs shell commands in a sandbox. Prefer short, deterministic commands.
Shape
- id: collect_logs
type: commands
workingDirectory: .
timeoutSeconds: 120
commands:
- git status
- npm test -- --reporter=json
onFailure:
- type: notify
title: Commands failed
body: "{{steps.collect_logs.output}}"
| Field | Required | Description |
|---|---|---|
commands | yes | List of shell command strings |
workingDirectory | no | Template path inside the sandbox |
repository / branch | no | Clone hints when the step needs a repo |
timeoutSeconds | no | Per-step timeout |
onFailure | no | Steps if any command fails |
Commands and workingDirectory support {{variables}}. Exit code and output are available to later steps when you set an id.