Command Line Interface

Many core signac-flow functions are — in addition to the Python interface — accessible directly via the $ flow command line interface (CLI).

CLI Overview

The available commands in the CLI can be shown by executing $ flow --help:

$ flow --help
usage: flow [-h] [--debug] [--version] {init,template,test-workflow} ...

flow provides the basic components to set up workflows for projects as part of
the signac framework.

positional arguments:
  {init,template,test-workflow}
    init                Initialize a signac-flow project.
    template            Create and manage custom user templates.
    test-workflow       Setup a test workspace with a project.py to test new
                        environments.

options:
  -h, --help            show this help message and exit
  --debug               Show traceback on error for debugging.
  --version             Display the version number and exit.
List of commands:

init

$ flow init --help
usage: flow init [-h] [-t {example,minimal,testing}]

options:
  -h, --help            show this help message and exit
  -t {example,minimal,testing}, --template {example,minimal,testing}
                        Specify a template to use. Default value: 'minimal'.

template

$ flow template --help
usage: flow template [-h] {create} ...

positional arguments:
  {create}
    create    Create a new custom template based on the detected or selected
              environment.

options:
  -h, --help  show this help message and exit

template create

$ flow template create --help
usage: flow template create [-h] [--extends EXTENDS] [--name NAME]

options:
  -h, --help            show this help message and exit
  --extends EXTENDS, -e EXTENDS
                        Optionally specify a template to extend (including the
                        file extension if present). If not provided, the
                        current environment's template is used. For systems
                        without a scheduler (or an unsupported scheduler) this
                        is 'base_script.sh'.
  --name NAME, -n NAME  Optionally specify a name to use as the the name of
                        the custom user template. Defaults to 'script.sh',
                        which will be used by default in flow submissions for
                        the current project.

test-workflow

$ flow test-workflow --help
usage: flow test-workflow [-h] [--num_gpus NUM_GPUS] [--num_cpus NUM_CPUS]
                          [--num_jobs NUM_JOBS]

options:
  -h, --help            show this help message and exit
  --num_gpus NUM_GPUS, -g NUM_GPUS
                        Specify the number of GPUs per node for the desired
                        GPU partition.Set to 0 to specify no GPUs.
  --num_cpus NUM_CPUS, -c NUM_CPUS
                        Specify the number of CPUs per node for the desired
                        CPU partition.
  --num_jobs NUM_JOBS, -n NUM_JOBS
                        Specify the number of jobs to initialize. Defaults to
                        10.