Skip to content

CLI Reference

cli

Workflow Command Line Interface.

Usage:

Text Only
cli [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli buckets

Manage Workflow Buckets.

Usage:

Text Only
cli buckets [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli buckets ls

List Buckets.

Usage:

Text Only
cli buckets ls [OPTIONS]

Options:

Text Only
  -d, --details  List details.
  --help         Show this message and exit.

cli buckets ps

List work in a bucket.

Usage:

Text Only
cli buckets ps [OPTIONS] BUCKET

Options:

Text Only
  -c, --count INTEGER  Number of works to list.
  --help               Show this message and exit.

cli buckets rm

Remove work from a bucket.

Usage:

Text Only
cli buckets rm [OPTIONS] BUCKET

Options:

Text Only
  -s, --status TEXT    Filter by status.
  -e, --event INTEGER  Filter by event.
  -t, --tag TEXT       Filter by tag.
  -p, --parent TEXT    Filter by parent.
  -f, --force          Do not prompt for confirmation
  --help               Show this message and exit.

cli configs

Manage Workflow Configs. Version 2.

Usage:

Text Only
cli configs [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli configs count

Count objects per collection.

Usage:

Text Only
cli configs count [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli configs deploy

Deploy a workflow config.

Usage:

Text Only
cli configs deploy [OPTIONS] FILENAME

Options:

Text Only
  --help  Show this message and exit.

cli configs ls

List Configs.

Usage:

Text Only
cli configs ls [OPTIONS] [NAME]

Options:

Text Only
  -q, --quiet  Only show IDs.
  --help       Show this message and exit.

cli configs ps

Get Configs details.

Usage:

Text Only
cli configs ps [OPTIONS] NAME ID

Options:

Text Only
  --details  Show more details for the object.
  --help     Show this message and exit.

cli configs rm

Remove a config.

Usage:

Text Only
cli configs rm [OPTIONS] CONFIG ID

Options:

Text Only
  --help  Show this message and exit.

cli configs stop

Stop managers for a Config.

Usage:

Text Only
cli configs stop [OPTIONS] CONFIG ID

Options:

Text Only
  --help  Show this message and exit.

cli configs version

Backend version.

Usage:

Text Only
cli configs version [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli pipelines

Manage Workflow Pipelines.

Usage:

Text Only
cli pipelines [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli pipelines count

Count pipeline configurations per collection.

Usage:

Text Only
cli pipelines count [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli pipelines ls

List pipelines.

Usage:

Text Only
cli pipelines ls [OPTIONS] [NAME]

Options:

Text Only
  -q, --quiet  Only show IDs.
  --help       Show this message and exit.

cli pipelines ps

Get pipeline details.

Usage:

Text Only
cli pipelines ps [OPTIONS] PIPELINE ID

Options:

Text Only
  --help  Show this message and exit.

cli pipelines version

Backend version.

Usage:

Text Only
cli pipelines version [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli results

Manage Workflow Results.

Usage:

Text Only
cli results [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli results count

Count of results per pipeline.

Usage:

Text Only
cli results count [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli results version

Show the version.

Usage:

Text Only
cli results version [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli results view

View a set of filtered Results.

Usage:

Text Only
cli results view [OPTIONS] PIPELINE

Options:

Text Only
  --status TEXT    Filter by status.
  --event INTEGER  Filter by event.
  --tags TEXT      Filter by tags.
  --limit INTEGER  Number of results to view.  [default: 10]
  --skip INTEGER   Number of results to skip.  [default: 0]
  --details        Show detailed information.
  --json           Output as JSON.
  --help           Show this message and exit.

cli run

Fetch and perform work.

Usage:

Text Only
cli run [OPTIONS] BUCKET...

Options:

Text Only
  -s, --site TEXT                 filter work by site.  [required]
  -t, --tag TEXT                  filter work by tag.(multiple allowed)
  -p, --parent TEXT               filter work by parent.(multiple allowed)
  -e, --event INTEGER             filter work by event.(multiple allowed)
  -f, --function TEXT             ignores work, runs this function instead
  -c, --command TEXT              ignores work, runs this command instead
  -l, --lives INTEGER RANGE       count of work to perform.  [default: -1;
                                  x>=-1]
  --sleep INTEGER RANGE           seconds to sleep between work.  [default:
                                  30; 1<=x<=300]
  -w, --workspace (FILE | URL | JSON)
                                  workspace config.  [default:
                                  /home/runner/.config/workflow/workspace.yml]
  --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
                                  logging level.  [default: INFO]
  --help                          Show this message and exit.

cli schedules

Manage Workflow Schedules.

Usage:

Text Only
cli schedules [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli schedules count

Count schedules per collection.

Usage:

Text Only
cli schedules count [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli schedules deploy

Deploy a scheduled pipeline.

Usage:

Text Only
cli schedules deploy [OPTIONS] FILENAME

Options:

Text Only
  --help  Show this message and exit.

cli schedules ls

List schedules.

Usage:

Text Only
cli schedules ls [OPTIONS]

Options:

Text Only
  -n, --name TEXT  List only Schedules with provided name.
  -q, --quiet      Only show IDs.
  --help           Show this message and exit.

cli schedules ps

Get schedule details.

Usage:

Text Only
cli schedules ps [OPTIONS] ID

Options:

Text Only
  --details  Returns the Schedule Payload.
  --help     Show this message and exit.

cli schedules rm

Remove a schedule.

Usage:

Text Only
cli schedules rm [OPTIONS] ID

Options:

Text Only
  --help  Show this message and exit.

cli schedules version

Backend version.

Usage:

Text Only
cli schedules version [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli workspace

Manage Workflow Workspaces.

Usage:

Text Only
cli workspace [OPTIONS] COMMAND [ARGS]...

Options:

Text Only
  --help  Show this message and exit.

cli workspace ls

List workspaces.

Usage:

Text Only
cli workspace ls [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli workspace purge

Purge all local workspaces.

Usage:

Text Only
cli workspace purge [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

cli workspace read

Read workspace config.

Usage:

Text Only
cli workspace read [OPTIONS] WORKSPACE

Options:

Text Only
  --help  Show this message and exit.

cli workspace set

Set the active workspace.

Usage:

Text Only
cli workspace set [OPTIONS] WORKSPACE

Options:

Text Only
  --help  Show this message and exit.

cli workspace unset

Unset active workspace.

Usage:

Text Only
cli workspace unset [OPTIONS]

Options:

Text Only
  --help  Show this message and exit.

Runners

Bash
workflow run [PIPELINE]

Note

If the work.function is a Click CLI command, then workflow run will inherit the CLI default arguments and then merge them with the work.parameters specified in the work object. This allows for a single CLI to be used for both interactive and non-interactive workflows.

Pipelines CLI

Overview

This CLI tool provides a command-line interface for interacting with the Pipelines server, enabling users to manage workflow pipelines efficiently. It supports various operations, such as deploying, listing, counting, and managing the lifecycle of pipeline configurations and schedules.

Usage

The CLI tool offers the following commands for interacting with the workflow pipelines:

Get server info

Get the current version of the pipelines server and info about configuration.

Command: workflow pipelines version

Example output:

JSON
{
    'client': {
        'baseurl': 'http://localhost:8001',
        'timeout': 15.0,
        'token': None
    },
    'server': {
        'version': '2.6.1'
    }
}

List pipelines

List all pipelines or scheduled pipelines.

Command: workflow pipelines ls [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output:

Bash
                   Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
 ID                        Name     Status   Stage ┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━┩
 65fc4dae5ffde0e8dbeebc61  example  created  1      65fc4eda5ffde0e8dbeebc65  example  created  1      65fc50065ffde0e8dbeebc69  example  created  1     └──────────────────────────┴─────────┴─────────┴───────┘

Count pipelines

Count pipelines configurations per collection.

Command: workflow pipelines count [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output:

Bash
                Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
 Name                       Count              ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
 example                    3                  ├───────────────────────────┼────────────────────┤
 Total                      3                  └───────────────────────────┴────────────────────┘

Deploy pipeline configurations

Deploy a workflow pipeline or schedule from a YAML file.

Command: workflow pipelines deploy <FILENAME> [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output:

Bash
                Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 IDs                                            ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
 65fc7450157ed72595b91a2c                       └────────────────────────────────────────────────┘

Pipeline details

Get the whole payload for a pipeline configuration or schedule.

Command: workflow pipelines ps <PIPELINE> <ID> [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output:

Bash
                 Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Pipeline: example                                 ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
 {                                                    "id": "65fc69cf5ffde0e8dbeebcc1",                  "name": "example",                                 "current_stage": 1,                                "status": "created",                               "version": "1",                                    "creation": 1711040975.1336632,                    "start": null,                                     "stop": null,                                      "pipeline": {                                        "runs_on": null,                                   "services": [],                                    "steps": [                                           {                                                    "name": "daily_monitoring_task",                   "work_id": null,                                   "runs_on": null,                                   "services": [],                                    "replicate_deployments": false,                    "work": {                                            "user": "test",                                    "site": "local",                                   "function": "guidelines.example.alpha",            "parameters": {                                      "mu0": "${{ matrix.mu0 }}",                        "alpha": "${{ matrix.alpha }}",                    "sigma0": 22.0                                   },                                                 "pipeline": "daily-monitoring-task"              },                                                 "status": "created",                               "stage": 1,                                        "if_condition": "",                                "reason": null,                                    "matrix": null,                                    "evaluate_on_runtime": false,                      "success_threshold": 1.0                         }                                                ]                                                },                                                 "deployments": null,                               "user": "test"                                   }                                                 └───────────────────────────────────────────────────┘

Stop a pipeline management

Kill a running pipeline.

Command: workflow pipelines stop <PIPELINE> <ID> [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output:

Bash
                Workflow Pipelines
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 Stopped IDs                                    ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
 65fc69cf5ffde0e8dbeebcc1                       └────────────────────────────────────────────────┘

Remove pipeline

Removes a pipeline, you can only use this command on pipelines with status="cancelled"

Command: workflow pipelines rm <PIPELINE> <ID> [OPTIONS]

Options:

  • --schedule: For interacting with the Schedule API.

Example output: