explaingit

textualize/rich-cli

Analysis updated 2026-07-03

3,665PythonAudience · developerComplexity · 1/5Setup · easy

TLDR

A command-line tool that displays files in the terminal with syntax highlighting, rendered Markdown, colored JSON, spreadsheet tables, and more, plus URL fetching and HTML export.

Mindmap

mindmap
  root((rich-cli))
    File types
      Code files
      Markdown
      JSON
      CSV
      Jupyter notebooks
    Features
      Syntax highlighting
      Line numbers
      URL fetching
      Built-in pager
      HTML export
    Install
      Homebrew
      pipx
      pip
    Use Cases
      File preview
      Data inspection
      Terminal sharing
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Preview a Python script or other code file in the terminal with syntax highlighting and line numbers instead of plain text.

USE CASE 2

Display a JSON file with color-coded structure to quickly spot the data you need.

USE CASE 3

View a Markdown document rendered with proper headers and bold text instead of raw symbols.

USE CASE 4

Fetch and display a file from a URL directly in the terminal without downloading it first.

What is it built with?

PythonRich

How does it compare?

textualize/rich-clidisler/claude-code-hooks-masteryoop7/ytsage
Stars3,6653,6643,667
LanguagePythonPythonPython
Setup difficultyeasymoderateeasy
Complexity1/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

Rich-CLI is a command-line tool that makes reading files in the terminal much more pleasant. Instead of seeing plain text, you run the rich command followed by a filename and the output comes out color-coded and easy to scan. It was built by the Textualize team using their Rich Python library, and is installable via Homebrew on macOS, via pipx on Windows and Linux, or via pip and conda on any system. The main thing it does is display files with syntax coloring. Point it at a Python script or most other code file types and it highlights keywords, strings, and comments in colors suited to that language. You can add line numbers and indentation guides, pick a color theme, and control line wrapping. Different file formats get specialized handling: Markdown files render with proper headers and bold text instead of showing the raw symbols, JSON files display with color-coded structure, CSV and TSV spreadsheets show up as formatted tables, and Jupyter notebook files handle code cells and text cells separately. Rich-CLI is not limited to local files. You can hand it a URL starting with http:// or https:// and it will fetch and display that file directly. You can also pipe output from another program into it using the - placeholder. For long files, a built-in scrollable pager lets you navigate without content rushing past the screen. There are controls for the visual presentation: set a fixed output width, align the block left or center or right within the terminal, set how text justifies within that block, and apply custom styles like background colors. If you want to apply inline styling to a short piece of text rather than a file, the --print flag treats your text as markup and renders colors and bold directly. Rendered output can also be exported to an HTML file for sharing or archiving.

Copy-paste prompts

Prompt 1
Show me how to use the rich command to display a Python file with syntax highlighting, line numbers, and a dark color theme in the terminal.
Prompt 2
I have a large JSON file. How do I use rich-cli to display it with color-coded structure and navigate through it with the built-in pager?
Prompt 3
How do I pipe the output of another command into rich-cli to render it with formatting, and how do I export the result to an HTML file?
Prompt 4
Use rich-cli to display a CSV file as a formatted table in the terminal, with column headers shown clearly.
Prompt 5
How do I use the --print flag in rich-cli to apply inline styles like bold and color to a short piece of text directly in the terminal?

Frequently asked questions

What is rich-cli?

A command-line tool that displays files in the terminal with syntax highlighting, rendered Markdown, colored JSON, spreadsheet tables, and more, plus URL fetching and HTML export.

What language is rich-cli written in?

Mainly Python. The stack also includes Python, Rich.

How hard is rich-cli to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is rich-cli for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub textualize on gitmyhub

Verify against the repo before relying on details.