diff --git a/docs/cli.md b/docs/cli.md index 160c04d500..d8d3d94cc7 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1,386 +1,533 @@ (cli-page)= -# Command line +# Command line interface -Nextflow provides a robust command line interface (CLI) for the management and execution of pipelines. +Nextflow provides a robust command line interface (CLI) for the management and execution of pipelines. This page explains the key concepts and common usage patterns for the CLI. -Simply run `nextflow` with no options or `nextflow -h` to see the list of available top-level options and commands. See {ref}`cli-reference` for the full list of subcommands with examples. +For the complete reference of all commands, subcommands, and options, see {ref}`cli-reference`. :::{note} -Nextflow options use a single dash prefix, e.g. `-resume`. Do not confuse with double dash notation, e.g. `--resume`, which is instead used for {ref}`Pipeline parameters `. +Nextflow uses two types of command line flags: +- Nextflow options use a single dash (e.g., `-log`) and modify Nextflow's behavior. +- Pipeline parameters use a double dash (e.g., `--input`) and are passed to your pipeline script. ::: -## Basic usage +## Pipeline execution -### Hard configuration override +Pipeline execution is the core function of Nextflow. These commands run Nextflow workflows, either from local files or remote Git repositories. Nextflow handles downloading, caching, and executing pipelines with minimal user intervention. + +### Launching a project + +The `run` command executes pipeline scripts from local files or remote repositories. It automatically manages repository downloads, caching, and execution, supporting various Git providers and authentication methods. -Use the specified configuration file(s) overriding any defaults. +See {ref}`cli-run` for more information. + +**Local pipelines** + +Run a pipeline from your local filesystem: ```console -$ nextflow -C my.config COMMAND [arg...] +$ nextflow run main.nf ``` -The `-C` option is used to override *all* settings specified in the default config file. For soft override, please refer the `-c` option. +**Remote pipelines** -- Override **any** default configuration with a custom configuration file: +Use the format `/` to run a pipeline from directly from Git repositories: - ```console - $ nextflow -C my.config run nextflow-io/hello - ``` +```console +$ nextflow run nextflow-io/hello +``` + +Nextflow automatically: + +1. Downloads the repository to `$HOME/.nextflow/assets/` +2. Caches it for future runs +3. Executes the main script -### JVM properties +If you omit the organization, Nextflow searches cached pipelines first, then attempts to download from the `NXF_ORG` organization (default: `nextflow-io`). -Set JVM properties. +You can also use full repository URLs: ```console -$ nextflow -Dkey=value COMMAND [arg...] +$ nextflow run https://github.com/nextflow-io/hello ``` -This option allows the definition of custom Java system properties that can be used to properly configure or fine tuning the JVM instance used by the Nextflow runtime. +**Private repositories** -For specifying other JVM level options, please refer to the {ref}`config-env-vars` section. +Use the `-user` option to add credentials for private repositories: -- Add JVM properties to the invoked pipeline: +```console +$ nextflow run organization/private-repo -user my-username +``` - ```console - $ nextflow -Dfile.encoding=UTF-8 run nextflow-io/hello - ``` +Alternatively, configure Git authentication. See {ref}`Git configuration ` for more information. -### Execution as a background job +**Non-GitHub providers** -Execute `nextflow` in the background. +Use the `-hub` option specify Bitbucket, GitLab, or other Git providers: ```console -$ nextflow -bg COMMAND [arg...] +$ nextflow run organization/repo -hub bitbucket ``` -The `-bg` option is used to invoke the nextflow execution in the background and allows the user to continue interacting with the terminal. This option is similar to `nohup` in behavior. +**Revision selection** -- Invoke any execution as a background job: +Use the `-r` option to specify Git branches, tags, or commits: - ```console - $ nextflow -bg run nextflow-io/hello - ``` +```console +$ nextflow run nextflow-io/hello -r v1.1 +$ nextflow run nextflow-io/hello -r dev-branch +$ nextflow run nextflow-io/hello -r a3f5c8e +``` -### Soft configuration override +(cli-params)= -Add the specified file to configuration set. +### Pipeline parameters + +Pipeline parameters are values defined with `params` in your script. Override them on the command line using the `--` prefix to customize pipeline behavior without modifying code. ```console -$ nextflow -c nxf.config COMMAND [arg...] +$ nextflow run main.nf --input data.csv --output results ``` -The `-c` option is used to append a new configuration to the default configuration. The `-c` option allows us to update the config in an additive manner. For **hard override**, refer to the `-C` option. +Parameter names support automatic conversion between kebab-case and camelCase: -- Update *some* fields of the default config for any pipeline: +```console +$ nextflow run main.nf --input-file data.csv # Becomes params.inputFile +``` - ```console - $ nextflow -c nxf.config run nextflow-io/hello - ``` +Parameters without values are set to `true`: -### Help +```console +$ nextflow run main.nf --verbose # params.verbose = true +``` -Print the help message. +:::{warning} +Quote parameters containing wildcards to prevent shell expansion: ```console -$ nextflow -h +$ nextflow run main.nf --files "*.fasta" ``` +::: -The `-h` option prints out the overview of the CLI interface and enumerates the top-level *options* and *commands*. +**Parameter files** -### Execution logs +For complex parameter sets, use YAML or JSON files with `-params-file`. This is cleaner than long command lines. -Sets the path of the nextflow log file. +```json +{ + "input": "data.csv", + "output": "results/", + "min_quality": 20 +} +``` ```console -$ nextflow -log custom.log COMMAND [arg...] +$ nextflow run main.nf -params-file params.yml ``` -The `-log` option takes a path of the new log file which will be used instead of the default `.nextflow.log` or to save logs files to another directory. +**Parameter precedence** -- Save all execution logs to the custom `/var/log/nextflow.log` file: +Nextflow applies parameters defined in multiple places in the following order (lowest to highest priority): - ```console - $ nextflow -log /var/log/nextflow.log run nextflow-io/hello - ``` +1. Pipeline script defaults (`params.foo = 'default'`) +2. Configuration files (see {ref}`config-params`) +3. Parameter files (`-params-file`) +4. Command line parameters (`--foo bar`) -### Quiet execution +### Kubernetes execution -Disable the printing of information to the terminal. +The `kuberun` command executes pipelines entirely within a Kubernetes cluster. This experimental feature runs the Nextflow driver itself inside Kubernetes. + +Use this when you want both the Nextflow driver and tasks running in Kubernetes. This differs from using the Kubernetes executor with `run`, where only tasks run in Kubernetes while the driver runs externally. ```console -$ nextflow -q COMMAND [arg...] +$ nextflow kuberun nextflow-io/hello ``` -The `-q` option suppresses the banner and process-related info, and exits once the execution is completed. Please note that it does not affect any explicit print statement within a pipeline. +See {ref}`cli-kuberun` for more information. + +## Project management -- Invoke the pipeline execution without the banner and pipeline information: +Project management commands interact with Git-hosted pipelines. Nextflow integrates with Git providers (e.g., GitHub, GitLab, and Bitbucket) to treat pipelines as versioned projects and maintains a local cache in `$HOME/.nextflow/assets/`. - ```console - $ nextflow -q run nextflow-io/hello - ``` +Use these commands to explore available pipelines, inspect their code, maintain your cache, and clone projects. -### Logging to a syslog server +### Listing downloaded projects -Send logs to [Syslog](https://en.wikipedia.org/wiki/Syslog) server endpoint. +The `list` command shows all pipelines currently downloaded to your local cache. This helps you track which projects are available offline and manage your cache directory. Pipelines are stored in `$HOME/.nextflow/assets/` by default. ```console -$ nextflow -syslog localhost:1234 COMMAND [arg...] +$ nextflow list ``` -The `-syslog` option is used to send logs to a Syslog logging server at the specified endpoint. +### Showing project information -- Send the logs to a Syslog server at specific endpoint: +The `info` command displays detailed metadata about a downloaded project, including its repository location, local path, main script, and available revisions. - ```console - $ nextflow -syslog localhost:1234 run nextflow-io/hello - ``` +Use this to understand a project's structure, see available versions, or verify which revision is currently checked out. -### Version +```console +$ nextflow info hello +project name: nextflow-io/hello +repository : https://github.com/nextflow-io/hello +local path : $HOME/.nextflow/assets/nextflow-io/hello +main script : main.nf +revisions : +* master (default) + mybranch + v1.1 [t] + v1.2 [t] +``` + +This shows: + +- The full project name and repository URL +- Where it's cached locally +- Which script runs by default +- Available revisions (branches and tags marked with `[t]`) +- Which revision is currently checked out (marked with `*`) + +### Pulling or updating projects -Print the Nextflow version information. +The `pull` command downloads a pipeline or updates an existing one to the latest version from its Git repository. + +Use this to manually download pipelines before running them, update cached pipelines, or download pipelines for offline use. ```console -$ nextflow -v +$ nextflow pull nextflow-io/hello ``` -The `-v` option prints out information about Nextflow, such as the version and build. The `-version` option, in addition, prints out the citation reference and official website. +You can specify a particular revision to download. + +```console +$ nextflow pull nextflow-io/hello -r mybranch +``` -- The short version: +See {ref}`cli-pull` for more information. - ```console - $ nextflow -v - nextflow version 20.07.1.5412 - ``` +### Viewing project code -- The full version info with citation and website link: +The `view` command displays the contents of a pipeline's main script or lists all files in the repository. - ```console - $ nextflow -version - N E X T F L O W - version 20.07.1 build 5412 - created 24-07-2020 15:18 UTC (20:48 IDT) - cite doi:10.1038/nbt.3820 - http://nextflow.io - ``` +Use this to quickly inspect pipeline code without opening files or explore the project structure. Specify `-l` option lists all repository files instead of showing script contents. -## Running pipelines +```console +$ nextflow view nextflow-io/hello +$ nextflow view nextflow-io/hello -l +``` -The main purpose of the Nextflow CLI is to run Nextflow pipelines with the `run` command. Nextflow can execute a local script (e.g. `./main.nf`) or a remote project (e.g. `github.com/nextflow-io/hello`). +See {ref}`cli-view` for more information. -### Launching a remote project +### Cloning projects locally -To launch the execution of a pipeline project, hosted in a remote code repository, you simply need to specify its qualified name or the repository URL after the `run` command. The qualified name is formed by two parts: the `owner` name and the `repository` name separated by a `/` character. +The `clone` command copies a pipeline from the cache to a local directory and creates a full Git repository you can modify. -If a Nextflow project is hosted on GitHub, for example `http://github.com/nextflow-io/hello`, it can be executed by entering the following command in your shell terminal: +Use this when you want to modify an existing pipeline, create a derivative pipeline, or study a pipeline's structure. If you omit the target directory it uses the pipeline name. -```bash -nextflow run nextflow-io/hello +```console +$ nextflow clone nextflow-io/hello my-hello ``` -or using the project URL: +See {ref}`cli-clone` for more information. -```bash -nextflow run http://github.com/nextflow-io/hello +### Deleting cached projects + +The `drop` command removes a downloaded pipeline from the local cache. + +Use this to free disk space by removing pipelines you no longer need. The project is deleted from `$HOME/.nextflow/assets/`. The next `run` will download it again if needed. + +```console +$ nextflow drop nextflow-io/hello ``` -If the project is found, it will be automatically downloaded to the Nextflow home directory (`$HOME/.nextflow` by default) and cached for subsequent runs. +See {ref}`cli-drop` for more information. -:::{note} -You must use the `-hub` option to specify the hosting service if your project is hosted on a service other than GitHub, e.g. `-hub bitbucket`. However, the `-hub` option is not required if you use the project URL. -::: +### Secret management -If the `owner` is omitted, Nextflow will search your cached pipelines for a pipeline that matches the name specified. If no pipeline is found, Nextflow will try to download it using the `organization` name defined by the `NXF_ORG` environment variable (`nextflow-io` by default). +The `secrets` command manages secure pipeline secrets. -:::{tip} -To access a private repository, specify the access credentials using the `-user` command line option. Then follow the interactive prompts to enter your password. Alternatively, define your private repository access credentials using Git. See {ref}`Git configuration ` for more information. -::: +Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization. + +```console +$ nextflow secrets list +$ nextflow secrets set AWS_ACCESS_KEY_ID +$ nextflow secrets delete AWS_ACCESS_KEY_ID +``` + +See {ref}`cli-secrets` for more information. + +## Configuration and validation + +Configuration and validation options and commands help you control and verify pipeline settings. Configuration options supplement pipeline configuration at runtime, while validation commands inspect how Nextflow interprets your configuration files, process definitions, and scripts. + +Use these to customize pipeline configuration, debug configuration issues, verify settings, and catch issues before execution. + +### Soft configuration override -### Using a specific revision +The `-c` option adds your configuration on top of the defaults and merges them together. -Any Git branch, tag, or commit of a project repository can be used when launching a pipeline by specifying the `-r` option: +Use this when you want to override specific settings while keeping other defaults intact. Multiple configuration files can be specified as a comma separated list. ```console -$ nextflow run nextflow-io/hello -r mybranch +$ nextflow -c my.config run nextflow-io/hello ``` -or +See {ref}`config-page` for more information. + +### Hard configuration override + +The `-C` option replaces all default configuration with your custom configuration files. Multiple configuration files can be specified as a comma separated list. + +Use this when you want to ensure no default configurations interfere with your custom settings. Unlike `-c` which merges configurations, `-C` ensures only your specified file is used. ```console -$ nextflow run nextflow-io/hello -r v1.1 +$ nextflow -C my.config run nextflow-io/hello ``` -These commands will execute two different project revisions based on the given Git branch/tag/commit. +See {ref}`config-page` for more information. -(cli-params)= +### Configuration inspection -### Pipeline parameters +The `config` command prints the resolved configuration for a pipeline. + +Use this to debug configuration issues, verify which settings will be applied, understand configuration precedence, or inspect specific configuration properties. + +```console +$ nextflow config +$ nextflow config nextflow-io/hello +``` + +See {ref}`cli-config` for more information. -Pipeline scripts can define *parameters* that can be overridden on the command line. +### Process inspection -Parameters can be declared in the main script: +:::{versionadded} 23.10.0 +::: -```nextflow -params.alpha = 'default script value' +The `inspect` command analyzes process settings in a pipeline without executing it. It outputs container information in JSON or Nextflow configuration format. -workflow { - println "alpha = ${params.alpha}" -} +Use this to determine which container images will be used by each process before running the pipeline. + +```console +$ nextflow inspect nextflow-io/hello +$ nextflow inspect nextflow-io/hello -format json ``` -Or in a config file: +See {ref}`cli-inspect` for more information. -```groovy -params { - alpha = 'default config value' -} +### Script validation + +The `lint` command analyzes Nextflow scripts and configuration files for syntax errors and code issues. It can also automatically format your code to maintain consistent style across your project. + +Use this to catch syntax errors before execution, enforce consistent code formatting, or validate entire directories of Nextflow code. + +```console +$ nextflow lint main.nf ``` -The above parameter can be specified on the command line as `--alpha`: +See {ref}`cli-lint` for more information. + +## Execution history + +Execution history and maintenance commands manage past runs and clean up cached files. Nextflow maintains metadata about all executions and stores intermediate files in work directories. + +Use these commands to review past executions, free disk space, troubleshoot failures, or explore data lineage. + +### Execution logs + +The `log` command displays execution history and details about past pipeline runs, such as run names, timestamps, and customizable output fields. + +Use this to find run names for resuming, review execution history, or debug failed runs. The command shows recent executions by default, with options to view specific runs or customize output fields. ```console -$ nextflow run main.nf --alpha Hello +$ nextflow log +$ nextflow log dreamy_euler +$ nextflow log last -f name,status,duration ``` -:::{note} -Parameters that are specified on the command line without a value are set to `true`. -::: +See {ref}`cli-log` for more information. -:::{note} -Parameters that are specified on the command line in kebab case (e.g., `--alpha-beta`) are automatically converted to camel case (e.g., `--alphaBeta`). Because of this, a parameter defined as `alphaBeta` in the pipeline script can be specified on the command line as `--alphaBeta` or `--alpha-beta`. -::: +### Work directory cleanup -:::{warning} -When a command line parameter includes one or more glob characters, i.e. wildcards like `*` or `?`, the parameter value must be enclosed in quotes to prevent Bash expansion and preserve the glob characters. For example: +The `clean` command removes work directories and cached intermediate files from past executions. + +Use this to free disk space, clean up failed or test runs, or maintain your work directory. Use `-n` to perform a dry run and show what would be deleted. Use `-f` to delete files. ```console -$ nextflow run --files "*.fasta" +$ nextflow clean -n +$ nextflow clean dreamy_euler -f ``` + +See {ref}`cli-clean` for more information. + +### Data lineage + +:::{versionadded} 25.04.0 ::: -Parameters specified on the command line can be also specified in a params file using the `-params-file` option. +:::{warning} *Experimental: may change in a future release.* +::: + +The `lineage` command explores data lineage and provenance for workflow executions and tracks relationships between inputs, outputs, and processing steps. + +Use this to understand input/output relationships between tasks, trace data flow through the pipeline, or establish file provenance. Lineage tracking must be enabled in configuration. ```console -$ nextflow run main.nf -params-file pipeline_params.yml +$ nextflow lineage ``` -The `-params-file` option loads parameters for your Nextflow pipeline from a JSON or YAML file. Parameters defined in the file are equivalent to specifying them directly on the command line. For example, instead of specifying parameters on the command line: +See {ref}`data-lineage-page` to get started and {ref}`cli-lineage` for more information. + +## Seqera Platform + +[Seqera Platform](https://seqera.io) is a comprehensive workflow orchestration platform that extends Nextflow with features for workflow management, monitoring, and collaboration. + +Use these commands to authenticate with Seqera Platform and launch workflows directly to the Platform's managed infrastructure. + +### Platform authentication + +:::{versionadded} 25.10.0 +::: + +The `auth` command manages authentication credentials for Seqera Platform, saving access tokens for API interactions. + +Use this to log in or out of the Platform, establishing or removing your authentication credentials. ```console -$ nextflow run main.nf --alpha 1 --beta two +$ nextflow auth login ``` -Parameters can be represented in YAML format: +Additional authentication operations include checking login status, viewing configuration details, and logging out: -```yaml -alpha: 1 -beta: 'two' +```console +$ nextflow auth status +$ nextflow auth config +$ nextflow auth logout ``` -Or in JSON format: +See {ref}`cli-auth` for more information. -```json -{ - "alpha": 1, - "beta": "two" -} -``` +### Platform workflow submission -:::{note} -Parameter values in the params file can reference the following {ref}`built-in variables `: `baseDir`, `projectDir`, `launchDir`. +:::{versionadded} 25.10.0 ::: -Parameters are applied in the following order (from lowest to highest priority): +The `launch` command submits a workflow to run on Seqera Platform's infrastructure instead of your local machine. + +Use this to leverage Platform's cloud resources, monitoring capabilities, and execution management. The Platform handles resource provisioning, execution monitoring, and result storage. -1. Parameters defined in pipeline scripts (e.g. `main.nf`) -2. Parameters defined in {ref}`config files ` -3. Parameters specified in a params file (`-params-file`) -4. Parameters specified on the command line (`--something value`) +```console +$ nextflow launch nextflow-io/hello +``` -## Managing projects +See {ref}`cli-launch` for more information. -Nextflow seamlessly integrates with popular Git providers, including [BitBucket](http://bitbucket.org/), [GitHub](http://github.com), and [GitLab](http://gitlab.com) for managing Nextflow pipelines as version-controlled Git repositories. +## System utilities -The following commands allow you to perform basic operations to manage your projects. +System utilities provide administrative and development tools for managing Nextflow itself, interacting with remote filesystems, working with plugins, and debugging. -### Listing available projects +Use these commands for system administration, development, and testing. -The `list` command allows you to list all the projects you have downloaded in your computer. For example: +### Interactive console -```bash -nextflow list -``` +The `console` command launches an interactive Groovy console with Nextflow's execution context loaded. -This prints a list similar to the following: +Use this to test Nextflow DSL code interactively, debug expressions, explore Nextflow's APIs, or experiment with syntax. It opens a GUI or REPL depending on your environment. -``` -cbcrg/ampa-nf -cbcrg/piper-nf -nextflow-io/hello -nextflow-io/examples +```console +$ nextflow console ``` -### Showing project information +### Remote filesystem operations + +The `fs` command performs filesystem operations on remote storage systems supported by Nextflow, such as S3, Google Cloud Storage, and Azure Blob Storage. -By using the `info` command you can show information from a downloaded project. For example: +Use this to manage remote data, test cloud storage access, or perform bulk file operations without additional tools. ```console -$ nextflow info hello -project name: nextflow-io/hello -repository : http://github.com/nextflow-io/hello -local path : $HOME/.nextflow/assets/nextflow-io/hello -main script : main.nf -revisions : -* master (default) - mybranch - v1.1 [t] - v1.2 [t] +$ nextflow fs list s3://my-bucket/data/ +$ nextflow fs cat s3://my-bucket/data/file.txt +$ nextflow fs cp s3://my-bucket/data/file.txt s3://dest/ +$ nextflow fs delete s3://my-bucket/data/file.txt ``` -Starting from the top it shows: the project name; the Git repository URL; the local directory where the project has been downloaded; the script that is executed when launched; the list of available revisions i.e. branches and tags. Tags are marked with a `[t]` on the right and the checked-out revision is marked with a `*` on the left. +See {ref}`cli-fs` for more information. + +### Plugins + +The `plugin` command creates plugins, installs them, and executes plugin-specific operations. + +See {ref}`cli-plugin` for more information. + +**Plugin creation** -### Pulling or updating a project +:::{versionadded} 25.04.0 +::: -The `pull` command allows you to download a project from a GitHub repository or to update it if that repository has already been downloaded. For example: +Use the `create` subcommand to create a new plugin scaffold for development: ```console -$ nextflow pull nextflow-io/hello +$ nextflow plugin create +``` + +**Plugin installation** + +Use the `install` subcommand to install a plugin and extend Nextflow functionality: + +```console +$ nextflow plugin install my-plugin ``` -Alternatively, you can use the repository URL as the name of the project to pull: +**Plugin execution** + +Use the the format `plugin-name:command` to execute plugin-specific commands: ```console -$ nextflow pull https://github.com/nextflow-io/hello +$ nextflow plugin my-plugin:hello --alpha --beta ``` -Downloaded pipeline projects are stored in your directory `$HOME/.nextflow/assets` directory. +See individual plugin documentation for plugin specific commands. -### Viewing the project code +### Nextflow updates -The `view` command shows the content of the pipeline script you have pulled. For example: +The `self-update` command updates Nextflow to a newer version. It downloads and installs the latest release or a specific version. + +Use this to upgrade Nextflow, switch versions, or install edge releases. By default, it updates to the latest stable release. Specify a particular version or use the `NXF_EDGE` environment variable for development releases. ```console -$ nextflow view nextflow-io/hello +$ nextflow self-update +$ NXF_EDGE=1 nextflow self-update ``` -By adding the `-l` option to the example above it will list the content of the repository. +### Command help -### Cloning a project into a directory +The `help` command displays detailed usage information for any Nextflow command. -The `clone` command allows you to copy a Nextflow pipeline project to a directory of your choice. For example: +Use this to learn about command-specific options, refresh your memory about syntax, or discover available features for a particular command. ```console -$ nextflow clone nextflow-io/hello target-dir +$ nextflow help run ``` -If the destination directory is omitted the specified project is cloned to a directory with the same name as the pipeline base name (e.g. `hello`) in the current directory. +### Version information -The `clone` command can be used to inspect or modify the source code of a pipeline project. You can eventually commit and push back your changes by using the usual Git/GitHub workflow. +The `-v` and `-version` options print Nextflow version information. -### Deleting a project +Use `-v` for minimal output showing version and build number. -Downloaded pipelines can be deleted by using the `drop` command, as shown below: +```console +$ nextflow -v +nextflow version 24.04.0.5917 +``` -```bash -nextflow drop nextflow-io/hello +Use `-version` for detailed output showing creation date, citation, and website. + +```console +$ nextflow -version +N E X T F L O W +version 24.04.0 build 5917 +created 03-05-2024 15:07 UTC +cite doi:10.1038/nbt.3820 +http://nextflow.io ``` diff --git a/docs/reference/cli.md b/docs/reference/cli.md index c30afa4963..188c22779b 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -16,33 +16,35 @@ Available options: : Comma-separated list of configuration files which are used as the configuration set. Any other default configuration files are ignored. `-D` -: Set JVM properties. +: Set JVM properties (e.g. `-Dfile.encoding=UTF-8`). Equivalent to the `NXF_JVM_ARGS` environment variable. `-bg` -: Execute nextflow in background. +: Execute Nextflow in background. +: Allows you to close your terminal without terminating the pipeline run. `-c, -config` : Comma-separated list of configuration files which are added to the configuration set. `-d, -dockerize` -: :::{deprecated} 23.09.0-edge +: :::{deprecated} 23.10.0 ::: -: Launch nextflow via Docker (experimental). +: Launch Nextflow via Docker (experimental). `-h` -: Print this help. +: Print available commands and options. `-log` -: Set nextflow log file path. +: Set Nextflow log file path (default: `.nextflow.log`). `-q, -quiet` -: Do not print information messages. +: Do not print the Nextflow banner and execution progress to the console. +: Does not affect messages printed by the pipeline or error messages. `-remote-debug` : Enable JVM interactive remote debugging (experimental). `-syslog` -: Send logs to syslog server (e.g. localhost:514). +: Send logs to a [Syslog](https://en.wikipedia.org/wiki/Syslog) server (e.g. `localhost:514`). `-trace` : Enable trace level logging for the specified packages. Multiple packages can be provided separating them with a comma, e.g. `-trace nextflow,io.seqera`. @@ -56,7 +58,7 @@ Available options: ### `auth` -:::{versionadded} 25.09.0-edge +:::{versionadded} 25.10.0 ::: Manage Seqera Platform authentication. @@ -233,6 +235,8 @@ Would remove temp files from work/bf/334115deec60929dc18edf0010032a Would remove temp files from work/a3/06521d75da296d4dd7f4f8caaddad8 ``` +(cli-clone)= + ### `clone` Clone a remote project into a folder. @@ -280,6 +284,8 @@ $ nextflow clone nextflow-io/hello -r v1.1 nextflow-io/hello cloned to: hello ``` +(cli-config)= + ### `config` Print the resolved pipeline configuration. @@ -315,7 +321,7 @@ The `config` command is used for printing the project's configuration i.e. the ` : Sort config attributes. `-value` -: :::{versionadded} 23.08.0-edge +: :::{versionadded} 23.10.0 ::: : Print the value of a config option, or fail if the option is not defined. @@ -412,6 +418,8 @@ Launch the `console` GUI. $ nextflow console ``` +(cli-drop)= + ### `drop` Delete the local copy of a project. @@ -448,6 +456,8 @@ Forcefully drop the `nextflow-io/hello` pipeline, ignoring any local changes. $ nextflow drop nextflow-io/hello -f ``` +(cli-fs)= + ### `fs` Perform basic filesystem operations. @@ -610,7 +620,7 @@ $ nextflow info nextflow-io/hello ### `inspect` -:::{versionadded} 23.09.0-edge +:::{versionadded} 23.10.0 ::: Inspect process settings in a pipeline project. Currently only supports the `container` directive. @@ -659,6 +669,8 @@ Specify parameters as with the `run` command: $ nextflow inspect main.nf --alpha 1 --beta hello ``` +(cli-kuberun)= + ### `kuberun` Launch a Nextflow pipeline on a Kubernetes cluster. @@ -718,22 +730,18 @@ The `kuberun` command supports the following options from [`run`](#run): The following new options are also available: `-head-cpus` -: :::{versionadded} 22.01.0-edge - ::: : Specify number of CPUs requested for the Nextflow pod. `-head-image` -: :::{versionadded} 22.07.1-edge +: :::{versionadded} 22.10.0 ::: : Specify the container image for the Nextflow driver pod. `-head-memory` -: :::{versionadded} 22.01.0-edge - ::: : Specify amount of memory requested for the Nextflow pod. `-head-prescript` -: :::{versionadded} 22.05.0-edge +: :::{versionadded} 22.10.0 ::: : Specify script to be run before the Nextflow pod starts. @@ -934,6 +942,8 @@ Lint and format all files in the current directory (and subdirectories) and use $ nextflow lint -format -spaces 2 . ``` +(cli-list)= + ### `list` List all downloaded projects. @@ -1119,6 +1129,8 @@ $ nextflow plugin [options] : Execute a plugin-specific command. +(cli-pull)= + ### `pull` Download or update a project. @@ -1222,12 +1234,12 @@ The `run` command is used to execute a local pipeline script or remote pipeline : Prevent the cancellation of child jobs on execution termination `-dsl1` -: :::{deprecated} 23.09.0-edge +: :::{deprecated} 23.10.0 ::: : Execute the workflow using DSL1 syntax. `-dsl2` -: :::{deprecated} 23.09.0-edge +: :::{deprecated} 23.10.0 ::: : Execute the workflow using DSL2 syntax. @@ -1262,8 +1274,6 @@ The `run` command is used to execute a local pipeline script or remote pipeline : Library extension path. `-main-script` (`main.nf`) -: :::{versionadded} 20.09.1-edge - ::: : The script file to be executed when launching a project directory or repository. `-name` @@ -1284,7 +1294,7 @@ The `run` command is used to execute a local pipeline script or remote pipeline : Comma separated list of plugin ids to be applied in the pipeline execution. `-preview` -: :::{versionadded} 22.06.0-edge +: :::{versionadded} 22.10.0 ::: : Run the workflow script skipping the execution of all processes. @@ -1520,6 +1530,8 @@ Nextflow installation completed. Please note: - the executable file `nextflow` has been created in the folder: /usr/local/bin ``` +(cli-view)= + ### `view` View a project's script file(s).