sphinxcontrib-programoutput
Sphinx extension to include program output
Decision gist · record as of 2026-08-14
Yes. Low install friction, no security vulnerabilities, permissive license, and active maintenance. Install if you maintain Sphinx documentation for CLI tools, libraries, or examples where keeping output synchronized with actual behavior matters. The only gotcha is that command execution happens during builds, so only enable this for documentation sources you trust.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Sphinx 5.0 and Python 3.10 or later; the extension executes arbitrary commands, so only use with trusted documentation sources.
- Low friction: pure Python wheel with only Sphinx and docutils as runtime dependencies.
- Actively maintained with a recent release; repository is not archived and receives commits.
License · maintenance · safety
BSD-2-Clause (permissive) — BSD-2-Clause is permissive and imposes minimal restrictions on use or redistribution in most contexts.
last release 2026-06-16 (59 days) · last repo commit 2026-08-03 · 41 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 263,522 downloads/mo, #8,355 on PyPI
Alternatives
Verify before relying
pip install sphinxcontrib-programoutput
# In conf.py:
extensions = ['sphinxcontrib.programoutput']
# In your .rst file:
.. program-output:: python -V- Whether command execution is sandboxed or has security restrictions beyond trusting the documentation source.
- Performance characteristics when executing many commands during a single documentation build.
- Whether output caching or incremental rebuilds are supported to avoid re-running commands.
What it is and what it does
sphinxcontrib-programoutput is a Sphinx extension that runs shell commands during documentation builds and inserts their output directly into the generated docs. It provides two directives: `program-output` to embed raw command output, and `command-output` to show shell session examples with prompts. This is useful for keeping documentation examples synchronized with actual program behavior—when the program's output changes, the docs update automatically on the next build.
The extension depends only on Sphinx and docutils, making it lightweight to install. It's actively maintained, supports modern Python versions (3.10 through 3.14), and runs on both CPython and PyPy. The BSD-2-Clause license places no significant restrictions on use.
Use it for
- Keep CLI tool help text and version output in documentation automatically synchronized with the actual program.
- Generate documentation examples by running code snippets and embedding their output without manual copy-paste.
- Verify that documented command examples produce the expected output during every documentation build.
- Create shell session tutorials that show both the command and its real output without manual formatting.
- Maintain API or tool documentation where examples must reflect the current behavior of the software.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no security vulnerabilities, permissive license, and active maintenance. Install if you maintain Sphinx documentation for CLI tools, libraries, or examples where keeping output synchronized with actual behavior matters. The only gotcha is that command execution happens during builds, so only enable this for documentation sources you trust.
Install
sphinxcontrib-programoutput on PyPI
Before you install
Low friction: pure Python wheel with only Sphinx and docutils as runtime dependencies. Actively maintained with a recent release; repository is not archived and receives commits.
Requires Sphinx 5.0 and Python 3.10 or later; the extension executes arbitrary commands, so only use with trusted documentation sources.
License in practice
BSD-2-Clause is permissive and imposes minimal restrictions on use or redistribution in most contexts.
Quickstart
pip install sphinxcontrib-programoutput
# In conf.py:
extensions = ['sphinxcontrib.programoutput']
# In your .rst file:
.. program-output:: python -V
Verify before relying
- Whether command execution is sandboxed or has security restrictions beyond trusting the documentation source.
- Performance characteristics when executing many commands during a single documentation build.
- Whether output caching or incremental rebuilds are supported to avoid re-running commands.
Package facts
| License | BSD-2-Clause permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesSphinxdocutils |
| Maintenance | Actively maintained 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 263,522 / month, #8,355 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: SphinxFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: DocumentationTopic :: Utilities |
Evidence: sphinxcontrib_programoutput-0.20-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sphinx command output embedding”
- sphinxcontrib-programoutputA Sphinx extension that executes arbitrary shell commands and embeds…
- sphinxcontrib-runcmdA Sphinx extension that executes arbitrary shell commands and embeds…
- sphinx-markdown-builderA Sphinx extension that generates Markdown output from…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also sphinxcontrib-runcmd · jupyter-sphinx · sphinxcontrib-redoc · sphinx-prompt · sphinxcontrib-blockdiag · sphinxcontrib-typer · sphinxcontrib-devhelp · sphinxcontrib-video · changelog · sphinx-panels