Skip to main content

rich-gradient-cli

rich-gradient-cli is a CLI for rich-gradient. The tool allows you to create colorful gradients in your terminal output, making it easier to visualize data or simply add some flair to your command-line applications.

Installation

You can install rich-gradient-cli from PyPI

uv add rich-gradient-cli

pip

pip install rich-gradient-cli

Usage

Print

To use the rich-gradient-cli, you can run the following command in your terminal:

gradient print --colors 'red,#ff9900,#ffff00' "This is gradient text that starts red, transitions through orange, and ends in yellow\!"

Gradient Text Example

Gradient

Use gradient for the generic rich-gradient renderable, including highlight rules and animation:

gradient gradient --colors 'magenta,cyan' --highlight-word error='bold white on red' "Highlight error text"

Spectrum

Inspect generated spectrum colors as a rich table, hex values, names, or CSV:

gradient spectrum --hues 7 --seed 42
gradient spectrum --hues 7 --output hex

Rich renderables

Wrap common Rich renderables in gradients without writing Python:

gradient columns alpha beta gamma --colors 'red,blue'
gradient tree project src/app.py docs/index.md --colors 'lime,cyan'
gradient syntax pyproject.toml --lexer toml --line-numbers --colors 'yellow,magenta'
cat data.csv | gradient table - --colors 'cyan,magenta'

Rule

You can also create gradient rules using the rule command:

gradient rule --colors 'blue,#00ff00,cyan' "Blue to Green to Cyan Rule"

Gradient Rule Example

Panel

To create a gradient panel, you can use the panel command:

gradient panel --colors "red,#ff9999" -t "Error" --title-style "bold #ffffff" --title-align left 'This is an error message with a red to pink gradient background.'

Gradient Panel Example

Markdown

You can also render Markdown with gradients:

echo "# Hello\n\n- This is **bold**.\n- This is *italic*." | gradient markdown -

Gradient Markdown Example

Rich-style viewing

Use view for rich-cli-style file rendering. It auto-detects Markdown, JSON, CSV/TSV, and syntax-highlighted source files; it also accepts - for stdin and http:// or https:// URLs.

gradient view README.md
gradient view pyproject.toml --lexer toml --line-numbers --guides
cat data.json | gradient view - --json --force-terminal
gradient view README.md --export-html readme.html

Docs

Build and preview the documentation locally with Zensical (requires Python 3.11+; the docs extra is skipped on 3.10):

uv pip install -e ".[docs]"
zensical serve

Metadata

Release files for rich-gradient-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rich-gradient-cli 0.3.0
File Size Uploaded Provenance Actions
rich_gradient_cli-0.3.0.tar.gz 21.1 kB Without provenance Details for rich_gradient_cli-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rich-gradient-cli 0.3.0
File Interpreter ABI Platform Actions
rich_gradient_cli-0.3.0-py3-none-any.whl Python 3 none any Details for rich_gradient_cli-0.3.0-py3-none-any.whl

Total release size: 51.3 kB

Release files / rich_gradient_cli-0.3.0.tar.gz

Download URL rich_gradient_cli-0.3.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
be48027be0a504388b5b3c98cad3831aa4dc453e0eaf8fa7e654b45672889548
BLAKE2b-256 checksum
How to use checksums
8c37a3b6ec5d407221a4f2848e357fc6e87cb2580d7c3bab80c8caaec072de32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rich_gradient_cli-0.3.0-py3-none-any.whl

Download URL rich_gradient_cli-0.3.0-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0c87312f356adf22f8b0452cc6ec58e3cda3852de7906a07043d225516e122c
BLAKE2b-256 checksum
How to use checksums
602d7a99daf2b69430c1c0e9acc2f8d917b31a20387dee740be3740dfe26166d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for rich-gradient-cli 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page