wasi-master/rich-rst

A reStructuredText renderer for rich

Python

21

416 commits

updated Oct 6, 2026

See the code

README

Logo

rich-rst

Documentation Status Tests Status CodeQL Status Codecov

Render reStructuredText with Rich. This package turns reST documents into Rich renderables so you can preview documentation, docstrings, and snippets directly in the terminal. Also includes a CLI.

Highlights

  • Supports all currently documented RST elements.
  • Handles common documentation features such as headings, lists, tables, links, images, code blocks, footnotes, and many Sphinx roles.
  • Provides both a Python API and a command-line interface.
  • Can also export rendered output to HTML from the CLI.

Installation

pip install rich-rst
Other package managers (and thanks to the people who maintain them)

rich-rst is packaged by volunteers across many ecosystems. A huge thank you to everyone listed below for keeping it available. Distro packages may lag behind PyPI; see Repology for current versions.

Packaging status

Package managerPackageMaintainer(s)Install
PyPIrich-rstWasi Masterpip install rich-rst
conda-forgerich-rstDavid Brochartconda install -c conda-forge rich-rst
Alpine Linuxpy3-rich-rstBart Ribbersapk add py3-rich-rst
ALT Linuxpython3-module-rich-rstVladislav Eliseevapt-get install python3-module-rich-rst
Arch Linux (AUR)python-rich-rstdemizeryay -S python-rich-rst
Debian / Ubuntu
also Kali, Parrot, Raspbian, Devuan, PureOS, deepin
python-rich-rstNilson F. Silva & the Debian Python Teamsudo apt install python3-rich-rst
Exherbodev-python/rich-rstTimo Gurrcave resolve dev-python/rich-rst
Fedorapython-rich-rstSam Doransudo dnf install python3-rich-rst
FreeBSDtextproc/py-rich-rstPo-Chuan Hsieh (sunpoet)cd /usr/ports/textproc/py-rich-rst && make install clean
Gentoo (GURU)dev-python/rich-rstFlorian Albrechtskirchingereselect repository enable guru && emerge dev-python/rich-rst
GNU Guixpython-rich-rstGuix contributorsguix install python-rich-rst
MacPortspy-rich_rstUnmaintained (open for adoption)sudo port install py313-rich_rst
Mageiapython-rich-rstpapoteursudo dnf install python3-rich-rst
Nixpkgspython3Packages.rich-rstNixpkgs contributors (originally Joel Koen)nix-shell -p python3Packages.rich-rst
openSUSEpython-rich-rstMartin Pluskal & the openSUSE Python teamsudo zypper install python313-rich-rst

Packaging rich-rst somewhere not listed here, or spotted a mistake? Open an issue or PR so you can be credited.

Python API

from rich import print
from rich_rst import RestructuredText

document = """
rich-rst
========

This is a **test** document.

- Item one
- Item two

.. code-block:: python

   print("hello")
"""

print(RestructuredText(document))

The main constructor options are code_theme, show_line_numbers, show_errors, guess_lexer, default_lexer, sphinx_compat, admonition_style, and allow_file_access.

Directives that read other files (include, literalinclude, and raw/csv-table with :file: or :url:) are disabled by default. Pass allow_file_access=True to enable them, but only for markup you trust.

Command Line Interface

Render a file:

python -m rich_rst readme.rst

Render from standard input:

python -m rich_rst -

View all available options:

python -m rich_rst --help

Useful flags include --code-theme, --show-line-numbers, --guess-lexer, --default-lexer, --show-errors, --allow-file-access, --admonition-style, -S/--save-html, --html-theme, --list-html-themes, --output, --debug, and --version.

Compatibility

The renderer is designed for terminal output, so not every docutils feature can be represented visually. The current limitations and unsupported elements are documented in ELEMENTS.md.

Documentation

Changelog

See CHANGELOG.md.

cli
command-line-interface
docutils
python
python3
restructuredtext
rich
rst
sphinx

wasi-master/rich-rst

A reStructuredText renderer for rich

Python

21

416 commits

