You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+132-2Lines changed: 132 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,137 @@ $ nextflow secrets set AWS_ACCESS_KEY_ID
262
262
$ nextflow secrets delete AWS_ACCESS_KEY_ID
263
263
```
264
264
265
-
See {ref}`cli-secrets` for more information.
265
+
See {ref}`cli-secrets` for more information.
266
+
267
+
## Module management
268
+
269
+
:::{versionadded} 26.04.0
270
+
:::
271
+
272
+
The `module` command enables working with reusable, registry-based modules. The Nextflow module system allows you to install, run, search, and publish standardized modules from registries, eliminating duplicate work and sharing improvements with the community.
273
+
274
+
Use these commands to discover modules in registries, install them into your project, run them directly without creating a workflow, and publish your own modules for others to use.
275
+
276
+
### Searching for modules
277
+
278
+
The `module search` command queries the module registry to discover available modules by keyword or name.
279
+
280
+
Use this to find modules for specific tasks, explore available tools, or discover community modules.
Results include module names, versions, descriptions, and download statistics. Use `-limit` to control the number of results and `-output json` for JSON-formatted output.
289
+
290
+
See {ref}`cli-module-search` for more information.
291
+
292
+
### Installing modules
293
+
294
+
The `module install` command downloads modules from a registry and makes them available in your workflow. Modules are stored locally in the `modules/` directory. An additional `.module-info` file is created during to store installation information such as the module checksum at installation and the registry URL.
295
+
296
+
Use this to add reusable modules to your pipeline, manage module versions, or update modules to newer versions.
The installed module will be available in `modules/nf-core/fastqc`.
304
+
305
+
Use the `-force` flag to reinstall a module even if local modifications exist.
306
+
307
+
See {ref}`cli-module-install` for more information.
308
+
309
+
### Listing modules
310
+
311
+
The `module list` command displays all modules currently installed in your project, showing their versions and integrity status.
312
+
313
+
Use this to review installed modules, check module versions, or detect local modifications.
314
+
315
+
```console
316
+
$ nextflow module list
317
+
$ nextflow module list -output json
318
+
```
319
+
320
+
The output shows each module's name, installed version, and whether it has been modified locally. Use `-o json` for JSON-formatted output.
321
+
322
+
See {ref}`cli-module-list` for more information.
323
+
324
+
### Viewing module information
325
+
326
+
The `module info` command displays detailed metadata and usage information for a specific module from the registry.
327
+
328
+
Use this to understand module requirements, view input/output specifications, see available tools, or generate usage templates before installing or running a module.
329
+
330
+
```console
331
+
$ nextflow module info nf-core/fastqc
332
+
$ nextflow module info nf-core/fastqc -version 1.0.0
333
+
$ nextflow module info nf-core/fastqc -output json
334
+
```
335
+
336
+
The output includes the module's version, description, authors, keywords, tools, input/output channels, and a generated usage template showing how to run the module. Use `-json` for machine-readable output suitable for programmatic access.
337
+
338
+
See {ref}`cli-module-info` for more information.
339
+
340
+
### Running modules directly
341
+
342
+
The `module run` command executes a module directly from the registry without requiring a wrapper workflow. This provides immediate access to module functionality for ad-hoc tasks or testing.
343
+
344
+
Use this to quickly run a module, test module functionality, or execute one-off data processing tasks.
345
+
346
+
```console
347
+
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz'
348
+
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' -version 1.0.0
349
+
```
350
+
351
+
The command accepts all standard Nextflow execution options (`-profile`, `-resume`, etc.):
352
+
353
+
```console
354
+
$ nextflow module run nf-core/salmon \
355
+
--reads reads.fq \
356
+
--index salmon_index \
357
+
-profile docker \
358
+
-resume
359
+
```
360
+
361
+
Process inputs can be specified like params on the command line. For example, `--reads reads.fq` corresponds to the `reads` input in the `nf-core/salmon` module. Run `nextflow module info nf-core/salmon` to see the available params for the module.
362
+
363
+
See {ref}`cli-module-run` for more information.
364
+
365
+
### Removing modules
366
+
367
+
The `module remove` command deletes modules from your project, removing local files and configuration entries.
368
+
369
+
Use this to clean up unused modules, free disk space, or remove deprecated modules from your pipeline.
By default, both local files and configuration entries are removed. Use `-keep-files` to remove the configuration entry and `.module-info` while keeping local files.
377
+
378
+
See {ref}`cli-module-remove` for more information.
379
+
380
+
### Publishing modules
381
+
382
+
The `module publish` command uploads modules to a registry, making them available for others to install and use.
383
+
384
+
Use this to share your modules with the community, contribute to module libraries, or distribute modules within your organization.
Publishing requires authentication via the `NXF_REGISTRY_TOKEN` environment variable or the `registry.apiKey` config option. The module must include `main.nf`, `meta.yml`, and `README.md` files.
392
+
393
+
Use `-dry-run` to validate your module structure without uploading.
394
+
395
+
See {ref}`cli-module-publish` for more information.
266
396
267
397
## Configuration and validation
268
398
@@ -384,7 +514,7 @@ Use this to understand input/output relationships between tasks, trace data flow
384
514
$ nextflow lineage
385
515
```
386
516
387
-
See {ref}`data-lineage-page` to get started and {ref}`cli-lineage` for more information.
517
+
See {ref}`data-lineage-page` to get started and {ref}`cli-lineage` for more information.
Copy file name to clipboardExpand all lines: docs/module.md
+157-1Lines changed: 157 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,8 +279,164 @@ This feature requires the use of a local or shared file system for the pipeline
279
279
280
280
## Sharing modules
281
281
282
-
Modules are designed to be easy to share and re-use across different pipelines, which helps eliminate duplicate work and spread improvements throughout the community. While Nextflow does not provide an explicit mechanism for sharing modules, there are several ways to do it:
282
+
Modules are designed to be easy to share and re-use across different pipelines, which helps eliminate duplicate work and spread improvements throughout the community. There are several ways to share modules:
283
283
284
+
- Use the Nextflow module registry (recommended, see below)
284
285
- Simply copy the module files into your pipeline repository
285
286
- Use [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to fetch modules from other Git repositories without maintaining a separate copy
286
287
- Use the [nf-core](https://nf-co.re/tools#modules) CLI to install and update modules with a standard approach used by the nf-core community
288
+
289
+
(module-registry)=
290
+
291
+
## Registry-based modules
292
+
293
+
:::{versionadded} 26.04.0
294
+
:::
295
+
296
+
Nextflow provides a module registry that enables you to install, publish, and manage modules from centralized registries. This system provides version management, integrity checking, and seamless integration with the Nextflow language.
297
+
298
+
### Installing modules from a registry
299
+
300
+
Use the `module install` command to download modules from a registry:
For ad-hoc tasks or testing, you can run a module directly without creating a workflow:
321
+
322
+
```console
323
+
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz'
324
+
```
325
+
326
+
This command accepts all standard `nextflow run` options (`-profile`, `-resume`, etc.) and automatically downloads the module if not already installed.
327
+
328
+
### Discovering modules
329
+
330
+
Search for available modules using the `module search` command:
Nextflow automatically verifies module integrity using checksums. If you modify a module locally, Nextflow will detect the change and prevent accidental overwrites:
Warning: Module nf-core/fastqc has local modifications. Use -force to override.
350
+
```
351
+
352
+
Use the `-force` flag to override local modifications when needed.
353
+
354
+
### Removing modules
355
+
356
+
Use the `module remove` command to uninstall a module:
357
+
358
+
```console
359
+
$ nextflow module remove nf-core/fastqc
360
+
```
361
+
362
+
By default, both the module files and the `.module-info` file are removed. Use the flags below to control this behaviour:
363
+
364
+
-`-keep-files`: Remove the `.module-info` file created at install but keep the rest of files
365
+
-`-force`: Force removal even if the module has no `.module-info` file (i.e. not installed from a registry) or has local modifications
366
+
367
+
### Viewing module information
368
+
369
+
Use the `module info` command to display metadata and a usage template for a module:
370
+
371
+
```console
372
+
$ nextflow module info nf-core/fastqc
373
+
$ nextflow module info nf-core/fastqc -version 1.0.0
374
+
```
375
+
376
+
The output includes the module description, authors, keywords, tools, inputs, outputs, and a ready-to-use command-line template. Use `-o json` to get machine-readable output.
377
+
378
+
### Publishing modules
379
+
380
+
To share your own modules, use the `module publish` command:
381
+
382
+
```console
383
+
$ nextflow module publish myorg/my-module
384
+
```
385
+
386
+
The argument can be either a `scope/name` reference (for an already-installed module) or a local directory path containing the module files.
0 commit comments