Generate API documentation for Nextflow pipelines by querying the Nextflow Language Server
Project description
nf-docs
Generate beautiful API documentation for Nextflow pipelines
Choose from 4 different output formats:
HTML
|
Markdown
|
JSON / YAML
|
What is nf-docs?
[!IMPORTANT] This is not an official Nextflow project. It's a fun side-project by Phil Ewels. Please use at your own risk :)
Information is pulled from multiple sources to construct the docs (each only if available):
- README.md - Pipeline overview and description
- nextflow.config - Runtime configuration defaults
- nextflow_schema.json - Typed input parameters with descriptions and validation rules
- Language Server - Processes, workflows, functions with their Groovydoc comments
- meta.yml - nf-core module metadata (tools, keywords, authors)
The documentation for workflows, processes and functions is relatively unique. nf-docs extracts
this from your Nextflow pipelines by querying the
Nextflow Language Server. It produces structured
API documentation similar to Sphinx for Python or Javadoc for Java.
Examples and docs
See https://ewels.github.io/nf-docs
Quick Start
With uv:
uvx nf-docs generate ./my_pipeline
With pip:
# Install
pip install nf-docs
# Generate HTML documentation
nf-docs generate ./my_pipeline
With Bioconda (requires channel setup):
pixi global install nf-docs
# or
conda install nf-docs
That's it! Open docs/index.html in your browser.
Document a single module
Pass a single .nf file to generate a focused, module-style README:
nf-docs generate modules/mytool/subtools/main.nf --format md
By default this writes README.md next to main.nf. Use --output to pick a different path, or
--format json / --format yaml to print structured output to stdout instead.
Prek / pre-commit hook
nf-docs can generate pipeline documentation automatically before each commit using
Prek or pre-commit:
repos:
- repo: https://github.com/ewels/nf-docs
rev: v0.3.0
hooks:
- id: nf-docs
Install the hook into your repo:
# With Prek (recommended)
prek install
# Or with pre-commit
pre-commit install
The hook defaults to nf-docs generate . --format html, which writes HTML output to docs/.
Override args in your .pre-commit-config.yaml to use another format or output path:
repos:
- repo: https://github.com/ewels/nf-docs
rev: v0.3.0
hooks:
- id: nf-docs
args: [., --format, markdown, --output, docs/api]
Development
See CONTRIBUTING.md for development setup, testing, and contribution guidelines.
License
Apache 2.0 - see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nf_docs-0.4.0.tar.gz.
File metadata
- Download URL: nf_docs-0.4.0.tar.gz
- Upload date:
- Size: 127.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e2edd5f105f8d149659fc362a9e35d03718aa0fe255e8fbdcc1353cc9b73274
|
|
| MD5 |
f5750f812a6179c7f59661d1cd524c65
|
|
| BLAKE2b-256 |
98ec26d91ce0eea4c5881344a781bc94893181b17b89cdbc086afd8020f043c9
|
Provenance
The following attestation bundles were made for nf_docs-0.4.0.tar.gz:
Publisher:
publish.yml on ewels/nf-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nf_docs-0.4.0.tar.gz -
Subject digest:
3e2edd5f105f8d149659fc362a9e35d03718aa0fe255e8fbdcc1353cc9b73274 - Sigstore transparency entry: 1668170783
- Sigstore integration time:
-
Permalink:
ewels/nf-docs@a9bdcd583ff36ec19a799537c7e974a887f5628e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ewels
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9bdcd583ff36ec19a799537c7e974a887f5628e -
Trigger Event:
release
-
Statement type:
File details
Details for the file nf_docs-0.4.0-py3-none-any.whl.
File metadata
- Download URL: nf_docs-0.4.0-py3-none-any.whl
- Upload date:
- Size: 113.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97046e2887a1a2e603e8b4f6a03f484f0652abb6cbe7424aeada8aa89b379541
|
|
| MD5 |
3c1d5324a60aaa75d447c8fa4c566ff6
|
|
| BLAKE2b-256 |
8863d8370be6ed86ecef280eadc511b7c8eb1f3a17c222052e6429d90ae85ae2
|
Provenance
The following attestation bundles were made for nf_docs-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on ewels/nf-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nf_docs-0.4.0-py3-none-any.whl -
Subject digest:
97046e2887a1a2e603e8b4f6a03f484f0652abb6cbe7424aeada8aa89b379541 - Sigstore transparency entry: 1668170872
- Sigstore integration time:
-
Permalink:
ewels/nf-docs@a9bdcd583ff36ec19a799537c7e974a887f5628e -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/ewels
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9bdcd583ff36ec19a799537c7e974a887f5628e -
Trigger Event:
release
-
Statement type: