Sphinx
$ sphinx-build Official Low RiskSphinx (sphinx-build) is the canonical Python and technical documentation compiler supporting reStructuredText and MyST Markdown, cross-references, autodoc, LaTeX/PDF, and -b json / -b linkcheck builders. Passing -W --keep-going -q turns broken references into deterministic CI failures without noisy progress output.
brew install sphinx-doc Compiling local .rst / .md trees and checking cross-references with sphinx-build -W runs directly in the repository environment.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-interactive sphinx-build with -W, -n, -q, -j auto, and -b json builder, though CLI logs are plain text and sphinx-quickstart is interactive unless -q is passed.
-W --keep-going -qgives deterministic strict build checks- Supports
-b jsonoutput builder for structured doc pages
Outputs only to the specified build directory, though conf.py and autodoc execute arbitrary Python inside the documented project.
conf.pyandautodocimport/execute Python modules during build
Easy to install via pip, uvx, or brew install sphinx-doc, though projects often depend on third-party extensions in conf.py.
- Cross-platform Python package; project extensions may need matching virtualenv
Unmatched cross-referencing, API autodoc, MyST Markdown, and multi-format output (html, latexpdf, man, epub, linkcheck).
- Rich builder ecosystem including
-b linkcheckand-b doctest
Official Sphinx documentation project (sphinx-doc/sphinx) actively maintained under BSD-2-Clause.
- Core Python ecosystem tool since 2008
Comprehensive official documentation and manpage reference at sphinx-doc.org.
- Official docs at sphinx-doc.org/en/master/man/sphinx-build.html
Security, Auth & Guardrails
None required for local builds; intersphinx and -b linkcheck fetch public HTTP docs/links when enabled.
100% free, offline, and open-source (BSD-2-Clause).
# Sphinx Agent Rules - Run `sphinx-build -b html -W --keep-going -q docs/ docs/_build/html` to catch broken xrefs cleanly. - Remember `conf.py` and `autodoc` execute Python code inside the target project; only build trusted repositories. - Avoid `sphinx-quickstart` interactive mode without passing `--quiet` and all metadata flags.
Agent-Ready Command Recipes
Safe Read-Only Queries
sphinx-build --version
Prints the installed sphinx-build version without running conf.py.
sphinx-build -b linkcheck -q docs/ docs/_build/linkcheck
Checks external URLs referenced in the docs and writes link status results to docs/_build/linkcheck.
Controlled Writes & Previews
sphinx-build -b html -W --keep-going -q docs/ docs/_build/html
Compiles documentation into docs/_build/html and fails with a non-zero exit code if any Sphinx warning occurs (-W).
Strengths for Agents
- + Strict
-W -n --keep-goingvalidation catches broken cross-references and syntax errors reliably. - + Built-in
-b linkcheck,-b doctest, and-b jsonbuilders cover verification and structured output.
Caveats & Pitfalls
- ! Evaluating
conf.pyandautodocimports project Python code, which is unsafe on untrusted repositories. - ! Projects using extensions (
myst-parser, themes) must runsphinx-buildinside the project's virtualenv.