Skip to content

Commit 29370f4

Browse files
docs: Restructure modules as a section and add registry steps (#7030)
Co-authored-by: Ben Sherman <bentshermann@gmail.com>
1 parent da06e9a commit 29370f4

23 files changed

Lines changed: 822 additions & 867 deletions

docs/cli.md

Lines changed: 8 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -250,149 +250,26 @@ $ nextflow drop nextflow-io/hello
250250

251251
See {ref}`cli-drop` for more information.
252252

253-
### Secret management
254-
255-
The `secrets` command manages secure pipeline secrets.
256-
257-
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
258-
259-
```console
260-
$ nextflow secrets list
261-
$ nextflow secrets set AWS_ACCESS_KEY_ID
262-
$ nextflow secrets delete AWS_ACCESS_KEY_ID
263-
```
264-
265-
See {ref}`cli-secrets` for more information.
266-
267253
## Module management
268254

269255
:::{versionadded} 26.04.0
270256
:::
271257

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.
281-
282-
```console
283-
$ nextflow module search alignment
284-
$ nextflow module search "quality control" -limit 10
285-
$ nextflow module search bwa -output json
286-
```
287-
288-
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.
297-
298-
```console
299-
$ nextflow module install nf-core/fastqc
300-
$ nextflow module install nf-core/fastqc -version 1.0.0
301-
```
302-
303-
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.
258+
The `module` command allows you to discover, install, and run modules through a centralized module registry. See {ref}`using-modules-page` and the {ref}`cli-module` command reference for more information.
321259

322-
See {ref}`cli-module-list` for more information.
260+
## Secret management
323261

324-
### Viewing module information
325-
326-
The `module view` 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 view nf-core/fastqc
332-
$ nextflow module view nf-core/fastqc -version 1.0.0
333-
$ nextflow module view 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-view` 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 view 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.
370-
371-
```console
372-
$ nextflow module remove nf-core/fastqc
373-
$ nextflow module remove nf-core/fastqc -keep-files
374-
```
375-
376-
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.
262+
The `secrets` command manages secure pipeline secrets.
383263

384-
Use this to share your modules with the community, contribute to module libraries, or distribute modules within your organization.
264+
Use this to store credentials securely, reference them in pipelines without exposing values, and manage sensitive data centrally across your organization.
385265

386266
```console
387-
$ nextflow module publish myorg/my-module
388-
$ nextflow module publish myorg/my-module -dry-run
267+
$ nextflow secrets list
268+
$ nextflow secrets set AWS_ACCESS_KEY_ID
269+
$ nextflow secrets delete AWS_ACCESS_KEY_ID
389270
```
390271

391-
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 the {ref}`cli-module-spec` and {ref}`cli-module-validate` commands to prepare and validate a module before publishing.
394-
395-
See {ref}`cli-module-publish` for more information.
272+
See {ref}`cli-secrets` for more information.
396273

397274
## Configuration and validation
398275

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
'flux.md': 'tutorials/flux.md',
5959
'developer/plugins.md': 'plugins/developing-plugins.md',
6060
'plugins.md': 'plugins/plugins.md',
61-
'channel.md': 'workflow.md'
61+
'channel.md': 'workflow.md',
62+
'module.md': 'modules/modules.md'
6263
}
6364

6465
# Add any paths that contain templates here, relative to this directory.

docs/guides/gradle-plugin.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Nextflow provides a new `plugin create` command that simplifies the creation of
66

77
The [Nextflow Gradle plugin](https://github.com/nextflow-io/nextflow-plugin-gradle) configures default dependencies needed for Nextflow integration and defines Gradle tasks for building, testing, and publishing Nextflow plugins. The Gradle plugin is versioned and published to the [Gradle Plugin Portal](https://plugins.gradle.org/), allowing developers to manage it like any other dependency. As the plugin ecosystem evolves, the Gradle plugin will enable easier maintenance and adoption of improvements. This page introduces [Nextflow Gradle plugin](https://github.com/nextflow-io/nextflow-plugin-gradle) and how to use it.
88

9-
:::{note}
10-
The Nextflow Gradle plugin and plugin registry are currently available as a public preview. See the {ref}`Migrating to the Nextflow plugin registry <plugin-registry-page>` for more information.
11-
:::
12-
139
(gradle-plugin-create)=
1410

1511
## Creating a plugin

docs/index.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,23 @@ process
8080
process-typed
8181
workflow
8282
workflow-typed
83-
module
8483
notifications
8584
secrets
8685
sharing
8786
vscode
8887
```
8988

89+
```{toctree}
90+
:hidden:
91+
:caption: Modules
92+
:maxdepth: 1
93+
94+
modules/modules
95+
modules/using-modules
96+
modules/developing-modules
97+
modules/module-registry
98+
```
99+
90100
```{toctree}
91101
:hidden:
92102
:caption: Software dependencies

docs/migrations/24-10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The `task` variable in the process definition has two new properties, `task.prev
5151

5252
## Deprecations
5353

54-
- The use of `addParams` and `params` clauses in include declarations is deprecated. See {ref}`module-params` for details.
54+
- The use of `addParams` and `params` clauses in include declarations is deprecated. See {ref}`strict-syntax-page` for details.
5555

5656
## Miscellaneous
5757

docs/migrations/26-04.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ include { BWA_MEM } from 'nf-core/bwa/mem'
4444
All [nf-core modules](https://github.com/nf-core/modules) are automatically synced to the registry from GitHub. They are available as `nf-core/<name>` as shown above.
4545
:::
4646

47-
See {ref}`module-registry` and the {ref}`cli-module` command reference for details.
47+
See the {ref}`Modules overview <modules-page>` and {ref}`cli-module` command reference for details.
4848

4949
<h3>Record types</h3>
5050

docs/migrations/dsl1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Similarly, in DSL2, process outputs can be consumed by multiple consumers automa
100100

101101
In DSL1, the entire Nextflow pipeline must be defined in a single file. For example, `main.nf`. This restriction becomes cumbersome as a pipeline grows and hinders the sharing and reuse of pipeline components.
102102

103-
DSL2 introduces the concept of "module scripts" (or "modules" for short), which are Nextflow scripts that can be "included" by other scripts. While modules are not essential to migrating to DSL2, nor are they mandatory in DSL2, modules can help you organize a large pipeline into multiple smaller files and take advantage of modules created by others. See {ref}`module-page` to learn more about modules.
103+
DSL2 introduces the concept of "module scripts" (or "modules" for short), which are Nextflow scripts that can be "included" by other scripts. While modules are not essential to migrating to DSL2, nor are they mandatory in DSL2, modules can help you organize a large pipeline into multiple smaller files and take advantage of modules created by others. See {ref}`modules-page` to learn more about modules.
104104

105105
:::{note}
106106
DSL2 scripts cannot exceed 64 KB in size. Split large DSL1 scripts into modules to avoid this limit.

0 commit comments

Comments
 (0)