Source

sphinx / doc / invocation.rst

Invocation of sphinx-build

The :program:`sphinx-build` script builds a Sphinx documentation set. It is called like this:

$ sphinx-build [options] sourcedir builddir [filenames]

where sourcedir is the :term:`source directory`, and builddir is the directory in which you want to place the built documentation. Most of the time, you don't need to specify any filenames.

The :program:`sphinx-build` script has several options:

You can also give one or more filenames on the command line after the source and build directories. Sphinx will then try to build only these output files (and their dependencies).

Makefile options

The :file:`Makefile` and :file:`make.bat` files created by :program:`sphinx-quickstart` usually run :program:`sphinx-build` only with the :option:`-b` and :option:`-d` options. However, they support the following variables to customize behavior:

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.