CLI reference
Three Artisan commands, registered automatically.
workflow:build
php artisan workflow:build {id?}
Interactively build or edit a workflow definition step by step. With no id, you
choose to start a new workflow or pick an existing one to edit. With an id that
exists, you edit it (version bumps on save); with one that doesn't, you name and
create it.
Walks you through the trigger, then a menu loop for adding / reconfiguring /
removing / reconnecting nodes, then validation and save. Only nodes and triggers
that report cliSupported() are offered. See
Building workflows.
workflow:run
php artisan workflow:run {id} {--payload=}
Run a workflow synchronously and print its execution timeline.
| Argument / option | Notes |
|---|---|
id | Required. The workflow id. Unknown ids list what's available. |
--payload= | JSON object used as the trigger payload. |
When --payload is omitted and the trigger accepts input, the command prompts
for each field, seeded from the trigger's saved config. In a non-interactive
context it runs with whatever --payload provided (or an empty payload).
Exit code is 0 only if the execution succeeded.
workflow:make-node
php artisan workflow:make-node {name} {--type=} {--trigger} {--force}
Generate a new node (or trigger) class from a stub.
| Argument / option | Notes |
|---|---|
name | Class name, e.g. SendSlackMessageNode. Prompted if omitted. |
--type= | The type identifier, e.g. app::send-slack-message. Defaults to app:: + kebab-cased class name. |
--trigger | Generate a Trigger subclass instead of a Node. |
--force | Overwrite an existing class. |
Nodes are written to app/Workflows/Nodes, triggers to app/Workflows/Triggers.
You still need to register the class — see
Custom nodes.