Skip to content

📝 docs: generate CLI reference from the argparse parser#614

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/cli-reference
Jul 8, 2026
Merged

📝 docs: generate CLI reference from the argparse parser#614
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/cli-reference

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

The command line was documented only by a hand-written how-to whose per-flag details drifted from the argparse parser in turbohtml.__main__. 📝 This PR generates an exhaustive CLI reference straight from _parser() with sphinx-argparse-cli, so the documented subcommands and flags track the code the same way the doctest-run examples keep the rest of the docs honest.

The new docs/reference/cli.rst renders the parser under a Command line toctree group; sphinx-argparse-cli walks every subcommand (minify, minify-css, minify-js, detect, to-markdown, to-text, sanitize) and their options. docs/how-to/cli.rst stays the task-oriented guide with the subcommand-to-API mapping and pipeline examples, and now points at the generated reference for the full flag surface, so the flags are described in one place.

This is internal docs tooling, so there is no changelog fragment. The docs build passes under -W, with the directive rendering every subcommand.

The command line was documented only by a hand-written how-to whose flag
details drifted from turbohtml.__main__._parser. Generate the exhaustive
reference from the parser with sphinx-argparse-cli so it tracks the code,
matching the doctest-backed "docs cannot drift" stance the rest of the
docs already take.

The how-to keeps the subcommand-to-API mapping and pipeline examples and
now points at the generated reference for the full flag surface, so the
flags live in one place.
@gaborbernat gaborbernat added the documentation Improvements or additions to documentation label Jul 8, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 91 untouched benchmarks
⏩ 18 skipped benchmarks1


Comparing gaborbernat:docs/cli-reference (fa0df41) with main (6496744)

Open in CodSpeed

Footnotes

  1. 18 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gaborbernat gaborbernat merged commit 4e6b1ce into tox-dev:main Jul 8, 2026
48 checks passed
@gaborbernat gaborbernat deleted the docs/cli-reference branch July 10, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant