cwltool Command Line Options


Reference executor for Common Workflow Language standards. Not for production use.

usage: cwltool [-h] [--basedir BASEDIR] [--outdir OUTDIR] [--log-dir LOG_DIR]
               [--preserve-environment ENVVAR | --preserve-entire-environment]
               [--rm-container | --leave-container]
               [--cidfile-dir CIDFILE_DIR] [--cidfile-prefix CIDFILE_PREFIX]
               [--tmpdir-prefix TMPDIR_PREFIX]
               [--tmp-outdir-prefix TMP_OUTDIR_PREFIX | --cachedir CACHEDIR]
               [--rm-tmpdir | --leave-tmpdir]
               [--move-outputs | --leave-outputs | --copy-outputs]
               [--enable-pull | --disable-pull]
               [--rdf-serializer RDF_SERIALIZER] [--eval-timeout EVAL_TIMEOUT]
               [--provenance PROVENANCE] [--enable-user-provenance]
               [--disable-user-provenance] [--enable-host-provenance]
               [--disable-host-provenance] [--orcid ORCID]
               [--full-name CWL_FULL_NAME]
               [--print-rdf | --print-dot | --print-pre | --print-deps | --print-input-deps | --pack | --version | --validate | --print-supported-versions | --print-subgraph | --print-targets | --make-template]
               [--strict | --non-strict] [--skip-schemas]
               [--no-doc-cache | --doc-cache]
               [--verbose | --no-warnings | --quiet | --debug]
               [--write-summary WRITE_SUMMARY] [--strict-memory-limit]
               [--strict-cpu-limit] [--timestamps] [--js-console]
               [--js-hint-options-file JS_HINT_OPTIONS_FILE]
               [--user-space-docker-cmd CMD | --udocker | --singularity | --podman | --no-container]
               [--tool-help] [--relative-deps {primary,cwd}] [--enable-dev]
               [--enable-ext] [--enable-color | --disable-color]
               [--default-container DEFAULT_CONTAINER] [--no-match-user]
               [--custom-net CUSTOM_NET]
               [--enable-ga4gh-tool-registry | --disable-ga4gh-tool-registry]
               [--add-ga4gh-tool-registry GA4GH_TOOL_REGISTRIES]
               [--on-error {stop,continue}]
               [--compute-checksum | --no-compute-checksum]
               [--relax-path-checks] [--force-docker-pull] [--no-read-only]
               [--overrides OVERRIDES]
               [--target TARGET | --single-step SINGLE_STEP | --single-process SINGLE_PROCESS]
               [--mpi-config-file MPI_CONFIG_FILE]
               [cwl_document] ...

path or URL to a CWL Workflow, CommandLineTool, or ExpressionTool. If the inputs_object has a cwl:tool field indicating the path or URL to the cwl_document, then the cwl_document argument is optional.


path or URL to a YAML or JSON formatted description of the required input values for the given cwl_document.

-h, --help

show this help message and exit

--basedir <basedir>
--outdir <outdir>

Output directory. The default is the current directory.

--log-dir <log_dir>

Log your tools stdout/stderr to this location outside of container This will only log stdout/stderr if you specify stdout/stderr in their respective fields or capture it as an output


Run jobs in parallel.

--preserve-environment <envvar>

Preserve specific environment variable when running CommandLineTools. May be provided multiple times. By default PATH is preserved when not running in a container.


Preserve all environment variables when running CommandLineTools without a software container.


Delete Docker container used by jobs after they exit (default)


Do not delete Docker container used by jobs after they exit

--cidfile-dir <cidfile_dir>

Store the Docker container ID into a file in the specified directory.

--cidfile-prefix <cidfile_prefix>

Specify a prefix to the container ID filename. Final file name will be followed by a timestamp. The default is no prefix.

--tmpdir-prefix <tmpdir_prefix>

Path prefix for temporary directories. If –tmpdir-prefix is not provided, then the prefix for temporary directories is influenced by the value of the TMPDIR, TEMP, or TMP environment variables. Taking those into consideration, the current default is /tmp/.

--tmp-outdir-prefix <tmp_outdir_prefix>

Path prefix for intermediate output directories. Defaults to the value of –tmpdir-prefix.

--cachedir <cachedir>

Directory to cache intermediate workflow outputs to avoid recomputing steps. Can be very helpful in the development and troubleshooting of CWL documents.


Delete intermediate temporary directories (default)


Do not delete intermediate temporary directories


Move output files to the workflow output directory and delete intermediate output directories (default).


Leave output files in intermediate output directories.


Copy output files to the workflow output directory and don’t delete intermediate output directories.


Try to pull Docker images


Do not try to pull Docker images

--rdf-serializer <rdf_serializer>

