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
+130-2Lines changed: 130 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,135 @@ $ 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
+
Module management commands enable 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 spreading improvements throughout 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
+
### Installing modules
277
+
278
+
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.
279
+
280
+
Use this to add reusable modules to your pipeline, manage module versions, or update modules to newer versions.
After installation, module will be available in `modules/nf-core/fastqc`.
288
+
289
+
Use the `-force` flag to reinstall a module even if local modifications exist.
290
+
291
+
See {ref}`cli-module-install` for more information.
292
+
293
+
### Running modules directly
294
+
295
+
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.
296
+
297
+
Use this to quickly run a module, test module functionality, or execute one-off data processing tasks.
298
+
299
+
```console
300
+
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz'
301
+
$ nextflow module run nf-core/fastqc --input 'data/*.fastq.gz' -version 1.0.0
302
+
```
303
+
304
+
The command accepts all standard Nextflow execution options (`-profile`, `-resume`, etc.):
305
+
306
+
```console
307
+
$ nextflow module run nf-core/salmon \
308
+
--reads reads.fq \
309
+
--index salmon_index \
310
+
-profile docker \
311
+
-resume
312
+
```
313
+
314
+
See {ref}`cli-module-run` for more information.
315
+
316
+
### Listing modules
317
+
318
+
The `module list` command displays all modules currently installed in your project, showing their versions and integrity status.
319
+
320
+
Use this to review installed modules, check module versions, or detect local modifications.
321
+
322
+
```console
323
+
$ nextflow module list
324
+
$ nextflow module list -output json
325
+
```
326
+
327
+
The output shows each module's name, installed version, and whether it has been modified locally. Use `-json` for machine-readable output suitable for scripting.
328
+
329
+
See {ref}`cli-module-list` for more information.
330
+
331
+
### Searching for modules
332
+
333
+
The `module search` command queries the module registry to discover available modules by keyword or name.
334
+
335
+
Use this to find modules for specific tasks, explore available tools, or discover community contributions.
Results include module names, versions, descriptions, and download statistics. Use `-limit` to control the number of results and `-output json` for programmatic access.
344
+
345
+
See {ref}`cli-module-search` for more information.
346
+
347
+
### Viewing module information
348
+
349
+
The `module info` command displays detailed metadata and usage information for a specific module from the registry.
350
+
351
+
Use this to understand module requirements, view input/output specifications, see available tools, or generate usage templates before installing or running a module.
352
+
353
+
```console
354
+
$ nextflow module info nf-core/fastqc
355
+
$ nextflow module info nf-core/fastqc -version 1.0.0
356
+
$ nextflow module info nf-core/fastqc -output json
357
+
```
358
+
359
+
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.
360
+
361
+
See {ref}`cli-module-info` for more information.
362
+
363
+
### Removing modules
364
+
365
+
The `module remove` command deletes modules from your project, removing local files and configuration entries.
366
+
367
+
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.
375
+
376
+
See {ref}`cli-module-remove` for more information.
377
+
378
+
### Publishing modules
379
+
380
+
The `module publish` command uploads modules to a registry, making them available for others to install and use.
381
+
382
+
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 `registry.apiKey` in the Nextflow configuration. The module must include `main.nf`, `meta.yaml`, and `README.md` files.
390
+
391
+
Use `-dry-run` to validate your module structure without uploading.
392
+
393
+
See {ref}`cli-module-publish` for more information.
266
394
267
395
## Configuration and validation
268
396
@@ -384,7 +512,7 @@ Use this to understand input/output relationships between tasks, trace data flow
384
512
$ nextflow lineage
385
513
```
386
514
387
-
See {ref}`data-lineage-page` to get started and {ref}`cli-lineage` for more information.
515
+
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
+158-1Lines changed: 158 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,8 +279,165 @@ 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, share, and manage modules from centralized registries. This system provides version management, integrity checking, and seamless integration with the Nextflow DSL.
297
+
298
+
### Installing modules from a registry
299
+
300
+
Use the `module install` command to download modules from a registry:
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.
351
+
```
352
+
353
+
Use the `-force` flag to override local modifications when needed.
354
+
355
+
### Removing modules
356
+
357
+
Use the `module remove` command to uninstall a module:
358
+
359
+
```console
360
+
$ nextflow module remove nf-core/fastqc
361
+
```
362
+
363
+
By default, both the module files and the `.module-info` file are removed. Use the flags below to control this behaviour:
364
+
365
+
-`-keep-files` — Remove the `.module-info` file created at install but keep the rest of files
366
+
-`-force` — Force removal even if the module has no `.module-info` file (i.e. not installed from a registry) or has local modifications
367
+
368
+
### Viewing module information
369
+
370
+
Use the `module info` command to display metadata and a usage template for a module:
371
+
372
+
```console
373
+
$ nextflow module info nf-core/fastqc
374
+
$ nextflow module info nf-core/fastqc -version 1.0.0
375
+
```
376
+
377
+
The output includes the module description, authors, keywords, tools, inputs, outputs, and a ready-to-use command-line template. Use `-json` to get machine-readable output.
378
+
379
+
### Publishing modules
380
+
381
+
To share your own modules, use the `module publish` command:
382
+
383
+
```console
384
+
$ nextflow module publish myorg/my-module
385
+
```
386
+
387
+
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