Skip to main content

Generate API documentation for Nextflow pipelines by querying the Nextflow Language Server

Project description

nf-docs

Generate beautiful API documentation for Nextflow pipelines

Python 3.10+ License

nf-docs demo

Full documentation →

Choose from 4 different output formats:

HTML

  • Single-file output
  • Share anywhere, even offline
  • Full-text search built in

Markdown

  • Multiple files or tables by section
  • Perfect for static site generators

JSON / YAML

  • Machine-readable output
  • Build custom integrations
  • CI/CD friendly

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

nf_docs-0.3.0.tar.gz (124.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nf_docs-0.3.0-py3-none-any.whl (112.0 kB view details)

Uploaded Python 3

File details

Details for the file nf_docs-0.3.0.tar.gz.

File metadata

  • Download URL: nf_docs-0.3.0.tar.gz
  • Upload date:
  • Size: 124.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nf_docs-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a6ea9cf1123bc80549ac7ff43d6fc801aac9311daefed195b0646af9e280f09e
MD5 6570a31807f90e966275ca51c5afb28a
BLAKE2b-256 d6372fc76aef0b8520913211314833350c3e5c1d18749062b3f3c507a1811b39

See more details on using hashes here.

Provenance

The following attestation bundles were made for nf_docs-0.3.0.tar.gz:

Publisher: publish.yml on ewels/nf-docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nf_docs-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: nf_docs-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 112.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nf_docs-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bab6a2a981c1b3c230d55969c83ce9e4facb89d6a3b2977906eb68b8f5361204
MD5 17687bf7ba95dd3610524c4be6fdd379
BLAKE2b-256 267244f39d577b0af93a05cb007ddcf6c2d6e6d69ab3e3b2ab916ef10f781b75

See more details on using hashes here.

Provenance

The following attestation bundles were made for nf_docs-0.3.0-py3-none-any.whl:

Publisher: publish.yml on ewels/nf-docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page