Output RDF serialization format used by –print-rdf (one of turtle (default), n3, nt, xml)

--eval-timeout <eval_timeout>

Time to wait for a Javascript expression to evaluate before giving an error, default 60s.

--provenance <provenance>

Save provenance to specified folder as a Research Object that captures and aggregates workflow execution and data products.


Record user account info as part of provenance.


Do not record user account info in provenance.


Record host info as part of provenance.


Do not record host info in provenance.

--orcid <orcid>

Record user ORCID identifier as part of provenance, e.g. or 0000-0002-1825-0097. Alternatively the environment variable ORCID may be set.

--full-name <cwl_full_name>

Record full name of user as part of provenance, e.g. Josiah Carberry. You may need to use shell quotes to preserve spaces. Alternatively the environment variable CWL_FULL_NAME may be set.


Print corresponding RDF graph for workflow and exit


Print workflow visualization in graphviz format and exit


Print CWL document after preprocessing.


Print CWL document dependencies.


Print input object document dependencies.


Combine components into single document and print.


Print version and exit


Validate CWL document only.


Print supported CWL specs.


Print workflow subgraph that will execute. Can combined with –target or –single-step


Print targets (output parameters)


Generate a template input object


Strict validation (unrecognized or out of place fields are error)


Lenient validation (ignore unrecognized fields)


Skip loading of schemas


Disable disk cache for documents loaded over HTTP


Enable disk cache for documents loaded over HTTP


Default logging


Only print errors.


Only print warnings and errors.


Print even more logging

--write-summary <write_summary>, -w <write_summary>

Path to write the final output JSON object to. Default is stdout.


When running with software containers and the Docker engine, pass either the calculated memory allocation from ResourceRequirements or the default of 1 gigabyte to Docker’s –memory option.


When running with software containers and the Docker engine, pass either the calculated cpu allocation from ResourceRequirements or the default of 1 core to Docker’s –cpu option. Requires docker version >= v1.13.


Add timestamps to the errors, warnings, and notifications.


Enable javascript console output


Disable javascript validation.

--js-hint-options-file <js_hint_options_file>

File of options to pass to jshint. This includes the added option “includewarnings”.

--user-space-docker-cmd <cmd>

(Linux/OS X only) Specify the path to udocker. Implies –udocker


(Linux/OS X only) Use the udocker runtime for running containers (equivalent to –user-space-docker-cmd=udocker).


Use Singularity or Apptainer runtime for running containers. Requires Singularity v2.6.1+ and Linux with kernel version v3.18+ or with overlayfs support backported.


Use Podman runtime for running containers.


Do not execute jobs in a Docker container, even when DockerRequirement is specified under hints.


Print command line help for tool

--relative-deps {primary,cwd}

When using –print-deps, print paths relative to primary file or current working directory.


Enable loading and running unofficial development versions of the CWL standards.


Enable loading and running ‘cwltool:’ extensions to the CWL standards.


Enable logging color (default enabled)


Disable colored logging (default false)

--default-container <default_container>

Specify a default software container to use for any CommandLineTool without a DockerRequirement.


Disable passing the current uid to docker run –user

--custom-net <custom_net>

Passed to docker run as the ‘–net’ parameter when NetworkAccess is true, which is its default setting.


Enable tool resolution using GA4GH tool registry API


Disable tool resolution using GA4GH tool registry API

--add-ga4gh-tool-registry <ga4gh_tool_registries>

Add a GA4GH tool registry endpoint to use for resolution, default [’’]

--on-error {stop,continue}

Desired workflow behavior when a step fails. One of ‘stop’ (do not submit any more steps) or ‘continue’ (may submit other steps that are not downstream from the error). Default is ‘stop’.


Compute checksum of contents while collecting outputs


Do not compute checksum of contents while collecting outputs


Relax requirements on path names to permit spaces and hash characters.


Pull latest software container image even if it is locally present


Do not set root directory in the container as read-only

--overrides <overrides>

Read process requirement overrides from file.

--target <target>, -t <target>

Only execute steps that contribute to listed targets (can be provided more than once).

--single-step <single_step>

Only executes a single step in a workflow. The input object must match that step’s inputs. Can be combined with –print-subgraph.

--single-process <single_process>

Only executes the underlying Process (CommandLineTool, ExpressionTool, or sub-Workflow) for the given step in a workflow. This will not include any step-level processing: ‘scatter’, ‘when’; and there will be no processing of step-level ‘default’, or ‘valueFrom’ input modifiers. However, requirements/hints from the step or parent workflow(s) will be inherited as usual.The input object must match that Process’s inputs.

--mpi-config-file <mpi_config_file>

Platform specific configuration for MPI (parallel launcher, its flag etc). See README section ‘Running MPI-based tools’ for details of the format.