Macros (BEFORE/AFTER)

Macros let you attach steps to run before or after any command. They work the same from the CLI and the Dashboard.

Enable

User/Scripts/Macros/macros.yml
enable_macros: true
default_timeout_ms: 15000
before_command: {}
after_command: {}

Step Types

Context & Expansion

Example

enable_macros: true
default_timeout_ms: 12000

before_command:
  new:
    - setvar: { name: weekday, value: "@{date.weekday}" }
    - cli: ["echo", "Creating @args0 '@args1'"]
after_command:
  delete:
    - cli: ["echo", "Deleted: @args1"]

Safety