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
+114-1Lines changed: 114 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,7 +262,120 @@ $ 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 and version information is tracked in `nextflow_spec.json`.
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` and included in `nextflow_spec.json`
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 -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 `-json` for programmatic access.
344
+
345
+
See {ref}`cli-module-search` for more information.
346
+
347
+
### Removing modules
348
+
349
+
The `module remove` command deletes modules from your project, removing local files and configuration entries.
350
+
351
+
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-config` to preserve version information in `nextflow_spec.json`, or `-keep-files` to remove only the configuration entry while keeping local files.
360
+
361
+
See {ref}`cli-module-remove` for more information.
362
+
363
+
### Publishing modules
364
+
365
+
The `module publish` command uploads modules to a registry, making them available for others to install and use.
366
+
367
+
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.auth` in the Nextflow configuration. The module must include `main.nf`, `meta.yaml`, and `README.md` files.
375
+
376
+
Use `-dry-run` to validate your module structure without uploading.
377
+
378
+
See {ref}`cli-module-publish` for more information.
The `module` command provides a comprehensive system for managing reusable, registry-based modules. It enables installing modules from registries, running them directly, searching for available modules, and publishing your own modules for community use.
1146
+
1147
+
**Subcommands**
1148
+
1149
+
(cli-module-install)=
1150
+
1151
+
`install [options] [scope/name]`
1152
+
1153
+
: Install a module from the registry into your project.
1154
+
: Downloaded modules are stored in the `modules/` directory and version information is tracked in `nextflow_spec.json`.
1155
+
: The following options are available:
1156
+
1157
+
`-version`
1158
+
: Specify the module version to install (e.g., `1.0.0`). If not specified, installs the latest version.
1159
+
1160
+
`-force`
1161
+
: Force reinstall even if the module exists locally with modifications. Without this flag, Nextflow prevents overwriting locally modified modules.
0 commit comments