LinuxCommandLibrary

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 colors
$ python -m rich.color
copy
Show emoji codes
$ python -m rich.emoji
copy
Demo all features
$ python -m rich
copy
Inspect object
$ python -m rich.inspect [module]
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.
rich.syntax FILE
Syntax highlighting.
rich.json FILE
Pretty print JSON.
rich.color
Show color palette.
rich.emoji
List emoji codes.
rich.inspect OBJECT
Inspect Python object.

CAVEATS

Python package, not standalone CLI. Terminal must support colors. Some features need true color.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community