# sphinx-copybutton

> Add a copy button to code blocks in Sphinx docs

Source: https://talira.ai/catalog/sphinx-copybutton-40e9beb2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / documentation / docs sites](https://talira.ai/categories/developer-tools/documentation/docs-sites), [languages / python](https://talira.ai/categories/languages/python)
- Licence: MIT[^3]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Backed by: [Executable Books](https://talira.ai/orgs/executable-books.md)

sphinx-copybutton is a small [Sphinx](https://talira.ai/catalog/sphinx-3r9akc1j.md) extension that adds a copy button to the right of every code block in a built documentation site, so readers can copy the code with one click. It's enabled by adding `sphinx_copybutton` to the extensions in `conf.py`, and its look can be changed by overriding its CSS. The button itself is powered by clipboard.js.

## Links

- GitHub: https://github.com/executablebooks/sphinx-copybutton
- Docs: https://sphinx-copybutton.readthedocs.io/en/latest/

## Ways to install

### Package managers

- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/source/stable/sphinx-copybutton>[^1]

## Problems it solves

- add copy-to-clipboard buttons to code blocks in my Sphinx docs
- let readers copy code snippets from Read the Docs pages
- add a copy button to Sphinx code examples

## Features

- copy button on every code block
- one line in conf.py to enable
- styling through overridable CSS
- installs from PyPI or conda-forge

## Trust

Overall: 0.31 out of 1.
Signals: maintenance 0.27, adoption 0.49, momentum 0.17, community 0.59, backing 0.30, extensibility 0.00.

- latest release v0.5.2 3.6 years ago
- 271 GitHub stars
- 29 contributors
- backed by Executable Books

Warnings:

- last commit 5 months ago

## Related

- Works with [Sphinx](https://talira.ai/catalog/sphinx-3r9akc1j.md)

## Alternatives

- [Sphinx](https://talira.ai/catalog/sphinx-3r9akc1j.md): Create intelligent and beautiful documentation with ease
- [nbsphinx](https://talira.ai/catalog/nbsphinx-yzayv76v.md): Sphinx extension that renders Jupyter notebooks in HTML and LaTeX documentation
- [sphinx-autodoc-typehints](https://talira.ai/catalog/sphinx-autodoc-typehints-qhhdd7dq.md): Render Python type hints in Sphinx autodoc documentation
- [MyST-Parser](https://talira.ai/catalog/myst-parser-6shx6kdj.md): Write Sphinx and Docutils documentation in MyST Markdown
- [numpydoc](https://talira.ai/catalog/numpydoc-f2kx8n1y.md): Sphinx extension for NumPy-style docstrings
- [starlight-llm-actions](https://talira.ai/catalog/starlight-llm-actions-gph9vs34.md): Starlight plugin: Page Actions dropdown with Copy/View/PDF and Open-in-LLM buttons

## Sources

[^1]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 28 Nov 2026)
[^2]: https://github.com/executablebooks/sphinx-copybutton/blob/master/README.md (checked 28 Nov 2026)
[^3]: https://github.com/executablebooks/sphinx-copybutton/blob/master/LICENSE (checked 28 Nov 2026)
