LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rich

Render rich text and markdown in terminal

TLDR

View markdown file
$ python -m rich.markdown [file.md]
copy
Syntax highlight code
$ python -m rich.syntax [file.py]
copy
Pretty print JSON
$ python -m rich.json [file.json]
copy
Show available spinners
$ python -m rich.spinner
copy
Show color palette
$ python -m rich.color
copy
Show emoji codes
$ python -m rich.emoji
copy
Demo all features
$ python -m rich
copy

SYNOPSIS

python -m rich [module] [options] [file]

DESCRIPTION

rich is a Python library for terminal formatting. The CLI provides quick access to its features.Markdown rendering shows formatted documents. Headers, lists, and code blocks display beautifully.Syntax highlighting colors source code. Many languages supported automatically.JSON pretty printing formats data. Colors highlight structure.Color display shows terminal capabilities. Helps verify what your terminal supports.

MODULES

rich.markdown FILE

Render markdown file.
rich.syntax FILE
Syntax highlight source code file.
rich.json FILE
Pretty print JSON file.
rich.color
Show terminal color palette.
rich.spinner
Display available spinner animations.
rich.emoji
List emoji codes.
rich.tree
Demonstrate tree rendering.

CAVEATS

Requires the `rich` Python package (`pip install rich`). Terminal must support ANSI colors. Some features need true color support. A separate standalone CLI tool `rich-cli` is also available via `pip install rich-cli`.

HISTORY

Rich was created by Will McGugan in 2019 for beautiful terminal output in Python. Its CLI modules provide quick utilities.

SEE ALSO

bat(1), glow(1), jq(1), pygmentize(1)

Copied to clipboard
Kai