sphinx-copybutton
Add a copy button to each of your code cells.
Decision gist · record as of 2026-08-14
Yes. This is a low-friction, actively maintained extension that solves a genuine user experience problem in documentation. With no security vulnerabilities, a permissive license, and a single dependency on Sphinx itself, it's a straightforward addition to any Sphinx-based documentation project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with a single runtime dependency on sphinx.
- The package is actively maintained with recent commits and has been stable since its early releases.
License · maintenance · safety
MIT License (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial documentation projects.
last release 2023-04-14 (1218 days) · last repo commit 2026-06-03 · 270 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,777,753 downloads/mo, #1,697 on PyPI
Alternatives
Verify before relying
pip install sphinx-copybutton
# In conf.py:
extensions = [
'sphinx_copybutton'
]- Whether the copy button appearance and behavior can be customized beyond CSS overrides
- Browser compatibility and JavaScript runtime requirements for the clipboard functionality
What it is and what it does
sphinx-copybutton is a lightweight Sphinx extension that enhances code blocks in documentation by adding a clickable copy button. When readers click the button, the code block's content is copied to their clipboard. The extension integrates directly into Sphinx's build process and requires only a single line addition to your documentation configuration file.
The package relies on the clipboard.js library for its JavaScript functionality and is designed to work with modern Python versions. It's widely used in documentation projects and has accumulated significant download volume, indicating stable, practical utility for documentation authors who want to improve the reader experience when sharing code examples.
Use it for
- Add copy buttons to code examples in API documentation so users can quickly copy sample calls
- Enhance tutorial documentation where readers need to copy and paste setup commands or code snippets
- Improve user experience in technical guides by reducing friction when copying multi-line code blocks
- Enable one-click code copying in Jupyter Book or MyST Markdown documentation built with Sphinx
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a low-friction, actively maintained extension that solves a genuine user experience problem in documentation. With no security vulnerabilities, a permissive license, and a single dependency on Sphinx itself, it's a straightforward addition to any Sphinx-based documentation project.
Install
sphinx-copybutton on PyPI
Before you install
Low friction installation with a single runtime dependency on sphinx. The package is actively maintained with recent commits and has been stable since its early releases.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial documentation projects.
Quickstart
pip install sphinx-copybutton
# In conf.py:
extensions = [
'sphinx_copybutton'
]
Verify before relying
- Whether the copy button appearance and behavior can be customized beyond CSS overrides
- Browser compatibility and JavaScript runtime requirements for the clipboard functionality
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesphinx |
| Maintenance | Actively maintained 1,218 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,777,753 / month, #1,697 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: Sphinx :: ExtensionLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: sphinx_copybutton-0.5.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 code block copy button”
- sphinx-copybuttonA Sphinx extension that adds a copy button to code blocks in…
- sphinx-togglepromptAdds a button to Python code blocks in Sphinx documentation that…
- sphinx-togglebuttonA Sphinx extension that adds collapsible toggle buttons to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Sphinx packages
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
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.
A Sphinx extension that converts documentation source files into QtHelp format, enabling integration with Qt-based help systems and documentation viewers.
However, be aware that maintenance is dormant—if you rely on it long-term, monitor Sphinx compatibility and consider whether QtHelp remains the right format for your…
See also sphinx-toggleprompt · sphinx-togglebutton · sphinx-panels · sphinx-thebe · jupyter-sphinx · sphinx-inline-tabs · sphinx-tabs · sphinx-multitoc-numbering · sphinx-codeautolink · sphobjinv