Repolode
Textualize

Textualize/rich-cli

A command line toolbox that uses Rich to render files, Markdown, JSON, CSV and Jupyter notebooks with colors and formatting in the terminal.

Stars
3,771
Forks
125
Open issues
58
Last commit
17 days ago

What is it?

Rich-CLI provides a single `rich` command for producing styled output in the terminal. It highlights many source file types with syntax coloring, and offers specialized rendering for Markdown, JSON, CSV and Jupyter notebook files.

Beyond viewing files, the command can apply console markup to text passed on the command line, draw rules and panels, align and pad output, and read from stdin or a URL. Output can also be exported as an HTML file. A built-in pager supports keyboard and vi-style navigation for long content.

Installation is available through pipx, Homebrew, pip, or conda-forge, and the tool is built on the Python Rich library.

Key features

  • 01Syntax highlighting for many file formats with optional line numbers and indentation guides.
  • 02Rendered Markdown, JSON, CSV/TSV tables and Jupyter notebooks.
  • 03Console markup for styled text printed from the command line.
  • 04Built-in pager with cursor and vi-style navigation.
  • 05Reads files from stdin or HTTP(S) URLs.
  • 06Exports any output to an HTML file.

Use cases

  • Viewing source code or config files in the terminal with readable highlighting.
  • Reading Markdown documents or Jupyter notebooks without opening an editor.
  • Pretty-printing JSON responses piped from curl or other commands.
  • Exporting colored terminal output to HTML for sharing.

Quick start

  1. 1

    Install Rich-CLI with pipx on Windows or Linux

    pipx install rich-cli
  2. 2

    Or install with pip as a Python package

    python -m pip install rich-cli
  3. 3

    Highlight a file in the terminal

    rich loop.py
  4. 4

    View usage and help

    rich --help

Topics

FAQ

What is rich-cli?
A command line toolbox that uses Rich to render files, Markdown, JSON, CSV and Jupyter notebooks with colors and formatting in the terminal. Rich-CLI provides a single `rich` command for producing styled output in the terminal. It highlights many source file types with syntax coloring, and offers specialized rendering for Markdown, JSON, CSV and Jupyter notebook files.
Is rich-cli free to use? What license does it have?
rich-cli is open source under the MIT license. Check the license terms before using it in commercial products.
Is rich-cli still maintained?
Actively maintained. The last commit to rich-cli was on Oct 5, 2026.
What can I use rich-cli for?
Viewing source code or config files in the terminal with readable highlighting. Reading Markdown documents or Jupyter notebooks without opening an editor. Pretty-printing JSON responses piped from curl or other commands. Exporting colored terminal output to HTML for sharing.
How do I install rich-cli?
Install Rich-CLI with pipx on Windows or Linux: pipx install rich-cli Or install with pip as a Python package: python -m pip install rich-cli Highlight a file in the terminal: rich loop.py View usage and help: rich --help
Where can I get rich-cli?
The source code and installation instructions are on GitHub: https://github.com/Textualize/rich-cli

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects