sphinx-prompt
Sphinx directive to add unselectable prompt
Decision gist · record as of 2026-08-14
Yes. This is a stable, actively maintained Sphinx extension with no known vulnerabilities, permissive licensing, and low install friction. It solves a specific documentation problem—rendering unselectable prompts—cleanly and integrates naturally into Sphinx workflows. Install it if you document shell commands or code examples in Sphinx and want styled, user-friendly prompts.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.11 and an existing Sphinx documentation project.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release and remains current, depending on standard Sphinx and documentation tooling libraries.
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause is a permissive license allowing commercial and private use with minimal restrictions, making this safe to use in most projects.
last release 2025-11-28 (259 days) · last repo commit 2026-08-14 · 52 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 924,747 downloads/mo, #4,712 on PyPI
Alternatives
Verify before relying
# In conf.py
extensions += ['sphinx_prompt']
# In your .rst file
.. prompt:: bash
:prompts: $
python3 -m pip install sphinx-prompt- Whether the package supports reStructuredText syntax beyond the documented languages (text, bash, batch, powershell, python, scala).
- Performance characteristics when rendering large numbers of prompts in a single documentation build.
What it is and what it does
Sphinx Prompt is a Sphinx extension that adds a `prompt` directive for rendering command-line and code prompts in documentation. It supports multiple languages—bash, batch, PowerShell, Python, Scala, and plain text—and allows you to customize the prompt string, language syntax highlighting, and prompt detection behavior. The rendered prompts are unselectable, making them suitable for copy-paste-friendly documentation where you want users to see the prompt but not accidentally select it.
You install it by adding `sphinx_prompt` to your Sphinx `conf.py` extensions list, then use the `.. prompt::` directive in your reStructuredText files. The directive accepts language as a positional argument and supports options like `:prompts:` to specify custom prompt strings and `:modifiers:` to control prompt detection. It depends on standard Sphinx and documentation libraries (docutils, Jinja2, Pygments) and requires Python 3.11 or later.
Use it for
- Document shell commands and their expected output in installation or setup guides with styled, unselectable prompts.
- Render Python REPL sessions with >>> prompts in tutorial documentation.
- Create PowerShell or batch script examples in Windows-focused documentation.
- Highlight multiple command-line prompts in a single code block for complex shell workflows.
- Maintain consistent prompt styling across large documentation projects using Sphinx.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a stable, actively maintained Sphinx extension with no known vulnerabilities, permissive licensing, and low install friction. It solves a specific documentation problem—rendering unselectable prompts—cleanly and integrates naturally into Sphinx workflows. Install it if you document shell commands or code examples in Sphinx and want styled, user-friendly prompts.
Install
sphinx-prompt on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and remains current, depending on standard Sphinx and documentation tooling libraries.
Requires Python >= 3.11 and an existing Sphinx documentation project.
License in practice
BSD-3-Clause is a permissive license allowing commercial and private use with minimal restrictions, making this safe to use in most projects.
Quickstart
# In conf.py
extensions += ['sphinx_prompt']
# In your .rst file
.. prompt:: bash
:prompts: $
python3 -m pip install sphinx-prompt
Verify before relying
- Whether the package supports reStructuredText syntax beyond the documented languages (text, bash, batch, powershell, python, scala).
- Performance characteristics when rendering large numbers of prompts in a single documentation build.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesSphinxcertifidocutilsidnajinja2pygmentsrequestsurllib3 |
| Maintenance | Actively maintained 259 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 924,747 / month, #4,712 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/StableEnvironment :: PluginsEnvironment :: Web EnvironmentFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: DocumentationTopic :: Documentation :: SphinxTopic :: Software Development :: DocumentationTyping :: Typed |
Evidence: sphinx_prompt-1.10.2-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 shell prompt directive”
- sphinx-promptSphinx Prompt is a Sphinx extension that renders shell and code…
- sphinxcontrib-runcmdA Sphinx extension that executes arbitrary shell commands and embeds…
- sphinxcontrib-programoutputA Sphinx extension that executes arbitrary shell commands and embeds…
Give your agent the search over MCP, or paste the wish link into any chat.
More Documentation packages
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
Griffe extracts the complete structure and signatures of Python programs to generate API documentation or detect breaking changes in your project's public API.
Install it if you need to programmatically inspect Python code structure, generate API docs, or enforce API stability in CI.
A Sphinx extension that outputs documentation in serialized HTML formats (JSON and pickle) alongside standard HTML.
Alabaster is a clean, responsive Sphinx theme for documentation that requires Python 3.10 or newer and Sphinx 6.2 or newer.
A Sphinx extension that generates HTML help files from reStructuredText documentation source.
See also sphinxcontrib-runcmd · sphinx-toggleprompt · sphinx-panels · sphinxcontrib-programoutput · sphinxcontrib-typer · prompthub-py · sphinx-plotly-directive · questo · sphinx-substitution-extensions · sphinx-jinja