This release is a pre-release and may not be stable for production use.
readthedocs-cli
Command line client for Read the Docs. Build your documentation anywhere and upload the artifacts to Read the Docs for hosting.
Installation
uvx --from readthedocs-upload readthedocs --help
# or
pip install readthedocs-upload
Python 3.10 or newer is required.
Usage
export READTHEDOCS_TOKEN=...
readthedocs upload --project-slug my-project --html _build/html
Downloadable formats are optional and point at a single file each:
readthedocs upload \
--project-slug my-project \
--html _build/html \
--pdf _build/latex/my-project.pdf \
--epub _build/epub/my-project.epub
Run readthedocs upload --help for all options.
Environment variables
| Variable | Description |
|---|---|
READTHEDOCS_TOKEN |
API token. Required. Never passed as a command line argument. |
READTHEDOCS_API_URL |
Base URL of the Read the Docs instance. Defaults to https://app.readthedocs.org. Same as --api-url. |
Version metadata
The client infers the version to upload from the environment.
Every inferred value can be overridden with --version-name, --version-type and --commit.
| Environment | name | type | commit |
|---|---|---|---|
| GitHub Actions, push to a branch | GITHUB_REF_NAME |
branch |
GITHUB_SHA |
| GitHub Actions, push of a tag | GITHUB_REF_NAME |
tag |
GITHUB_SHA |
| GitHub Actions, pull request | pull request number | external |
pull request head commit |
| Local git checkout, on a branch | branch name | branch |
HEAD |
| Local git checkout, on a tag | tag name | tag |
HEAD |
Other CI providers work with the explicit flags.
GitHub Actions
On GitHub, use the readthedocs/upload-action, which wraps this client and resolves the Git metadata from the workflow event:
- uses: readthedocs/upload-action@v1
with:
token: ${{ secrets.READTHEDOCS_TOKEN }}
project-slug: my-project
html: _build/html
Development
git submodule update --init
uv sync
uv run readthedocs --help
uv run --with tox --with tox-uv tox
Metadata
Release files for readthedocs-upload 1.0.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| readthedocs_upload-1.0.0a1.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readthedocs_upload-1.0.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.9 kB
Release files / readthedocs_upload-1.0.0a1.tar.gz
| Download URL | readthedocs_upload-1.0.0a1.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58b893dcb0b5ec228994d23bf8aaa02063fdd1bbb129c64713425d374e403a6c
|
|
BLAKE2b-256 checksum How to use checksums |
f3ee13768cbad351255939b3db4b193e9f696106eff86dc0a612e0e3beda9354
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / readthedocs_upload-1.0.0a1-py3-none-any.whl
| Download URL | readthedocs_upload-1.0.0a1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c10a959c532364694c2ccb3f7f0f7fd71d9ef19330128c915f27ce1329a3326d
|
|
BLAKE2b-256 checksum How to use checksums |
6df51520373aeaffe8c160aaecb637e4ada7e4908ee6f9c453e9dfd83b7c0cde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log