Command Syntax and Options
This reference lists every command of the Lemline command-line interface, with its options and examples.
CLI Overview
The lemline command lets you:
register, read and delete workflow definitions
start workflow instances
run runners (
listen) and the gRPC gateway (gateway start)create and inspect the configuration
apply database migrations
replay messages parked as failures
Instances are observed through the gateway and the dashboard; the CLI has no command to list, cancel, suspend or resume instances.
Basic Syntax
Global Options
These options are accepted by every command and subcommand:
Option | Description |
|---|---|
| Show help for the command |
| Show the Lemline version |
| Configuration file to use (see Configuring the Lemline Runner) |
| Set the log level (default: |
| Write logs in JSON |
Commands
Command | Purpose |
|---|---|
| Show or list workflow definitions |
| Register workflow definitions from files |
| Delete workflow definitions |
| Start a workflow instance |
| Run a runner: consume messages and execute workflows |
| Run the gRPC gateway |
| Print the effective configuration |
| Generate a configuration file |
| Apply pending database migrations |
| Show the state of database migrations |
| Re-send messages parked as failures |
definition get
With namespace, name and version: prints that definition.
Otherwise: lists the matching definitions and lets you pick one by number (
qquits). When only one matches, it is printed directly.
Option | Description | Default |
|---|---|---|
|
|
|
definition post
Registers the definitions found in the given files. The namespace, name and version come from each file's document section.
Option | Description |
|---|---|
| A definition file (repeatable) |
| A directory of definition files (repeatable) |
| Also read subdirectories |
| Replace a definition that already exists with the same name and version |
definition delete
Without --force, lists the matching definitions, lets you pick one (or * for all of them) and asks for confirmation. With --force, deletes without asking:
<namespace>: every definition of the namespace<namespace> <name>: every version of that workflow<namespace> <name> <version>: that version only
instance start
Starts a new instance and prints its id. Without a version, the latest version is used.
Option | Description | Default |
|---|---|---|
| Workflow input, as JSON |
|
| Time zone used by the workflow schedule, e.g. | system time zone |
The command returns once the instance is started; it does not wait for the result.
listen
Runs a runner until it is stopped. The runner consumes commands, events and CloudEvents for its namespaces, executes workflows and runs the background tasks (waits, retries, schedules, cleanup).
Option | Description | Default |
|---|---|---|
| Port of the metrics and health endpoints |
|
| YAML or JSON file of mocked activity responses; turns on test mode | - |
gateway start
Runs the gRPC gateway until it is stopped. See gRPC Gateway Reference.
Option | Description | Default |
|---|---|---|
| gRPC port |
|
| Port of the metrics and health endpoints |
|
config show
Prints the configuration Lemline will use, after merging the file, environment variables and system properties.
Option | Description | Default |
|---|---|---|
|
|
|
| Include non- | off |
config create
Run lemline config create -o .lemline.yaml in a terminal to choose messaging, orchestration and analytics in order. Press Enter at the analytics prompt to accept the displayed default. Lemline reads .lemline.yaml automatically from the current directory.
For scripts, supply both --messaging and --database. With both options present, the command runs without prompts. Use --analytics to select the history database explicitly. If you use the default output name, pass --config lemline.yaml to subsequent commands.
Option | Description | Default |
|---|---|---|
|
| asked |
| Orchestration database: | asked |
| Workflow history database: | See defaults below. |
| File to write |
|
| Overwrite an existing file | off |
| Print the file instead of writing it | off |
With --analytics omitted, the generated YAML follows these defaults.
Messaging | Orchestration | Generated analytics section |
|---|---|---|
SQLite | SQLite | SQLite file at |
SQLite | PostgreSQL or MySQL | PostgreSQL |
Kafka, RabbitMQ or PGMQ | Any | Section omitted |
migrate
migrate lists pending database migrations, asks for confirmation and applies them. migrate status prints every migration with its state.
Option | Description |
|---|---|
| List pending migrations without applying them |
| Apply without asking for confirmation |
failures replay
Re-sends messages that were parked in the failures table to their broker destination. Rows sent successfully are deleted; rows that cannot be decoded are reported and kept.
Option | Description | Default |
|---|---|---|
| Replay a single failure | - |
| Replay every failure with this reason |
|
| List what would be replayed | off |
| Do not ask for confirmation | off |
Environment Variables
Variable | Description |
|---|---|
| Configuration file to use when |
Every configuration property can also be set as an environment variable. See Environment Variables Reference.