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 (recommended)

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 MkDocs:

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rich_gradient_cli-0.2.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rich_gradient_cli-0.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file rich_gradient_cli-0.2.0.tar.gz.

File metadata

  • Download URL: rich_gradient_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rich_gradient_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5d959f195452e0b7d67c5cfaeccb377cca92e20c29c1a493ea999166e9c42faa
MD5 c7f292deedbba35954c8b64e9a54cf34
BLAKE2b-256 9087d0ddf4c5cae5d01c97cd40e3529cc379a7e87e743b7ce41eda6604cdffba

See more details on using hashes here.

File details

Details for the file rich_gradient_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rich_gradient_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rich_gradient_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ece76ccd92c846080ac3992e1aff07f88b7dbd205b454578bb6bdea6cf5a20e
MD5 217439e3c9f0bf4b2bcc0fb05e8b15a3
BLAKE2b-256 8dc743548a0e9e186d0c478d239acbefef6364e218a89aa667f2ace16f23699a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page