{
    "mode": "man",
    "parameter": "SPHINX-APIDOC",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/SPHINX-APIDOC/1/json",
    "generated": "2026-06-03T03:50:06Z",
    "synopsis": "sphinx-apidoc [OPTIONS] -o <OUTPUTPATH> <MODULEPATH> [EXCLUDEPATTERN ...]",
    "sections": {
        "NAME": {
            "content": "sphinx-apidoc - Sphinx API doc generator tool\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sphinx-apidoc [OPTIONS] -o <OUTPUTPATH> <MODULEPATH> [EXCLUDEPATTERN ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "sphinx-apidoc  is  a  tool for automatic generation of Sphinx sources that, using the autodoc\nextension, document a whole package in the style of other automatic API documentation tools.\n\nMODULEPATH is the path to a Python package to document, and  OUTPUTPATH  is  the  directory\nwhere  the  generated  sources  are placed. Any EXCLUDEPATTERNs given are fnmatch-style file\nand/or directory patterns that will be excluded from generation.\n",
            "subsections": [
                {
                    "name": "WARNING:",
                    "content": "sphinx-apidoc generates source files that use sphinx.ext.autodoc  to  document  all  found\nmodules.   If  any  modules have side effects on import, these will be executed by autodoc\nwhen sphinx-build is run.\n\nIf you document scripts (as opposed to library modules), make sure their main  routine  is\nprotected by a if name == 'main' condition.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-o",
                    "content": "Directory to place the output files. If it does not exist, it is created.\n",
                    "flag": "-o"
                },
                {
                    "name": "-q",
                    "content": "error.\n",
                    "flag": "-q"
                },
                {
                    "name": "-f, --force",
                    "content": "Force overwriting of any existing generated files.\n",
                    "flag": "-f",
                    "long": "--force"
                },
                {
                    "name": "-l, --follow-links",
                    "content": "Follow symbolic links.\n",
                    "flag": "-l",
                    "long": "--follow-links"
                },
                {
                    "name": "-n, --dry-run",
                    "content": "Do not create any files.\n",
                    "flag": "-n",
                    "long": "--dry-run"
                },
                {
                    "name": "-s <suffix>",
                    "content": "Suffix for the source files generated. Defaults to rst.\n",
                    "flag": "-s",
                    "arg": "<suffix>"
                },
                {
                    "name": "-d <MAXDEPTH>",
                    "content": "Maximum depth for the generated table of contents file.\n",
                    "flag": "-d",
                    "arg": "<MAXDEPTH>"
                },
                {
                    "name": "--tocfile",
                    "content": "Filename for a table of contents file. Defaults to modules.\n",
                    "long": "--tocfile"
                },
                {
                    "name": "-T, --no-toc",
                    "content": "Do not create a table of contents file. Ignored when --full is provided.\n",
                    "flag": "-T",
                    "long": "--no-toc"
                },
                {
                    "name": "-F, --full",
                    "content": "Generate a full Sphinx project (conf.py, Makefile etc.) using the  same  mechanism  as\nsphinx-quickstart.\n",
                    "flag": "-F",
                    "long": "--full"
                },
                {
                    "name": "-e, --separate",
                    "content": "Put documentation for each module on its own page.\n\nNew in version 1.2.\n\n",
                    "flag": "-e",
                    "long": "--separate"
                },
                {
                    "name": "-E, --no-headings",
                    "content": "Do  not  create  headings  for the modules/packages. This is useful, for example, when\ndocstrings already contain headings.\n",
                    "flag": "-E",
                    "long": "--no-headings"
                },
                {
                    "name": "-P, --private",
                    "content": "Include \"private\" modules.\n\nNew in version 1.2.\n\n",
                    "flag": "-P",
                    "long": "--private"
                },
                {
                    "name": "--implicit-namespaces",
                    "content": "By default sphinx-apidoc processes sys.path searching for modules  only.   Python  3.3\nintroduced  PEP  420  implicit  namespaces  that  allow module path structures such as\nfoo/bar/module.py or foo/bar/baz/init.py (notice that bar and foo are  namespaces,\nnot modules).\n\nInterpret paths recursively according to PEP-0420.\n",
                    "long": "--implicit-namespaces"
                },
                {
                    "name": "-M, --module-first",
                    "content": "Put module documentation before submodule documentation.\n\nThese options are used when --full is specified:\n",
                    "flag": "-M",
                    "long": "--module-first"
                },
                {
                    "name": "-a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-H <project>",
                    "content": "Sets the project name to put in generated files (see project).\n",
                    "flag": "-H",
                    "arg": "<project>"
                },
                {
                    "name": "-A <author>",
                    "content": "Sets the author name(s) to put in generated files (see copyright).\n",
                    "flag": "-A",
                    "arg": "<author>"
                },
                {
                    "name": "-V <version>",
                    "content": "Sets the project version to put in generated files (see version).\n",
                    "flag": "-V",
                    "arg": "<version>"
                },
                {
                    "name": "-R <release>",
                    "content": "Sets the project release to put in generated files (see release).\n\nProject templating\n\nNew in version 2.2: Project templating options for sphinx-apidoc\n\n",
                    "flag": "-R",
                    "arg": "<release>"
                },
                {
                    "name": "-t, --templatedir=TEMPLATEDIR",
                    "content": "Template directory for template files.  You can modify the templates of sphinx project\nfiles generated by apidoc.  Following Jinja2 template files are allowed:\n\n• module.rstt\n\n• package.rstt\n\n• toc.rstt\n\n• rootdoc.rstt\n\n• conf.pyt\n\n• Makefilet\n\n• Makefile.newt\n\n• make.batt\n\n• make.bat.newt\n\nIn detail, please refer the  system  template  files  Sphinx  provides.   (sphinx/tem‐‐\nplates/apidoc and sphinx/templates/quickstart)\n",
                    "flag": "-t",
                    "long": "--templatedir",
                    "arg": "TEMPLATEDIR"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "SPHINXAPIDOCOPTIONS\nA  comma-separated  list  of  option to append to generated automodule directives. De‐\nfaults to members,undoc-members,show-inheritance.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sphinx-build(1), sphinx-autogen(1)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "2007-2021, Georg Brandl and the Sphinx team\n\n\n\n\n4.3.2                                       Dec 19, 2021                            SPHINX-APIDOC(1)",
            "subsections": []
        }
    },
    "summary": "sphinx-apidoc - Sphinx API doc generator tool",
    "flags": [
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "Directory to place the output files. If it does not exist, it is created."
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": "error."
        },
        {
            "flag": "-f",
            "long": "--force",
            "arg": null,
            "description": "Force overwriting of any existing generated files."
        },
        {
            "flag": "-l",
            "long": "--follow-links",
            "arg": null,
            "description": "Follow symbolic links."
        },
        {
            "flag": "-n",
            "long": "--dry-run",
            "arg": null,
            "description": "Do not create any files."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": "<suffix>",
            "description": "Suffix for the source files generated. Defaults to rst."
        },
        {
            "flag": "-d",
            "long": null,
            "arg": "<MAXDEPTH>",
            "description": "Maximum depth for the generated table of contents file."
        },
        {
            "flag": "",
            "long": "--tocfile",
            "arg": null,
            "description": "Filename for a table of contents file. Defaults to modules."
        },
        {
            "flag": "-T",
            "long": "--no-toc",
            "arg": null,
            "description": "Do not create a table of contents file. Ignored when --full is provided."
        },
        {
            "flag": "-F",
            "long": "--full",
            "arg": null,
            "description": "Generate a full Sphinx project (conf.py, Makefile etc.) using the same mechanism as sphinx-quickstart."
        },
        {
            "flag": "-e",
            "long": "--separate",
            "arg": null,
            "description": "Put documentation for each module on its own page. New in version 1.2."
        },
        {
            "flag": "-E",
            "long": "--no-headings",
            "arg": null,
            "description": "Do not create headings for the modules/packages. This is useful, for example, when docstrings already contain headings."
        },
        {
            "flag": "-P",
            "long": "--private",
            "arg": null,
            "description": "Include \"private\" modules. New in version 1.2."
        },
        {
            "flag": "",
            "long": "--implicit-namespaces",
            "arg": null,
            "description": "By default sphinx-apidoc processes sys.path searching for modules only. Python 3.3 introduced PEP 420 implicit namespaces that allow module path structures such as foo/bar/module.py or foo/bar/baz/init.py (notice that bar and foo are namespaces, not modules). Interpret paths recursively according to PEP-0420."
        },
        {
            "flag": "-M",
            "long": "--module-first",
            "arg": null,
            "description": "Put module documentation before submodule documentation. These options are used when --full is specified:"
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-H",
            "long": null,
            "arg": "<project>",
            "description": "Sets the project name to put in generated files (see project)."
        },
        {
            "flag": "-A",
            "long": null,
            "arg": "<author>",
            "description": "Sets the author name(s) to put in generated files (see copyright)."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": "<version>",
            "description": "Sets the project version to put in generated files (see version)."
        },
        {
            "flag": "-R",
            "long": null,
            "arg": "<release>",
            "description": "Sets the project release to put in generated files (see release). Project templating New in version 2.2: Project templating options for sphinx-apidoc"
        },
        {
            "flag": "-t",
            "long": "--templatedir",
            "arg": "TEMPLATEDIR",
            "description": "Template directory for template files. You can modify the templates of sphinx project files generated by apidoc. Following Jinja2 template files are allowed: • module.rstt • package.rstt • toc.rstt • rootdoc.rstt • conf.pyt • Makefilet • Makefile.newt • make.batt • make.bat.newt In detail, please refer the system template files Sphinx provides. (sphinx/tem‐‐ plates/apidoc and sphinx/templates/quickstart)"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "sphinx-build",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sphinx-build/1/json"
        },
        {
            "name": "sphinx-autogen",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sphinx-autogen/1/json"
        }
    ]
}