updated Oct 6, 2026

See the code

README

Logo

rich-rst

Documentation Status Tests Status CodeQL Status Codecov

Render reStructuredText with Rich. This package turns reST documents into Rich renderables so you can preview documentation, docstrings, and snippets directly in the terminal. Also includes a CLI.

Highlights

  • Supports all currently documented RST elements.
  • Handles common documentation features such as headings, lists, tables, links, images, code blocks, footnotes, and many Sphinx roles.
  • Provides both a Python API and a command-line interface.
  • Can also export rendered output to HTML from the CLI.

Installation

pip install rich-rst
Other package managers (and thanks to the people who maintain them)

rich-rst is packaged by volunteers across many ecosystems. A huge thank you to everyone listed below for keeping it available. Distro packages may lag behind PyPI; see Repology for current versions.

Packaging status

Package managerPackageMaintainer(s)Install
PyPIrich-rstWasi Masterpip install rich-rst
conda-forgerich-rstDavid Brochartconda install -c conda-forge rich-rst
Alpine Linuxpy3-rich-rstBart Ribbersapk add py3-rich-rst
ALT Linuxpython3-module-rich-rstVladislav Eliseevapt-get install python3-module-rich-rst
Arch Linux (AUR)python-rich-rstdemizeryay -S python-rich-rst
Debian / Ubuntu
also Kali, Parrot, Raspbian, Devuan, PureOS, deepin
python-rich-rstNilson F. Silva & the Debian Python Teamsudo apt install python3-rich-rst
Exherbodev-python/rich-rstTimo Gurrcave resolve dev-python/rich-rst
Fedorapython-rich-rstSam Doransudo dnf install python3-rich-rst
FreeBSDtextproc/py-rich-rstPo-Chuan Hsieh (sunpoet)cd /usr/ports/textproc/py-rich-rst && make install clean
Gentoo (GURU)dev-python/rich-rstFlorian Albrechtskirchingereselect repository enable guru && emerge dev-python/rich-rst
GNU Guixpython-rich-rstGuix contributorsguix install python-rich-rst
MacPortspy-rich_rstUnmaintained (open for adoption)sudo port install py313-rich_rst
Mageiapython-rich-rstpapoteursudo dnf install python3-rich-rst
Nixpkgspython3Packages.rich-rstNixpkgs contributors (originally Joel Koen)nix-shell -p python3Packages.rich-rst
openSUSEpython-rich-rstMartin Pluskal & the openSUSE Python teamsudo zypper install python313-rich-rst

Packaging rich-rst somewhere not listed here, or spotted a mistake? Open an issue or PR so you can be credited.

Python API

from rich import print
from rich_rst import RestructuredText

document = """
rich-rst
========

This is a **test** document.

- Item one
- Item two

.. code-block:: python

   print("hello")
"""

print(RestructuredText(document))

The main constructor options are code_theme, show_line_numbers, show_errors, guess_lexer, default_lexer, sphinx_compat, admonition_style, and allow_file_access.

Directives that read other files (include, literalinclude, and raw/csv-table with :file: or :url:) are disabled by default. Pass allow_file_access=True to enable them, but only for markup you trust.

Command Line Interface

Render a file:

python -m rich_rst readme.rst

Render from standard input:

python -m rich_rst -

View all available options:

python -m rich_rst --help

Useful flags include --code-theme, --show-line-numbers, --guess-lexer, --default-lexer, --show-errors, --allow-file-access, --admonition-style, -S/--save-html, --html-theme, --list-html-themes, --output, --debug, and --version.

Compatibility

The renderer is designed for terminal output, so not every docutils feature can be represented visually. The current limitations and unsupported elements are documented in ELEMENTS.md.

Documentation

Changelog

See CHANGELOG.md.

cli
command-line-interface
docutils
python
python3
restructuredtext
rich
rst
sphinx

Project health

Overall

4.5/10

Maintained

10/10

Code review

0/10
OpenSSF Scorecard

Latest release

2.2.0 · Sep 27, 2026

Releases this year

6