Skip to content

CLI reference

Every option the rich command accepts, generated from the same command description as the binary's own --help (rich docs markdown and rich docs config) so that this page cannot drift from it.

Looking for how to do something rather than what a flag is called? Start at Using the CLI.

rich

rich 0.0.24 — Rust port of the rich-cli terminal toolbox

RESOURCE is a file path, an http(s) URL, or - for stdin. Everything after a bare -- is a RESOURCE, however much it looks like an option. Input modes with no RESOURCE read stdin until EOF; -p - reads markup from stdin too. Terminal stdin shows an input hint. Repeated scalar options use their last value.

A --no-… spelling (such as --no-watch) disables the corresponding config/default boolean.

Usage

rich [OPTIONS] [RESOURCE]
rich [OPTIONS] <COMMAND> [RESOURCE]
rich --batch [OPTIONS] RESOURCE...
rich --watch [OPTIONS] FILE...

Arguments

Argument Description
[RESOURCE]... A file path, an http(s) URL, or - for stdin (several with --batch, --watch or --gif)

Render mode

Choose at most one; the default auto-detects .md/.rst/.json/.csv/.tsv/.ipynb, .mmd/.mermaid and .dot/.gv by extension, and .org, .adoc/.asciidoc and .man/.roff/.mdoc documents; a man page's section extension (.1 to .9) or .asc counts when the content agrees, and a file with no extension that is plainly Org, AsciiDoc or roff renders as one — anything else with a file extension is syntax-highlighted.

Option Description
-p, --print Treat RESOURCE as literal markup TEXT, not a file path.
-m, --markdown Render RESOURCE as Markdown.
--rst Render RESOURCE as reStructuredText.
--org Render RESOURCE as an Org document (headlines, TODO keywords, lists, blocks, tables, drawers)
--asciidoc, --adoc Render RESOURCE as AsciiDoc (sections, attributes, lists, source blocks with callouts, tables, admonitions)
--man, --roff Render RESOURCE as a man page from its roff source (man and mdoc macros, tbl tables)
-j, -J, --json Pretty-print RESOURCE as JSON.
-x, --syntax Syntax-highlight RESOURCE (language from its extension)
--csv Render RESOURCE as a CSV/TSV table.
--ipynb Render RESOURCE as a Jupyter notebook.
--jsonl, --ndjson Stream JSON Lines / NDJSON records.
--log Stream log records: JSON Lines, logfmt and common text formats, filtered, followed and grouped.
--gif Animate GIFs (and animated WebPs) side by side; pipes receive the first frame.
-u, --rule Draw a horizontal rule (RESOURCE is its title)
--diff Compare two images perceptually, two text files as a diff (syntax-aware; ANSI captures by visible text and style), or render one patch such as git diff output.
--image Render RESOURCE (PNG, JPEG, GIF or WebP) as a still image (ASCII/Braille/blocks/quadrants/Sixel)
--inspect Explore structured data (JSON, YAML, TOML, XML, INI, dotenv) as a tree.
--ansi-explain Decode every escape sequence in RESOURCE and show the visible text.

Input

Option Description
--format <F> Input format. With --inspect, the parser (default auto-detect); otherwise auto detects piped or extensionless input and routes it (JSON to --json, other formats to highlighting, likely Markdown, reStructuredText, Org, AsciiDoc and man pages to their renderers, anything else to plain text), and a named format overrides the extension. A document format (markdown, rst, org, asciidoc, man) is the same as its mode flag. Default: auto. Config: format. Possible values: auto, json, yaml, toml, xml, ini, env, markdown, rst, org, asciidoc, man.
--encoding <E> Explicit text encoding: utf-8, utf-16 (BOM required), utf-16le or utf-16be. Strict; files, stdin and URLs only. Possible values: utf-8, utf-16, utf-16le, utf-16be.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it) Config: width.
-W, --max-width <SIZE> Print at most SIZE columns wide (upstream's console.print(width=…))
-l, --left Left-justify output.
-c, --center Center output.
-r, --right Right-justify output.
-L, --text-left Justify --print and --rule text to the left.
-C, --text-center Justify --print and --rule text to the center.
-R, --text-right Justify --print and --rule text to the right.
-F, --text-full Justify --print text to both edges (a rule centres its title)
--soft Soft wrap: no line is wrapped or cut, so the terminal wraps it.
--emoji Replace :emoji: codes, e.g. :sparkles: (off by default, as upstream)
-a, --panel <BOX> Wrap output in a panel, shrunk to fit its content (none = no panel) Config: panel. Possible values: ascii, ascii2, square, rounded, heavy, double, ascii_double_head, square_double_head, minimal, minimal_heavy_head, minimal_double_head, simple, simple_head, simple_heavy, horizontals, heavy_edge, heavy_head, double_edge, markdown, none.
-d, --padding <P> Wrap output in padding (1, 2, or 4 comma-separated ints) Config: padding.
-e, --expand Make --panel/--padding fill the width instead of fitting (implied by --width)
--title <T> Panel title; also the CSV table's title.
--caption <T> Panel subtitle; also the CSV table's caption.
-s, --style <S> Style laid under the whole output, e.g. "bold red".
-S, --panel-style <S> Panel border style, e.g. "dim" (with --panel)
-y, --hyperlinks Render a Markdown link as a clickable OSC 8 hyperlink. Off by default, which shows the URL as text (url).

Source

Option Description
-h, --head <LINES> Show the first LINES of a source file or CSV (as upstream, -h is --head, not help)
-t, --tail <LINES> Show the end of a source file or CSV (as upstream, --tail N shows the last N-1 source lines)
-n, --line-numbers Number the lines of source.
-g, --guides Draw indentation guides in source.
--lexer <LEXER> Highlight source as LEXER instead of guessing from the file name; with --rst, --org, --asciidoc or --man, highlight code blocks that name no language as LEXER.
--no-wrap Crop long lines of source instead of wrapping them; with --print, don't wrap text.
--infer With --csv (or a .csv/.tsv file), infer each column's type (integer, float, boolean, date, timestamp, text) and show it under the heading; number columns right-align even with null tokens such as NA. Without it the table is rich-cli's.

Mode options

Option Description
--rule-style <STYLE> With --rule, the line's style. Default: bright_green.
--rule-char <CHARACTER> With --rule, the character(s) the line is drawn with. Default: ─.
--log-presentation <MODE> With --log, select log presentation. Default: plain. Config: log_presentation. Possible values: plain, rich.
--mermaid-backend <BACKEND> How Mermaid diagrams (rich mermaid, ``mermaid fences in Markdown) are drawn: text draws flowcharts, sequence and ER diagrams as text, mmdc uses Mermaid's own CLI (a build with the mmdc feature;rich mermaidtries it first there), off leaves fences as code. Config:mermaid_backend. Possible values:text,mmdc,off`.
--dot-backend <BACKEND> How DOT graphs (rich dot, ``dot fences in Markdown) are drawn: text draws them natively, graphviz also makes --export-svg write Graphviz's own SVG (thedotprogram, installed separately), off leaves fences as code. Config:dot_backend. Possible values:text,graphviz,off`.
--highlighter <NAME> The code highlighter for source, Markdown code, view and diff: syntect (the default), or lumis in a build with the lumis feature. Config: highlighter.
--code-theme <NAME> A theme of the chosen code highlighter, e.g. ansi_dark (rich doctor --report json lists them) Config: code_theme.
--loop <N> With --gif, repeat N times (default 1; 0 = forever)
--speed <X> With --gif, play X times as fast (0.5 = half speed; default 1)
--fps <N> With --gif, draw at most N frames a second (default 30)
--max-frames <N> With --gif, stop each animation after N frames, even with --loop 0.
--max-duration <SECS> With --gif, stop after SECS seconds, whatever is still playing.
--gif-mode <M> With --gif: ascii or blocks (half-block pixels). Blocks fall back to ASCII without color or when piped. Default: ascii. Possible values: ascii, blocks.

Diagram sources

Option Description
--metadata <FILE> With rich deps, read cargo metadata --format-version 1 JSON from FILE (- for stdin) instead of running cargo.
--why <CRATE> With rich deps, show what pulls CRATE (name or name@version) in: every path from the workspace to it.
--graph With rich deps, draw the dependencies (or --why's paths) as a diagram instead of a tree.
--depth <N> With rich deps, show at most N levels below each workspace member; with rich profile, profile JSON paths at most N steps deep (default 4), an object or array at the last step counting as its JSON text.
--duplicates With rich deps, keep only the branches that lead to a crate resolved at more than one version, and add a consolidation summary: who pulls each version, and which version most of them already use.
--no-dev With rich deps, leave dev-dependencies out.
--features With rich deps, show the features Cargo resolved for each crate: what each turns on, and which dependents asked for them; every crate with a feature, or only --package's.
--package <CRATE> With rich deps --features, show only CRATE, as name or name@version.
--timings <FILE> With rich deps, show a cargo build --timings report (the HTML file, or timing-info JSON lines; - for stdin): the slowest units as bars and a table; runs nothing.
--audit <FILE> With rich deps, show cargo audit --json output from FILE (- for stdin) grouped by severity; exits 5 when it lists a vulnerability. Runs no scanner.
--licenses With rich deps, group the crates by licence, marking copyleft, unknown and missing licences.
--sizes With rich deps, show artifact sizes per crate as bars and a table: from the target directory given next (default: the one cargo metadata names), matched to packages through cargo metadata, or from a file given next: cargo bloat --crates --message-format json output or a report saved with --save (- for stdin)
--build-profile <NAME> With rich deps --sizes, read this profile's artifacts: debug (dev), release, or a custom profile (default: debug if it was built, else release)
--source-sizes With rich deps --sizes, also add up each package's source files (its manifest directory, without target/, .git/ and nested packages)
--baseline <FILE> With rich deps --timings or --sizes, compare with an older report, unit by unit (a report saved with --save, or the original format: a timings report, cargo-bloat JSON or a target directory); exits 5 when a unit or the total regressed past --threshold.
--save <FILE> With rich deps --timings or --sizes, also write the report as JSON to FILE, to keep as a --baseline.
--policy <FILE> With rich deps, check every crate's licence against a policy: a TOML allow and deny list, or cargo-deny's deny.toml; conflicts with the root crate's licence are shown too (a heuristic, not legal advice). Exits 5 on a violation.
--sbom <FILE> With rich deps --licenses or --policy, read the packages from an SPDX (2.2, 2.3) or CycloneDX (1.4 to 1.6) JSON document instead of cargo metadata.
--er With rich schema, draw the schema as an ER diagram: a box per table with its columns and keys, an edge per foreign key.

Chart

Option Description
--kind <KIND> With rich chart, what to draw: spark (a sparkline per series), bar (a bar per row, labelled by --x), line (the default) and scatter (each series against --x, or the row number), heatmap (rows by series, each value a shade), pie (one series as slices, labelled by --x) or stacked (a bar per row, each series a part) Possible values: spark, bar, line, scatter, heatmap, pie, stacked.
--x <COLUMN> With rich chart, the column of x positions (line, scatter) or labels (bar, heatmap, pie, stacked), by header or 1-based number (default: the row number; for labels, the first column that is not all numbers)
--y <COLUMN>... With rich chart, a column to draw, by header or 1-based number; repeatable, one series each (default: every numeric column but --x)

Profile

Option Description
--sample <N> With rich profile, the most rows kept for types, statistics and distributions (default 10000): a longer input is sampled uniformly, the sample size is printed, and nulls still count every row.
--columns <COLUMN[,COLUMN...]>... With rich profile, profile only these columns, by header, in this order; repeatable.
--top <N> With rich profile, the most common values shown for a column that is not numeric (default 5); with rich deps --sizes, --timings or --baseline, the units shown (default 20)
--max-paths <N> With rich profile of JSON Lines, profile at most N paths (default 200), in the order first seen; the rest are noted.
--flat With rich profile of JSON Lines, profile rows of the top-level keys (nested values as JSON text) instead of every nested path.
--style-rule <RULE>... Style the cells, rows or columns of a data table by value: COLUMN OP VALUE:STYLE or COLUMN OP VALUE:row:STYLE (e.g. 'latency>500:bold red', 'status=failed:row:on red'); OP is == != < <= > >= *= ^= $= or a word such as contains or empty. Repeatable; applies to --csv, rich profile's table and rich inspect --table, and has no effect elsewhere. Config: rules.
--rules <FILE>... Read style rules from FILE's [[rules]] tables (column, op, value, style, target), after the rules before it.

Log

Option Description
--level <LEVEL>... With rich log, keep only records at LEVEL (trace, debug, info, warn, error or fatal), or at it and above with a + (warn+); several with commas or by repeating it.
--where <EXPR>... With rich log, keep only records whose fields pass EXPR: FIELD=VALUE, FIELD!=VALUE, FIELD>N (and >=, <, <=), FIELD~REGEX, FIELD!~REGEX, FIELD (it is there) or !FIELD (it is not); numbers, levels and times compare as such, dots reach nested fields; repeatable, and every one must pass.
-f, --follow With rich log, read FILE, then what is appended to it, starting again when it is truncated or replaced (log rotation), until Ctrl+C.
--collapse, --no-collapse With rich log, fold a run of identical records (their times aside) into the first and a × N count; on by default with --follow and --interactive.
--fields With rich log, list each record's fields under it, one a line, instead of on its line.
--parser <NAME> With rich log, how lines that are not JSON are read: auto tries each format; logfmt, level (LEVEL message), timestamp (a line that starts with a time) and access (nginx and Apache) read one; text reads none. A line no parser reads joins the record before it, or is shown as text. Default: auto. Possible values: auto, logfmt, level, timestamp, access, text.
--time <MODE> With rich log, show each time as written (absolute), since the first record shown (relative), or not at all (none) Default: absolute. Possible values: absolute, relative, none.
--output <FORMAT> With rich log, write the records kept as text, or as one JSON object a line (jsonl) for another program. Default: text. Possible values: text, jsonl.
--summary, --no-summary With rich log, end with a summary: records shown, counts by level and, with --group, the groups with errors; on by default with --group (on standard error with --output jsonl)
-i, --interactive With rich log on a terminal, show the records in a live view that follows the end: / filters, Space pauses, Enter shows a record's fields, q quits; without a terminal the records stream as usual.

Image

Option Description
--image-mode <M> With --diff/--image, how to draw the picture: sixel draws real pixels; blocks, quadrants, braille and ascii draw characters (--image rejects none: there would be nothing to draw) Default: auto. Possible values: auto, sixel, blocks, quadrants, braille, ascii, none.
--height <N> With --image, render this many rows instead of the backend's default. Config: height.
--image-fit <M> With --image and --height: contain letterboxes, cover crops at --image-anchor, stretch fills ignoring aspect. native needs no --height: it renders the image at its own pixel size (never enlarged), capped by --width, the terminal and --image-max-width/--image-max-height. Config: image_fit. Possible values: contain, cover, stretch, native.
--image-anchor <A> Cover crop anchor. Default: center. Config: image_anchor. Possible values: center, top, bottom, left, right, top-left, top-right, bottom-left, bottom-right.
--image-max-width <N> With --image, never exceed N columns (aspect kept) Config: image_max_width.
--image-max-height <N> With --image, never exceed N rows (aspect kept) Config: image_max_height.
--image-background <BG> With --image: flatten transparency onto #RRGGBB (also colours contain padding; quote the # in your shell), leave it to the terminal's background (default), or show it on a gray checkerboard (checkerboard) Config: image_background.
--image-color <M> Colour depth for --image (not Braille, which is monochrome) and --gif frames. Default: truecolor. Config: image_color. Possible values: truecolor, ansi256, ansi16, grayscale.
--image-dither <M> Dithering (needs a non-truecolor --image-color) Default: none. Config: image_dither. Possible values: none, floyd-steinberg, bayer4x4, atkinson.
--image-color-distance <M> How the nearest palette colour is measured: encoded RGB, or perceptual OKLab (needs a non-truecolor --image-color) Default: rgb. Config: image_color_distance. Possible values: rgb, oklab.
--image-brightness <F> Tone adjustment (1.0 = unchanged). Brightness, contrast and gamma apply in that order, after rotation/flips and before grayscale and colour. Default: 1.0. Config: image_brightness.
--image-contrast <F> Tone adjustment (1.0 = unchanged) Default: 1.0. Config: image_contrast.
--image-gamma <F> Tone adjustment (1.0 = unchanged) Default: 1.0. Config: image_gamma.
--image-rotate <N> Rotate still images clockwise. Default: 0. Config: image_rotate. Possible values: 0, 90, 180, 270.
--image-flip-horizontal, --no-image-flip-horizontal Flip still images horizontally, after rotation. Config: image_flip_horizontal.
--image-flip-vertical, --no-image-flip-vertical Flip still images vertically, after rotation. Config: image_flip_vertical.
--image-grayscale, --no-image-grayscale Composite and convert still images to grayscale. Config: image_grayscale.
--threshold <PCT> With --diff, exit non-zero above PCT% changed (pixels for images, lines for text). Also sets the exit code: 0 within, 5 over. With rich deps --baseline, what counts as a regression: a percentage (default 10%) and a floor the change must also pass, a time (0.5s, the default for --timings) or a size (64KiB, the default for --sizes); give it twice for both.

Inspect

Option Description
--select <EXPR> Show only what a JSONPath expression selects, e.g. $.servers[*].name.
--filter <PATTERN> Keep only what matches: with --inspect, the values a JSONPath selects and the containers above them; for text, --print and --syntax, the lines a regular expression matches.
--highlight <PATTERN> Highlight what matches, in reverse video: with --inspect, the tree lines a JSONPath selects; for text, --print and --syntax, the matches of a regular expression.
--transform <NAME>... Apply a registered text transform, such as one a --plugin adds, to text, --print and --syntax; repeatable, applied in the order given, after --filter and before --highlight. rich plugins list shows the names.
--find <TEXT> Search keys and values (case-insensitive), highlighting matches.
--flatten Show path = value rows instead of a tree.
--table Show records, or a path/value table, instead of a tree.
--max-depth <N> Fold containers deeper than N levels.
--max-length <N> Show at most N items per container.
--show-paths Append each value's path.
--redact Mask secret-looking keys such as password, token and api_key. With rich capture, mask secrets in the output before it is shown, exported or recorded: secret-named key=value values, bearer tokens, GitHub/GitLab/Slack/Stripe/npm/sk- tokens, AWS key ids, JWTs and URL passwords; with rich log, the same in each record's fields and lines. Capture redaction is experimental and best effort: check the output before sharing it.
--compare <PATH> Show added, removed and changed values against another document.

Diff & ANSI

Option Description
--side-by-side With a text --diff, show old and new in two columns.
--conflicts With --diff, show the merge conflicts left in one FILE: numbered, ours, base and theirs side by side when the width allows, with context; exits 0 either way and 4 when the markers do not parse.
--context <N> With a text --diff, unchanged lines around each change. Default: 3.
--language <NAME> With a text --diff, highlight as this language instead of guessing from the file name.
--ansi-inline With --ansi-explain, mark escapes inline in the text instead of a table.
--escapes-only With --ansi-explain, list only escape sequences, not text runs.

Viewers

Option Description
--search <TEXT> With rich view, highlight every case-insensitive match and mark its line; with rich hex, highlight a byte string: hex such as de ad or 0xDEAD, or quoted text such as '"PNG"'.
--no-line-numbers With rich view, leave out the line-number gutter.
--offset <N> With rich hex, start N bytes in (decimal or 0x hex)
--length <N> With rich hex, show at most N bytes.
--bytes-per-line <N> With rich hex, bytes on each line (default: fit the width, up to 16)
--group <N\|BY> With rich hex, bytes per group (default 8); with rich log, group records by trace, span or correlation id (trace_id, span_id, correlation_id, request_id, ...) under a header each, with a summary at the end.
--limit <N> With rich unicode, show at most N graphemes.
--show-secrets With rich env, show values whose names look secret instead of masking them.
--cast <FILE> With rich capture, also write an asciicast v2 recording (asciinema play FILE)
--redact-pattern <REGEX>... With rich capture and rich log, also mask matches of REGEX (only its secret group when it has one); repeatable. Experimental: check the output before sharing it.
--redact-preview With rich capture or rich log and --redact or --redact-pattern, show each match on its line, highlighted, with its rule and replacement, and a summary, instead of the output; write nothing (no cast, export or log output) and name on stderr what would have been written. The preview shows the secrets unmasked. With --report json, the findings as one JSON document on stdout.

Export

Option Description
-o, --export-html <PATH> Also write a self-contained HTML document to PATH. Config: export_html.
--export-svg <PATH> Also write an SVG document to PATH. Unlike the HTML, it references its font from a CDN, so it is not self-contained offline. Config: export_svg.
--export-png <PATH> Also write a PNG image of the output to PATH: the terminal's width, rich's SVG export theme, in a window titled like the SVG's, drawn with an embedded DejaVu Sans Mono so it is the same on every machine (the png feature; not with --batch)

Paging

Option Description
--pager Page terminal output via MANPAGER, PAGER, then less/more.com. Config: pager.
--no-pager Disable explicit and automatic paging.
--auto-pager Page only terminal output taller than the viewport. Config: auto_pager.
--no-auto-pager Disable automatic paging.

Watch

Option Description
--watch, --no-watch Re-render changing files (several allowed) or one URL while stdout is a terminal; each file gets its own live region. Config: watch.
--watch-interval, --interval <SEC> Poll interval in seconds. Default: 1. Config: watch_interval.
--watch-debounce <SEC> Quiet period collapsing a burst of file events. Default: 0.1. Config: watch_debounce.
--watch-poll, --no-watch-poll Poll local files at --watch-interval instead of file events. Config: watch_poll.
--watch-exit-on-error, --no-watch-exit-on-error End the watch with a non-zero exit when a render fails. Config: watch_exit_on_error.
--watch-cache, --no-watch-cache With URLs, render only when the response body changes. Config: watch_cache.

Batch

Option Description
--batch, --no-batch Convert explicit files, directories, or globs deterministically. Config: batch.
--batch-input-root <PATH> The directory --batch-preserve-dirs keeps paths relative to. Config: batch_input_root.
--batch-preserve-dirs, --no-batch-preserve-dirs Preserve paths under --batch-input-root PATH. Config: batch_preserve_dirs.
--batch-name-template <TEMPLATE> Name export leaves; export paths become directories. Config: batch_name_template.
--jobs <N> Parallel file-export workers; requires --batch. Terminal output stays in input order; active jobs finish on error. Default: 1. Config: jobs.
--progress, --no-progress Enable/disable batch counts on terminal stderr; hidden for redirected stderr, JSON reports and dry runs. Default: true. Config: progress.
--dry-run Validate and show the batch plan without writing files.
--continue-on-error, --no-continue-on-error Process all planned inputs and aggregate failures. Config: continue_on_error.
--overwrite, --no-overwrite Allow existing batch export destinations. Config: overwrite.
--collision <P> Batch policy for existing destinations. Default: error. Config: collision. Possible values: error, overwrite, suffix.

Config & theme

Option Description
--config <PATH> Read versioned TOML defaults from PATH.
--profile <NAME> Select a config profile. Default: default.
--no-config Disable config discovery.
--theme <NAME> Select a named theme from config; --theme also finds installed themes. Config: theme.
--theme-style <NAME=STYLE>... Override a theme binding; repeatable and worker-safe.
--theme-file <PATH> Load styles from an upstream rich theme file ([styles] section); --theme and --theme-style override it. Config: theme_file.
--plugin <PATH>... Load a runtime plugin: a WASM module (.wasm, sandboxed; the default wasm-plugins feature) or a native library (.so, .dylib, .dll, which runs its own code; a build with the dylib-plugins feature); repeatable. rich plugins list shows what is loaded. Config: plugins.
--micro-project, --no-micro-project Load micro assets from the project's .rich/micro/ (off by default: a project's assets load only when you trust it; ./rich.toml cannot turn this on) Config: micro_project.

Output & reports

Option Description
--no-color Disable colored output (as does a non-empty NO_COLOR) Environment: NO_COLOR. Config: no_color.
--color Override a config no_color setting (pipes remain plain)
--sanitize, --no-sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there. Config: sanitize.
--report <F> Emit a result/error envelope on stderr. Default: human. Possible values: human, json.
--machine-json Alias for --report json.

Demo

Self-contained examples; ignores config; accepts --no-color.

Option Description
--demo Guided suite tour; pauses 3 seconds between sections on a TTY.
--demo-list List stable tour sections: core, workflows, art.
--demo-section <NAME> With --demo, play one section only. Possible values: core, workflows, art.
--demo-delay <SECONDS> Tour pause (0–60); no pauses when redirected; Ctrl+C stops. Default: 3.

General

Option Description
--help Show this help.
-V, -v, --version Show the rs-rich-cli package version.
--force-terminal Write colour and styles even when output is not a terminal.

Commands

Command Description
print Treat RESOURCE as literal markup TEXT (--print)
markdown, md Render Markdown (--markdown)
rst Render reStructuredText (--rst)
org Render an Org document (--org)
asciidoc, adoc Render AsciiDoc (--asciidoc)
man, roff Render a man page from its roff source (--man)
syntax, code Syntax-highlight source (--syntax)
json Pretty-print JSON (--json)
csv, tsv Render CSV/TSV as a table (--csv)
ipynb, notebook Render a Jupyter notebook (--ipynb)
jsonl, ndjson Stream JSON Lines / NDJSON records (--jsonl)
log, logs Stream log records (--log): JSON Lines, logfmt and common text formats; filter with --level and --where, follow a file with -f, group with --group
gif Animate GIFs and animated WebPs (--gif)
diff Compare two images, two text files, or render one patch (--diff)
image Render a still image (PNG, JPEG, GIF or WebP) as ASCII/Braille/blocks/quadrants/Sixel (--image)
rule Draw a horizontal rule (--rule)
inspect Explore structured data (JSON, YAML, TOML, XML, INI, dotenv) as a tree (--inspect)
ansi, ansi-explain Decode escape sequences: rich ansi explain FILE (--ansi-explain)
view Show any file: Markdown, CSV, notebooks, images and patches rendered, source and data numbered and highlighted, binary as hex; paged, searchable with --search
hex, hexdump Hex dump with offsets, byte groups and an ASCII panel (--search, --offset, --length)
unicode Show graphemes, code points, UTF-8 bytes, widths and invalid sequences
env List environment variables, secrets masked; rich env PATH checks each PATH entry
capture Run rich capture -- COMMAND ARGS… and show or export its output (--cast FILE records it, --redact masks secrets), then exit with the command's status
mermaid, mmd Draw a Mermaid diagram: flowcharts, sequence and ER diagrams as text, every type through mmdc where built in (.mmd and .mermaid files are detected)
dot, graphviz Draw a DOT (Graphviz) graph as text (.dot and .gv files are detected); what the native parser does not support is refused with its line
deps A Cargo dependency tree from cargo metadata, crates resolved at several versions marked; --why CRATE for what pulls a crate in, --graph to draw it; --features, --licenses, --policy FILE, --timings FILE, --sizes and --audit FILE for supply-chain reports, --baseline FILE to compare timings or sizes
schema A JSON Schema, SQL DDL or Arrow schema as a tree: types, required markers, constraints, keys, $refs resolved; with two schemas (of any of these formats), what changed between them and which changes break; --er draws an ER diagram
chart A chart from CSV, JSON or stdin: a sparkline, bars, lines, points, a heatmap, a pie or stacked bars; --x and --y pick the columns, a missing column or a value that is not a number is refused with its row and column
profile A profile of CSV, TSV or JSON Lines: each column's type, nulls, distinct values, statistics and distribution, and a map of where the nulls are; a long input is sampled. --report json writes the profile as JSON to stdout
config Show, validate, explain or document configuration
choose Pick from ITEMs with a fuzzy-filtered list and print the choice; exits 1 when cancelled
filter Type to filter ITEMs and print the choice; without a terminal, print the lines that match --value
input Read one line with editing and history, and print it
confirm Ask a yes-or-no question; exits 0 for yes and 1 for no
pager Page FILE (or standard input), keeping its colours: arrows and Space scroll, / searches, q quits; without a terminal, write it out
write Write several lines and print them: Enter starts a line, Ctrl+D submits, Esc cancels; without a terminal, print standard input
file Browse from DIR (default .) and print the path picked: type to filter, → opens, ← goes up, Ctrl+T shows hidden files; without a terminal, print --selected
color Pick a colour and print it: rich's named colours, the 256 palette (Tab), or hex and rgb typed in, with a live swatch
asset Pick an emoji, a box style or a spinner, with a preview, and print it
explore Explore a JSON, YAML, TOML, XML, INI or .env document: ← → fold, type to search, Ctrl+Y copies the path and Alt+Y the value (OSC 52), Enter prints the path; without a terminal, print the tree
date Pick a date on a month grid, a time of day, or both, and print it as 2026-10-17, 14:30 or 2026-10-17 14:30; without a terminal, read one typed in
approve Review ITEMs (or lines, or JSON Lines, on standard input) one by one or in bulk: a approves, r rejects, s skips (A, R, S ask for a reason), Space marks, Enter submits; prints one JSON line per item with its decision
jump Jump to anything: one fuzzy box over files, Markdown headings (#), code symbols (@), commands (>) and recent places in DIRs, grouped by source with a preview; prints the place picked (path, path:line or the command)
completions Print a shell completion script
docs Print reference documentation generated from this help
bench Compare benchmark runs
micro Micro assets: emoji-sized images and animations written :micro:name: (with --emoji). List, show, preview, add, remove and create them; install packs
banner Draw TEXT as a FIGlet banner: a font, a style or colour gradient, alignment and width fitting. Built with the art feature
shell Shell integration: init prints a script with completions, OSC 133 prompt marks, OSC 7 and a status line after each command; status and link are its helpers
spin Run a command with a spinner and a title until it exits, and exit with its status (like gum spin); without a terminal it just runs the command
console Print the tracing events an intuiTUIve app sends from another terminal (like textual console): run the app with INTUITUIVE_CONSOLE=1
record Run tapes (scripted terminal sessions: type, press and hold keys, wait for screen text, take screenshots) in a real terminal and write PNG, SVG and text screenshots, an asciinema cast, a GIF, an animated PNG (when asked), an MP4 (with FFmpeg) and an HTML page with a player; video has every screen update at the tape's frame rate, and Kitty, Sixel and iTerm2 images; --audio records the program's sound too; --check compares screenshots with committed ones instead
plugins List the plugins this build has — built in, linked, and any --plugin PATH loads — with their source, version, ABI and capabilities
plugin Find, install, update and check plugins and asset packs from the plugin marketplace: a signed index, every file checked by SHA-256; an installed, enabled WASM plugin loads on every run without --plugin, after its file is checked against the lockfile
doctor Read-only build, terminal, config and pager diagnostics; --report json writes diagnostic data to stdout

Environment

  • NO_COLOR: any non-empty value disables colour
  • COLUMNS: console width (default 80 when unavailable)
  • MANPAGER, PAGER: pager command; fallback is less (Unix), more.com (Windows)
  • FORCE_COLOR: not supported; redirected stdout stays plain
  • RICH_GRAPHICS: sixel forces Sixel on; none (or kitty, iterm) rules it out
  • RICH_SIXEL: 0/1 overrides Sixel detection when RICH_GRAPHICS is unset
  • RICH_MICRO: kitty, iterm, sixel, blocks or text: how micro assets are drawn on a terminal (never off one)
  • RICH_CELL_PIXELS: WxH, the cell size in pixels micro assets are fitted to

With no RESOURCE and no mode flag, a capability demo is shown. Layout, style, paging, hyperlinks and export options require a resource or render mode.

Exit codes

  • 0: success
  • 1: cancelled, or answered no (choose, filter, input, confirm, write, file, color, asset, date, plugin install and update)
  • 2: usage/config error
  • 3: input/read/write error
  • 4: parse/render data error
  • 5: threshold/gate failure
  • 130: interrupted with Ctrl+C (choose, filter, input, confirm, pager, write, file, color, asset, date)

rich print

Treat RESOURCE as literal markup TEXT (--print)

Usage

rich print [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich markdown

Render Markdown (--markdown)

Usage

rich markdown [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich rst

Render reStructuredText (--rst)

Usage

rich rst [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich org

Render an Org document (--org)

Usage

rich org [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich asciidoc

Render AsciiDoc (--asciidoc)

Usage

rich asciidoc [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich man

Render a man page from its roff source (--man)

Usage

rich man [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich syntax

Syntax-highlight source (--syntax)

Usage

rich syntax [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich json

Pretty-print JSON (--json)

Usage

rich json [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich csv

Render CSV/TSV as a table (--csv)

Usage

rich csv [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich ipynb

Render a Jupyter notebook (--ipynb)

Usage

rich ipynb [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich jsonl

Stream JSON Lines / NDJSON records (--jsonl)

Usage

rich jsonl [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich log

Stream log records (--log): JSON Lines, logfmt and common text formats; filter with --level and --where, follow a file with -f, group with --group

Usage

rich log [OPTIONS] [RESOURCE]

Mode options

Option Description
--log-presentation <MODE> With --log, select log presentation. Default: plain. Possible values: plain, rich.

Log

Option Description
--level <LEVEL>... With rich log, keep only records at LEVEL (trace, debug, info, warn, error or fatal), or at it and above with a + (warn+); several with commas or by repeating it.
--where <EXPR>... With rich log, keep only records whose fields pass EXPR: FIELD=VALUE, FIELD!=VALUE, FIELD>N (and >=, <, <=), FIELD~REGEX, FIELD!~REGEX, FIELD (it is there) or !FIELD (it is not); numbers, levels and times compare as such, dots reach nested fields; repeatable, and every one must pass.
-f, --follow With rich log, read FILE, then what is appended to it, starting again when it is truncated or replaced (log rotation), until Ctrl+C.
--collapse, --no-collapse With rich log, fold a run of identical records (their times aside) into the first and a × N count; on by default with --follow and --interactive.
--fields With rich log, list each record's fields under it, one a line, instead of on its line.
--parser <NAME> With rich log, how lines that are not JSON are read: auto tries each format; logfmt, level (LEVEL message), timestamp (a line that starts with a time) and access (nginx and Apache) read one; text reads none. A line no parser reads joins the record before it, or is shown as text. Default: auto. Possible values: auto, logfmt, level, timestamp, access, text.
--time <MODE> With rich log, show each time as written (absolute), since the first record shown (relative), or not at all (none) Default: absolute. Possible values: absolute, relative, none.
--output <FORMAT> With rich log, write the records kept as text, or as one JSON object a line (jsonl) for another program. Default: text. Possible values: text, jsonl.
--summary, --no-summary With rich log, end with a summary: records shown, counts by level and, with --group, the groups with errors; on by default with --group (on standard error with --output jsonl)
-i, --interactive With rich log on a terminal, show the records in a live view that follows the end: / filters, Space pauses, Enter shows a record's fields, q quits; without a terminal the records stream as usual.

Viewers

Option Description
--group <N\|BY> With rich hex, bytes per group (default 8); with rich log, group records by trace, span or correlation id (trace_id, span_id, correlation_id, request_id, ...) under a header each, with a summary at the end.
--redact-pattern <REGEX>... With rich capture and rich log, also mask matches of REGEX (only its secret group when it has one); repeatable. Experimental: check the output before sharing it.
--redact-preview With rich capture or rich log and --redact or --redact-pattern, show each match on its line, highlighted, with its rule and replacement, and a summary, instead of the output; write nothing (no cast, export or log output) and name on stderr what would have been written. The preview shows the secrets unmasked. With --report json, the findings as one JSON document on stdout.

Inspect

Option Description
--redact Mask secret-looking keys such as password, token and api_key. With rich capture, mask secrets in the output before it is shown, exported or recorded: secret-named key=value values, bearer tokens, GitHub/GitLab/Slack/Stripe/npm/sk- tokens, AWS key ids, JWTs and URL passwords; with rich log, the same in each record's fields and lines. Capture redaction is experimental and best effort: check the output before sharing it.

Output & reports

Option Description
--sanitize, --no-sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich gif

Animate GIFs and animated WebPs (--gif)

Usage

rich gif [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich diff

Compare two images, two text files, or render one patch (--diff)

Usage

rich diff [OPTIONS] [RESOURCE]

Diff & ANSI

Option Description
--side-by-side With a text --diff, show old and new in two columns.
--conflicts With --diff, show the merge conflicts left in one FILE: numbered, ours, base and theirs side by side when the width allows, with context; exits 0 either way and 4 when the markers do not parse.
--context <N> With a text --diff, unchanged lines around each change. Default: 3.
--language <NAME> With a text --diff, highlight as this language instead of guessing from the file name.

Image

Option Description
--threshold <PCT> With --diff, exit non-zero above PCT% changed (pixels for images, lines for text). Also sets the exit code: 0 within, 5 over. With rich deps --baseline, what counts as a regression: a percentage (default 10%) and a floor the change must also pass, a time (0.5s, the default for --timings) or a size (64KiB, the default for --sizes); give it twice for both.

Output & reports

Option Description
--sanitize, --no-sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there.

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich image

Render a still image (PNG, JPEG, GIF or WebP) as ASCII/Braille/blocks/quadrants/Sixel (--image)

Usage

rich image [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich rule

Draw a horizontal rule (--rule)

Usage

rich rule [OPTIONS] [RESOURCE]

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich inspect

Explore structured data (JSON, YAML, TOML, XML, INI, dotenv) as a tree (--inspect)

Usage

rich inspect [OPTIONS] [RESOURCE]

Input

Option Description
--format <F> Input format. With --inspect, the parser (default auto-detect); otherwise auto detects piped or extensionless input and routes it (JSON to --json, other formats to highlighting, likely Markdown, reStructuredText, Org, AsciiDoc and man pages to their renderers, anything else to plain text), and a named format overrides the extension. A document format (markdown, rst, org, asciidoc, man) is the same as its mode flag. Default: auto. Possible values: auto, json, yaml, toml, xml, ini, env, markdown, rst, org, asciidoc, man.

Inspect

Option Description
--select <EXPR> Show only what a JSONPath expression selects, e.g. $.servers[*].name.
--filter <PATTERN> Keep only what matches: with --inspect, the values a JSONPath selects and the containers above them; for text, --print and --syntax, the lines a regular expression matches.
--highlight <PATTERN> Highlight what matches, in reverse video: with --inspect, the tree lines a JSONPath selects; for text, --print and --syntax, the matches of a regular expression.
--transform <NAME>... Apply a registered text transform, such as one a --plugin adds, to text, --print and --syntax; repeatable, applied in the order given, after --filter and before --highlight. rich plugins list shows the names.
--find <TEXT> Search keys and values (case-insensitive), highlighting matches.
--flatten Show path = value rows instead of a tree.
--table Show records, or a path/value table, instead of a tree.
--max-depth <N> Fold containers deeper than N levels.
--max-length <N> Show at most N items per container.
--show-paths Append each value's path.
--redact Mask secret-looking keys such as password, token and api_key. With rich capture, mask secrets in the output before it is shown, exported or recorded: secret-named key=value values, bearer tokens, GitHub/GitLab/Slack/Stripe/npm/sk- tokens, AWS key ids, JWTs and URL passwords; with rich log, the same in each record's fields and lines. Capture redaction is experimental and best effort: check the output before sharing it.
--compare <PATH> Show added, removed and changed values against another document.

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich ansi

Decode escape sequences: rich ansi explain FILE (--ansi-explain)

Usage

rich ansi [OPTIONS] [RESOURCE]

Diff & ANSI

Option Description
--ansi-inline With --ansi-explain, mark escapes inline in the text instead of a table.
--escapes-only With --ansi-explain, list only escape sequences, not text runs.

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich view

Show any file: Markdown, CSV, notebooks, images and patches rendered, source and data numbered and highlighted, binary as hex; paged, searchable with --search

Usage

rich view [OPTIONS] [RESOURCE]

Viewers

Option Description
--search <TEXT> With rich view, highlight every case-insensitive match and mark its line; with rich hex, highlight a byte string: hex such as de ad or 0xDEAD, or quoted text such as '"PNG"'.
--no-line-numbers With rich view, leave out the line-number gutter.

Output & reports

Option Description
--sanitize, --no-sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there.

Paging

Option Description
--pager Page terminal output via MANPAGER, PAGER, then less/more.com.

Mode options

Option Description
--highlighter <NAME> The code highlighter for source, Markdown code, view and diff: syntect (the default), or lumis in a build with the lumis feature.
--code-theme <NAME> A theme of the chosen code highlighter, e.g. ansi_dark (rich doctor --report json lists them)

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich hex

Hex dump with offsets, byte groups and an ASCII panel (--search, --offset, --length)

Usage

rich hex [OPTIONS] [RESOURCE]

Viewers

Option Description
--search <TEXT> With rich view, highlight every case-insensitive match and mark its line; with rich hex, highlight a byte string: hex such as de ad or 0xDEAD, or quoted text such as '"PNG"'.
--offset <N> With rich hex, start N bytes in (decimal or 0x hex)
--length <N> With rich hex, show at most N bytes.
--bytes-per-line <N> With rich hex, bytes on each line (default: fit the width, up to 16)
--group <N\|BY> With rich hex, bytes per group (default 8); with rich log, group records by trace, span or correlation id (trace_id, span_id, correlation_id, request_id, ...) under a header each, with a summary at the end.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich unicode

Show graphemes, code points, UTF-8 bytes, widths and invalid sequences

Usage

rich unicode [OPTIONS] [RESOURCE]

Viewers

Option Description
--limit <N> With rich unicode, show at most N graphemes.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich env

List environment variables, secrets masked; rich env PATH checks each PATH entry

Usage

rich env [OPTIONS] [RESOURCE]

Viewers

Option Description
--show-secrets With rich env, show values whose names look secret instead of masking them.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich capture

Run rich capture -- COMMAND ARGS… and show or export its output (--cast FILE records it, --redact masks secrets), then exit with the command's status

Usage

rich capture [OPTIONS] [RESOURCE]

Viewers

Option Description
--cast <FILE> With rich capture, also write an asciicast v2 recording (asciinema play FILE)
--redact-pattern <REGEX>... With rich capture and rich log, also mask matches of REGEX (only its secret group when it has one); repeatable. Experimental: check the output before sharing it.
--redact-preview With rich capture or rich log and --redact or --redact-pattern, show each match on its line, highlighted, with its rule and replacement, and a summary, instead of the output; write nothing (no cast, export or log output) and name on stderr what would have been written. The preview shows the secrets unmasked. With --report json, the findings as one JSON document on stdout.

Inspect

Option Description
--redact Mask secret-looking keys such as password, token and api_key. With rich capture, mask secrets in the output before it is shown, exported or recorded: secret-named key=value values, bearer tokens, GitHub/GitLab/Slack/Stripe/npm/sk- tokens, AWS key ids, JWTs and URL passwords; with rich log, the same in each record's fields and lines. Capture redaction is experimental and best effort: check the output before sharing it.

Output & reports

Option Description
--sanitize, --no-sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich mermaid

Draw a Mermaid diagram: flowcharts, sequence and ER diagrams as text, every type through mmdc where built in (.mmd and .mermaid files are detected)

Usage

rich mermaid [OPTIONS] [RESOURCE]

Mode options

Option Description
--mermaid-backend <BACKEND> How Mermaid diagrams (rich mermaid, ``mermaid fences in Markdown) are drawn: text draws flowcharts, sequence and ER diagrams as text, mmdc uses Mermaid's own CLI (a build with the mmdc feature;rich mermaidtries it first there), off leaves fences as code. Possible values:text,mmdc,off`.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich dot

Draw a DOT (Graphviz) graph as text (.dot and .gv files are detected); what the native parser does not support is refused with its line

Usage

rich dot [OPTIONS] [RESOURCE]

Mode options

Option Description
--dot-backend <BACKEND> How DOT graphs (rich dot, ``dot fences in Markdown) are drawn: text draws them natively, graphviz also makes --export-svg write Graphviz's own SVG (thedotprogram, installed separately), off leaves fences as code. Possible values:text,graphviz,off`.

Export

Option Description
--export-svg <PATH> Also write an SVG document to PATH. Unlike the HTML, it references its font from a CDN, so it is not self-contained offline.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[RESOURCE] A file path, an http(s) URL, or - for stdin; every rich option applies.

rich deps

A Cargo dependency tree from cargo metadata, crates resolved at several versions marked; --why CRATE for what pulls a crate in, --graph to draw it; --features, --licenses, --policy FILE, --timings FILE, --sizes and --audit FILE for supply-chain reports, --baseline FILE to compare timings or sizes

Usage

rich deps [OPTIONS] [MANIFEST]

Diagram sources

Option Description
--metadata <FILE> With rich deps, read cargo metadata --format-version 1 JSON from FILE (- for stdin) instead of running cargo.
--why <CRATE> With rich deps, show what pulls CRATE (name or name@version) in: every path from the workspace to it.
--graph With rich deps, draw the dependencies (or --why's paths) as a diagram instead of a tree.
--depth <N> With rich deps, show at most N levels below each workspace member; with rich profile, profile JSON paths at most N steps deep (default 4), an object or array at the last step counting as its JSON text.
--duplicates With rich deps, keep only the branches that lead to a crate resolved at more than one version, and add a consolidation summary: who pulls each version, and which version most of them already use.
--no-dev With rich deps, leave dev-dependencies out.
--features With rich deps, show the features Cargo resolved for each crate: what each turns on, and which dependents asked for them; every crate with a feature, or only --package's.
--package <CRATE> With rich deps --features, show only CRATE, as name or name@version.
--timings <FILE> With rich deps, show a cargo build --timings report (the HTML file, or timing-info JSON lines; - for stdin): the slowest units as bars and a table; runs nothing.
--audit <FILE> With rich deps, show cargo audit --json output from FILE (- for stdin) grouped by severity; exits 5 when it lists a vulnerability. Runs no scanner.
--licenses With rich deps, group the crates by licence, marking copyleft, unknown and missing licences.
--sizes With rich deps, show artifact sizes per crate as bars and a table: from the target directory given next (default: the one cargo metadata names), matched to packages through cargo metadata, or from a file given next: cargo bloat --crates --message-format json output or a report saved with --save (- for stdin)
--build-profile <NAME> With rich deps --sizes, read this profile's artifacts: debug (dev), release, or a custom profile (default: debug if it was built, else release)
--source-sizes With rich deps --sizes, also add up each package's source files (its manifest directory, without target/, .git/ and nested packages)
--top <N> With rich profile, the most common values shown for a column that is not numeric (default 5); with rich deps --sizes, --timings or --baseline, the units shown (default 20)
--baseline <FILE> With rich deps --timings or --sizes, compare with an older report, unit by unit (a report saved with --save, or the original format: a timings report, cargo-bloat JSON or a target directory); exits 5 when a unit or the total regressed past --threshold.
--threshold <PCT> With --diff, exit non-zero above PCT% changed (pixels for images, lines for text). Also sets the exit code: 0 within, 5 over. With rich deps --baseline, what counts as a regression: a percentage (default 10%) and a floor the change must also pass, a time (0.5s, the default for --timings) or a size (64KiB, the default for --sizes); give it twice for both.
--save <FILE> With rich deps --timings or --sizes, also write the report as JSON to FILE, to keep as a --baseline.
--policy <FILE> With rich deps, check every crate's licence against a policy: a TOML allow and deny list, or cargo-deny's deny.toml; conflicts with the root crate's licence are shown too (a heuristic, not legal advice). Exits 5 on a violation.
--sbom <FILE> With rich deps --licenses or --policy, read the packages from an SPDX (2.2, 2.3) or CycloneDX (1.4 to 1.6) JSON document instead of cargo metadata.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[MANIFEST] A Cargo.toml, or the directory holding one (default: the working directory)

rich schema

A JSON Schema, SQL DDL or Arrow schema as a tree: types, required markers, constraints, keys, $refs resolved; with two schemas (of any of these formats), what changed between them and which changes break; --er draws an ER diagram

Usage

rich schema [OPTIONS] SCHEMA [NEW_SCHEMA]

Diagram sources

Option Description
--er With rich schema, draw the schema as an ER diagram: a box per table with its columns and keys, an edge per foreign key.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[SCHEMA] A JSON Schema, SQL DDL (.sql, .ddl, or text starting with CREATE) or Arrow IPC file (.arrow, .feather, .arrows, .ipc; the arrow feature), an http(s) URL, or - for stdin.
[NEW_SCHEMA] A second version: show what changed from SCHEMA to it.

rich chart

A chart from CSV, JSON or stdin: a sparkline, bars, lines, points, a heatmap, a pie or stacked bars; --x and --y pick the columns, a missing column or a value that is not a number is refused with its row and column

Usage

rich chart [OPTIONS] [FILE]

Chart

Option Description
--kind <KIND> With rich chart, what to draw: spark (a sparkline per series), bar (a bar per row, labelled by --x), line (the default) and scatter (each series against --x, or the row number), heatmap (rows by series, each value a shade), pie (one series as slices, labelled by --x) or stacked (a bar per row, each series a part) Possible values: spark, bar, line, scatter, heatmap, pie, stacked.
--x <COLUMN> With rich chart, the column of x positions (line, scatter) or labels (bar, heatmap, pie, stacked), by header or 1-based number (default: the row number; for labels, the first column that is not all numbers)
--y <COLUMN>... With rich chart, a column to draw, by header or 1-based number; repeatable, one series each (default: every numeric column but --x)

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[FILE] CSV, TSV, JSON, JSON Lines or whitespace-separated numbers, an http(s) URL, or - for stdin (the default)

rich profile

A profile of CSV, TSV or JSON Lines: each column's type, nulls, distinct values, statistics and distribution, and a map of where the nulls are; a long input is sampled. --report json writes the profile as JSON to stdout

Usage

rich profile [OPTIONS] [FILE]

Profile

Option Description
--sample <N> With rich profile, the most rows kept for types, statistics and distributions (default 10000): a longer input is sampled uniformly, the sample size is printed, and nulls still count every row.
--columns <COLUMN[,COLUMN...]>... With rich profile, profile only these columns, by header, in this order; repeatable.
--top <N> With rich profile, the most common values shown for a column that is not numeric (default 5); with rich deps --sizes, --timings or --baseline, the units shown (default 20)
--depth <N> With rich profile of JSON Lines, profile paths at most N steps deep (default 4), a key or [] each; an object or array at the last step counts as its JSON text.
--max-paths <N> With rich profile of JSON Lines, profile at most N paths (default 200), in the order first seen; the rest are noted.
--flat With rich profile of JSON Lines, profile rows of the top-level keys (nested values as JSON text) instead of every nested path.
--style-rule <RULE>... Style the cells, rows or columns of a data table by value: COLUMN OP VALUE:STYLE or COLUMN OP VALUE:row:STYLE (e.g. 'latency>500:bold red', 'status=failed:row:on red'); OP is == != < <= > >= *= ^= $= or a word such as contains or empty. Repeatable; applies to --csv, rich profile's table and rich inspect --table, and has no effect elsewhere.
--rules <FILE>... Read style rules from FILE's [[rules]] tables (column, op, value, style, target), after the rules before it.

Output & reports

Option Description
--report <F> Emit a result/error envelope on stderr. Default: human. Possible values: human, json.

Layout

Option Description
-w, --width <N> Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)

Arguments

Argument Description
[FILE] CSV, TSV or JSON Lines (by extension, else by the first character), an http(s) URL, or - for stdin (the default)

rich config

Show, validate, explain or document configuration.

Each subcommand accepts --config PATH, --profile NAME, --no-config, --theme NAME and the setting flags (--width, --pager, ...) that rich itself accepts, as command-line overrides.

Usage

rich config <COMMAND>

Commands

Command Description
show Show configured settings with CLI overrides as JSON
validate Validate TOML, all profiles and explicit setting values
explain Show which layer sets each setting — defaults, environment, config file, profile, command line — and what it overrides
reference List every configuration source and key

rich config show

Show configured settings with CLI overrides as JSON

Usage
rich config show [OPTIONS]

rich config validate

Validate TOML, all profiles and explicit setting values

Usage
rich config validate [OPTIONS]

rich config explain

Show which layer sets each setting — defaults, environment, config file, profile, command line — and what it overrides

Usage
rich config explain [OPTIONS] [KEY]
Arguments
Argument Description
[KEY] Explain one setting instead of all of them. Possible values: mode, format, width, panel, padding, log_presentation, mermaid_backend, dot_backend, rules, highlighter, code_theme, height, image_fit, image_anchor, image_max_width, image_max_height, image_background, image_color, image_dither, image_color_distance, image_brightness, image_contrast, image_gamma, image_rotate, image_flip_horizontal, image_flip_vertical, image_grayscale, export_html, export_svg, pager, auto_pager, watch, watch_interval, watch_debounce, watch_poll, watch_exit_on_error, watch_cache, batch, batch_input_root, batch_preserve_dirs, batch_name_template, jobs, progress, continue_on_error, overwrite, collision, theme, theme_file, plugins, micro_project, no_color, sanitize.

rich config reference

List every configuration source and key

Usage
rich config reference [OPTIONS]

rich choose

Pick from ITEMs with a fuzzy-filtered list and print the choice; exits 1 when cancelled

Usage

rich choose [OPTIONS] [ITEM...]

Options

Option Description
--header <TEXT> The prompt above the list.
--multi Pick several: Tab marks, Enter returns the marked items, one per line.
--selected <ITEM>... Focus ITEM (with --multi, mark it); the answer without a terminal.
--height <ROWS> Show at most ROWS items at once (default 10), fewer when the terminal is shorter.
--preview <COMMAND> Show COMMAND's output for the focused item beside the list; {} is the item, shell-quoted, and $COLUMNS the pane's width (e.g. rich {} --force-terminal)
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)

Arguments

Argument Description
[ITEM]... The items; without any, one per line from standard input.

Examples

A branch

branch=$(git branch --format='%(refname:short)' | rich choose)

Preview each file as rich renders it

rich choose --preview 'rich {} --force-terminal' *.md

rich filter

Type to filter ITEMs and print the choice; without a terminal, print the lines that match --value

Usage

rich filter [OPTIONS] [ITEM...]

Options

Option Description
--header <TEXT> The prompt above the list.
--multi Pick several: Tab marks, Enter returns the marked items, one per line.
--selected <ITEM>... Focus ITEM (with --multi, mark it); the answer without a terminal.
--height <ROWS> Show at most ROWS items at once (default 10), fewer when the terminal is shorter.
--preview <COMMAND> Show COMMAND's output for the focused item beside the list; {} is the item, shell-quoted, and $COLUMNS the pane's width (e.g. rich {} --force-terminal)
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)
--value <QUERY> Start with QUERY typed.

Arguments

Argument Description
[ITEM]... The items; without any, one per line from standard input.

Examples

Pick a file

ls | rich filter

Fuzzy grep in a pipeline

rich filter --value err < log.txt

rich input

Read one line with editing and history, and print it

Usage

rich input [OPTIONS]

Options

Option Description
--prompt <TEXT> The prompt (default "Input")
--placeholder <TEXT> Shown while the line is empty.
--value <TEXT> Start with TEXT typed.
--default <TEXT> The answer to an empty line, and without a terminal.
--password Hide what is typed; without a terminal, read with echo off.
--required Refuse an empty answer: Enter shows an error under the line and waits.

Examples

A name

name=$(rich input --prompt Name --placeholder 'Ada Lovelace')

An answer that cannot be empty

rich input --prompt Project --required

rich confirm

Ask a yes-or-no question; exits 0 for yes and 1 for no

Usage

rich confirm [OPTIONS] [QUESTION]

Options

Option Description
--default <ANSWER> The focused answer, and the answer without a terminal. Possible values: yes, no.
--affirmative <LABEL> The yes label (default Yes)
--negative <LABEL> The no label (default No)
--mouse Report the mouse: the answers are buttons to click.

Arguments

Argument Description
[QUESTION] The question (default "Are you sure?")

Examples

Guard a command

rich confirm 'Deploy to production?' && ./deploy

rich pager

Page FILE (or standard input), keeping its colours: arrows and Space scroll, / searches, q quits; without a terminal, write it out

Usage

rich pager [OPTIONS] [FILE]

Options

Option Description
--search <QUERY> Start with QUERY searched.
--sticky <LINES> Keep the first LINES lines on top while the rest scroll; table (the default) keeps a table's header there when the content starts with one, 0 nothing.

Arguments

Argument Description
[FILE] The file; - or none reads standard input.

Examples

Page coloured output

git log --color | rich pager

Page a table with its header on top

PAGER='rich pager' rich data.csv --pager

rich write

Write several lines and print them: Enter starts a line, Ctrl+D submits, Esc cancels; without a terminal, print standard input

Usage

rich write [OPTIONS]

Options

Option Description
--header <TEXT> The prompt above the text (default "Write")
--placeholder <TEXT> Shown while the text is empty.
--value <TEXT> Start with TEXT (standard input, when it is piped, otherwise)
--height <ROWS> Rows of text shown (default 5), fewer when the terminal is shorter.
--char-limit <N> At most N characters (grapheme clusters: an emoji sequence or an accented letter is one), line breaks included.
--show-line-numbers Number the lines.

Examples

A multi-line answer

message=$(rich write --header 'Commit message')

rich file

Browse from DIR (default .) and print the path picked: type to filter, → opens, ← goes up, Ctrl+T shows hidden files; without a terminal, print --selected

Usage

rich file [OPTIONS] [DIR]

Options

Option Description
--header <TEXT> The prompt above the list.
--height <ROWS> Show at most ROWS at once (default 10), fewer when the terminal is shorter.
--value <QUERY> Start with QUERY typed.
--selected <PATH> The answer without a terminal.
--all Show hidden files to begin with.
--directory Pick directories (files are not listed, unless --file is given too: then either)
--file Pick files (the default)
--extension <EXT>... List only files ending in .EXT (repeatable, or comma-separated)
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)

Arguments

Argument Description
[DIR] Where to start (default the current directory)

Examples

Open a file picked from src

$EDITOR "$(rich file src)"

Pick a directory

rich file --directory ~

rich color

Pick a colour and print it: rich's named colours, the 256 palette (Tab), or hex and rgb typed in, with a live swatch

Usage

rich color [OPTIONS]

Options

Option Description
--header <TEXT> The prompt (default "Colour")
--value <TEXT> Start with TEXT typed: a name to filter by, or a colour.
--default <COLOR> The answer without a terminal, and to an empty line.
--format <FORMAT> How to print it: #rrggbb (default), a rich name, or rgb(r,g,b) Possible values: hex, name, rgb.
--height <ROWS> Show at most ROWS at once (default 10), fewer when the terminal is shorter.
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)

Examples

Style text with a picked colour

rich --style "bold $(rich color --format name)" --print Hello

rich asset

Pick an emoji, a box style or a spinner, with a preview, and print it

Usage

rich asset [OPTIONS]

Options

Option Description
--kind <KIND> What to pick (default emoji): an emoji prints as itself, a box style, spinner or micro asset by name. Possible values: emoji, box, spinner, micro.
--header <TEXT> The prompt above the list.
--height <ROWS> Show at most ROWS at once (default 10), fewer when the terminal is shorter.
--value <QUERY> Start with QUERY typed.
--selected <NAME> Focus NAME; the answer without a terminal and to an empty line.
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)
--micro-project With --kind micro, list the project's ./.rich/micro/ assets too (trust it)

Examples

Pick one of rich's box styles by name, for --panel

rich asset --kind box

Pick a micro asset by name, for :micro:NAME: in --print --emoji text

rich asset --kind micro

rich explore

Explore a JSON, YAML, TOML, XML, INI or .env document: ← → fold, type to search, Ctrl+Y copies the path and Alt+Y the value (OSC 52), Enter prints the path; without a terminal, print the tree

Usage

rich explore [OPTIONS] [FILE]

Options

Option Description
--format <FORMAT> The document's format (default auto: from the file name, then the content), as for --inspect. Possible values: auto, json, yaml, toml, xml, ini, env.
--header <TEXT> The prompt above the tree (default the file name)
--height <ROWS> Show at most ROWS at once (default 10), fewer when the terminal is shorter.
--value <QUERY> Start with QUERY searched.
--print <WHAT> What Enter prints: the node's JSONPath (default), or its value (a string as it is, anything else as JSON) Possible values: path, value.
--icons Mark true, false and null values with the status/success, status/error and status/info micro assets (drawn as the terminal can, or their emoji)
--mouse Report the mouse: click a row to focus it and again to pick it, drag the border beside a preview (off by default: it takes text selection from the terminal)

Arguments

Argument Description
[FILE] The document; - or none reads standard input.

Examples

Browse a document

rich explore package.json

Pick a node, then show it

rich --inspect --select "$(rich explore config.yaml)" config.yaml

Pick a value from a command's output

kubectl get pods -o json | rich explore --print value

rich date

Pick a date on a month grid, a time of day, or both, and print it as 2026-10-17, 14:30 or 2026-10-17 14:30; without a terminal, read one typed in

Usage

rich date [OPTIONS]

Options

Option Description
--kind <KIND> What to pick (default date): a day, a time of day, or a day and a time. Possible values: date, time, datetime.
--header <TEXT> The prompt (default "Date", "Time" or "Date and time")
--value <VALUE> Start at VALUE (default today, or now, in UTC)
--default <VALUE> The answer without a terminal and to an empty line; the start too, unless --value is given.
--min <VALUE> The earliest that can be picked: earlier days are dimmed and cannot be reached, and an earlier time is refused with a message.
--max <VALUE> The latest that can be picked.
--seconds Pick and print the seconds too (14:30:05), with --kind time or datetime; without it every value is to the minute, and --min rounds up to one.
--twelve-hour Show a 12-hour clock with AM and PM, with --kind time or datetime (the answer is still printed on a 24-hour one)
--mouse Report the mouse: click a day to select it and again to pick it, click a time field; the wheel turns the month.

Examples

A day from today on

due=$(rich date --header Due --min today)

A meeting slot within a range

rich date --kind datetime --min '2026-10-17 09:00' --max '2026-10-31 17:00'

rich approve

Review ITEMs (or lines, or JSON Lines, on standard input) one by one or in bulk: a approves, r rejects, s skips (A, R, S ask for a reason), Space marks, Enter submits; prints one JSON line per item with its decision

Usage

rich approve [OPTIONS] [ITEM...]

Options

Option Description
--header <TEXT> The prompt above the queue (default "Approve")
--format <FORMAT> How items are read: one per line, or a JSON object per line (default auto: JSON Lines when every line is an object) Possible values: auto, lines, jsonl.
--label <FIELD> The JSON field to show as an item's label (default the first of title, name, label, summary and id)
--require-reason Ask for a reason on every rejection, and refuse an empty one.
--auto-submit Submit as soon as nothing is pending, without Enter.
--print <WHAT> What to print: a JSON line per item with its decision and reason (default), or the approved (or rejected) items as they were read. Possible values: decisions, approved, rejected.
--height <ROWS> Show at most ROWS at once, fewer when the terminal is shorter.
--mouse Report the mouse: click rows and buttons, scroll with the wheel (off by default: it takes text selection from the terminal)

Arguments

Argument Description
[ITEM]... The items; without any, one per line from standard input.

Examples

Delete the branches approved

git branch --format='%(refname:short)' | rich approve --print approved | xargs -r git branch -D

Review JSON requests, with a reason for each rejection

rich approve --require-reason < requests.jsonl > decisions.jsonl

rich jump

Jump to anything: one fuzzy box over files, Markdown headings (#), code symbols (@), commands (>) and recent places in DIRs, grouped by source with a preview; prints the place picked (path, path:line or the command)

Usage

rich jump [OPTIONS] [DIR...]

Options

Option Description
--header <TEXT> The prompt (default "Jump")
--files Search file names.
--headings Search Markdown headings.
--symbols Search code symbols: functions, types, classes and modules, found by their keywords.
--commands <FILE> Search the commands in FILE, one per line (LABEL<TAB>COMMAND or just the command); a pick prints the command.
--recent <FILE> Show FILE's places first, as Recent, and add the pick to it (the latest 50 kept)
--value <QUERY> Start with QUERY typed; without a terminal, print its best match.
--limit <N> Results each source shows until Tab narrows to it (default 5)
--print <WHAT> What to print: the place (default), a JSON object with its source, label and place, or a shell command, safely quoted: cd -- 'DIR', ${EDITOR:-vi} [+LINE] -- 'FILE', or a > command as it is. Possible values: location, json, shell.
--height <ROWS> Show at most ROWS at once, fewer when the terminal is shorter.
--mouse Report the mouse: click rows and buttons, scroll with the wheel (off by default: it takes text selection from the terminal)

Arguments

Argument Description
[DIR]... Where to look (default the current directory); - reads entries from standard input instead.

Examples

Open a file, or a Markdown file at a heading's line (an editor that takes path:line)

$EDITOR "$(rich jump --files --headings)"

Print what to run for the pick: a saved command, cd to a directory, or the editor at a file's line

rich jump --print shell --commands ~/.commands --recent ~/.jump-recent src

rich completions

Print a shell completion script

Usage

rich completions <SHELL>

Arguments

Argument Description
<SHELL> The shell to complete for (pwsh is accepted for powershell) Possible values: bash, zsh, fish, powershell.

Examples

Bash

rich completions bash > ~/.local/share/bash-completion/completions/rich

Zsh

rich completions zsh > "${fpath[1]}/_rich"

Fish

rich completions fish > ~/.config/fish/completions/rich.fish

PowerShell

rich completions powershell | Out-String | Invoke-Expression

rich docs

Print reference documentation generated from this help

Usage

rich docs <COMMAND>

Commands

Command Description
markdown Print the command reference as Markdown
man Print the rich(1) man page, or write every page to a directory
config Print the configuration reference as Markdown

rich docs markdown

Print the command reference as Markdown

Usage
rich docs markdown

rich docs man

Print the rich(1) man page, or write every page to a directory

Usage
rich docs man [OPTIONS]
Options
Option Description
--output <DIR> Write rich.1 and one page per subcommand into DIR (created if missing) and list them.

rich docs config

Print the configuration reference as Markdown

Usage
rich docs config

rich bench

Compare benchmark runs

Usage

rich bench <COMMAND>

Commands

Command Description
compare Compare a candidate benchmark run with a baseline; exits 5 when any benchmark regressed

rich bench compare

Compare a candidate benchmark run with a baseline; exits 5 when any benchmark regressed

Usage
rich bench compare [OPTIONS] <BASELINE> <CANDIDATE>
Options
Option Description
--threshold <PCT> Changes within ±PCT% (beyond noise) count as unchanged. Default: 5.
Arguments
Argument Description
<BASELINE> A rich_ext::qa::bench JSON run, or a criterion directory.
<CANDIDATE> The run to judge, in the same form.
Examples

Gate CI on a 10% slowdown

rich bench compare baseline.json candidate.json --threshold 10

rich micro

Micro assets: emoji-sized images and animations written :micro:name: (with --emoji). List, show, preview, add, remove and create them; install packs

Usage

rich micro [list | show | preview | add | remove | create | install | uninstall | packs] …

Commands

Command Description
list Every asset that resolves, drawn, with its size, kind, layer and alt text
show One asset: its metadata, fallbacks, files and how its name resolved
preview Draw an asset inline, as this terminal shows it, and magnified at the terminal's cell size; a package path or an image file (run through the pipeline) works too
add Copy a package (a folder or .richmicro file) into the user layer
remove Delete an asset's package from the user layer
create Run an image (PNG, APNG, GIF, JPEG or WebP) through the pipeline and write a package the registry accepts
install Install a pack (a folder or zip with pack.json) into the user layer
uninstall Remove an installed pack by name from the user layer
packs The packs in each layer and the assets they hold

Examples

Every asset, drawn as this terminal can

rich micro list

One asset, inline and magnified

rich micro preview status/loading

Micro assets in text

rich -p --emoji "Deploying :micro:status/loading: done :micro:status/success:"

rich micro list

Every asset that resolves, drawn, with its size, kind, layer and alt text

Usage
rich micro list [--layer built-in|user|project] [--micro-project] [--report json]
Options
Option Description
--layer <LAYER> Only this layer's assets. Possible values: built-in, user, project.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.

rich micro show

One asset: its metadata, fallbacks, files and how its name resolved

Usage
rich micro show NAME [--report json]
Options
Option Description
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
Arguments
Argument Description
[NAME] The asset's name, e.g. status/success.

rich micro preview

Draw an asset inline, as this terminal shows it, and magnified at the terminal's cell size; a package path or an image file (run through the pipeline) works too

Usage
rich micro preview NAME|PACKAGE|IMAGE [PIPELINE OPTIONS] [--report json]
Options
Option Description
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
--size <COLSxROWS> Cells the asset takes: 2x1 (default, an emoji's footprint), 1 to 4 columns, and 1 or 2 rows: 2x2 for an icon, 3x2 for a mini animation (at most 4x2)
--fit <FIT> contain (default) keeps the whole image; cover fills and crops. Possible values: contain, cover, stretch.
--anchor <ANCHOR> What cover keeps: center (default), top, bottom, left, right, ….
--brightness <F> Multiply brightness (1 = as is)
--contrast <F> Scale contrast (1 = as is)
--gamma <F> Gamma (above 1 brightens mid-tones)
--grayscale Gray levels only.
--sharpen <RADIUS> Unsharp mask of RADIUS pixels after fitting (e.g. 0.8)
--transparency <MODE> threshold[:ALPHA] (default threshold:128), keep, flatten:#rrggbb, or key:#rrggbb to make a background colour transparent.
--colors <PALETTE> Reduce to a palette (default truecolor) Possible values: truecolor, 256, 16, grayscale.
--dither <DITHER> Dithering for --colors (default none) Possible values: none, floyd-steinberg, bayer, atkinson.
--cell <WxH> Pixels per cell to make images for (default 8x16; preview: the terminal's)
Arguments
Argument Description
[TARGET] An asset name, a package, or an image.

rich micro add

Copy a package (a folder or .richmicro file) into the user layer

Usage
rich micro add PACKAGE [--project] [--report json]
Options
Option Description
--project Use the project's ./.rich/micro/ instead of the user layer.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
Arguments
Argument Description
[PACKAGE] The package to add.

rich micro remove

Delete an asset's package from the user layer

Usage
rich micro remove NAME [--project] [--report json]
Options
Option Description
--project Use the project's ./.rich/micro/ instead of the user layer.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
Arguments
Argument Description
[NAME] The asset to remove.

rich micro create

Run an image (PNG, APNG, GIF, JPEG or WebP) through the pipeline and write a package the registry accepts

Usage
rich micro create IMAGE --name NAME --alt TEXT [--emoji E] [--text T] [OPTIONS]
Options
Option Description
--name <NAME> The asset's name: [a-z0-9_-] with / namespaces.
--alt <TEXT> Alt text (required)
--emoji <EMOJI> The emoji fallback.
--text <TEXT> The text fallback.
--license <SPDX> The asset's licence.
--author <NAME> Its author.
--version <VERSION> Its version.
--output <PATH> Where to write it (default ./NAME with / as ., or the layer with --add)
--archive Write a .richmicro zip, not a folder.
--add Write it into the user (or --project) layer.
--project Use the project's ./.rich/micro/ instead of the user layer.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
--size <COLSxROWS> Cells the asset takes: 2x1 (default, an emoji's footprint), 1 to 4 columns, and 1 or 2 rows: 2x2 for an icon, 3x2 for a mini animation (at most 4x2)
--fit <FIT> contain (default) keeps the whole image; cover fills and crops. Possible values: contain, cover, stretch.
--anchor <ANCHOR> What cover keeps: center (default), top, bottom, left, right, ….
--brightness <F> Multiply brightness (1 = as is)
--contrast <F> Scale contrast (1 = as is)
--gamma <F> Gamma (above 1 brightens mid-tones)
--grayscale Gray levels only.
--sharpen <RADIUS> Unsharp mask of RADIUS pixels after fitting (e.g. 0.8)
--transparency <MODE> threshold[:ALPHA] (default threshold:128), keep, flatten:#rrggbb, or key:#rrggbb to make a background colour transparent.
--colors <PALETTE> Reduce to a palette (default truecolor) Possible values: truecolor, 256, 16, grayscale.
--dither <DITHER> Dithering for --colors (default none) Possible values: none, floyd-steinberg, bayer, atkinson.
--cell <WxH> Pixels per cell to make images for (default 8x16; preview: the terminal's)
Arguments
Argument Description
[IMAGE] The source image or animation.
Examples

Make an asset from an image and add it to your layer

rich micro create logo.png --name team/logo --alt "our logo" --text TL --add

rich micro install

Install a pack (a folder or zip with pack.json) into the user layer

Usage
rich micro install PACK [--project] [--report json]
Options
Option Description
--project Use the project's ./.rich/micro/ instead of the user layer.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
Arguments
Argument Description
[PACK] The pack to install.

rich micro uninstall

Remove an installed pack by name from the user layer

Usage
rich micro uninstall NAME [--project] [--report json]
Options
Option Description
--project Use the project's ./.rich/micro/ instead of the user layer.
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.
Arguments
Argument Description
[NAME] The pack's name.

rich micro packs

The packs in each layer and the assets they hold

Usage
rich micro packs [--micro-project] [--report json]
Options
Option Description
--report <FORMAT> json: write data to stdout (also --json) Possible values: human, json.

rich banner

Draw TEXT as a FIGlet banner: a font, a style or colour gradient, alignment and width fitting. Built with the art feature

Usage

rich banner [OPTIONS] [TEXT]...

Options

Option Description
--font <NAME\|FILE> standard (bundled, the default), a FIGfont .flf file, or the name of one in $FIGLET_FONTDIR, /usr/share/figlet or /usr/local/share/figlet.
--list-fonts List the bundled font and the .flf fonts found in those directories, then exit.
--style <STYLE> A style for every row, such as bold cyan or white on blue.
--gradient <COLORS> Colour the strokes along a gradient: two or more comma-separated colours (#ff0000,blue), or a preset: rainbow, sunset, ocean, forest, fire. Overrides --style's colour.
--direction <D> Which way --gradient runs (default horizontal) Possible values: horizontal, vertical, diagonal.
--align <A> Position the banner within the width (default left) Possible values: left, center, right.
-w, --width <N> Lay the banner out to N columns (default: the terminal's width)
--fit <F> When the banner is wider than the width: wrap it at spaces onto more rows (the default, as figlet does), print TEXT as plain text instead (plain), or let it overflow (none) Possible values: wrap, plain, none.
--effect <E> Animate the banner: glow (the default when animating: a band of blue-green light travels through dark letters), shimmer, typewriter, fade, or still. It plays once (about 2 s), then holds the still final frame; any key skips to it. Not combined with --style or --gradient. Possible values: glow, shimmer, typewriter, fade, still.
--once Play the animation once, then hold still (the default)
--loop Play the animation again and again, until a key is pressed (or Ctrl+C)
--duration <SECS> How long one play of the animation lasts (default 2, up to 60)
--wave Animate, with a wave line under the banner.
--specks Animate, with specks of light (·∘°) rising around the letters and a row above them.
--seed <N> Where the specks start (default 0): the same seed draws the same specks.
--force-terminal Write colour and styles even when stdout is not a terminal (for a pager or a file)

Arguments

Argument Description
[TEXT]... The words to draw, joined with spaces; none (or -) reads stdin. A newline starts a new banner row.

Examples

A banner in the standard font

rich banner Hello

Centred, in rainbow colours

rich banner --gradient rainbow --align center 'Ship it'

An installed figlet font; plain text on a narrow terminal

rich banner --font slant --fit plain Release

Glowing letters over a wave, specks of light rising; still when piped

rich banner --wave --specks Noctiluca

Typed out again and again until a key is pressed

rich banner --effect typewriter --loop 'On air'

rich shell

Shell integration: init prints a script with completions, OSC 133 prompt marks, OSC 7 and a status line after each command; status and link are its helpers

Usage

rich shell init|status|link [OPTIONS]

Commands

Command Description
init Print the integration script for SHELL, to eval from its startup file
status One line for a finished command: a status marker, the command, exit N and how long it took
link Print paths (default: the working directory) as OSC 8 file links, plain where links are off

rich shell init

Print the integration script for SHELL, to eval from its startup file

Usage
rich shell init SHELL [--no-completions] [--no-marks] [--no-status] [--min-duration SECS]
Options
Option Description
--no-completions Leave out the completion script.
--no-marks Leave out the OSC 133 prompt and command marks and the OSC 7 directory.
--no-status Do not print a status line after each command.
--min-duration <SECS> Stay quiet after a success quicker than SECS (default 2)
Arguments
Argument Description
<SHELL> The shell (pwsh is accepted for powershell) Possible values: bash, zsh, fish, powershell.
Examples

In ~/.bashrc (bash 4.4+)

eval "$(rich shell init bash)"

In ~/.zshrc

eval "$(rich shell init zsh)"

In ~/.config/fish/config.fish

rich shell init fish | source

In $PROFILE

rich shell init pwsh | Out-String | Invoke-Expression

rich shell status

One line for a finished command: a status marker, the command, exit N and how long it took

Usage
rich shell status --exit CODE [--duration D] [--command TEXT] [--min-duration SECS] [--symbols unicode|ascii|words]
Options
Option Description
--exit <CODE> The command's exit status (0 = success)
--duration <D> How long it ran: seconds, or with a unit (1500ms, 1.5s, 2m)
--command <TEXT> The command line as typed (default $RICH_SHELL_COMMAND)
--min-duration <SECS> Print nothing for a success quicker than SECS (default 0)
--symbols <SET> Status markers (default unicode, or as RICH_A11Y says) Possible values: unicode, ascii, words.
Examples

✖ error $ cargo test exit 101 4.2s

rich shell status --exit 101 --duration 4.2 --command 'cargo test'

Print paths (default: the working directory) as OSC 8 file links, plain where links are off

Usage
rich shell link [PATH[:LINE[:COL]]]... [--tilde] [--editor TEMPLATE] [--links auto|always|never] [--prompt bash|zsh]
Options
Option Description
--tilde Show paths under $HOME as ~/….
--editor <TEMPLATE> Link through an editor URL instead of file://, e.g. vscode://file{path}:{line}:{column}.
--links <WHEN> auto (links on a terminal, the default), always (as in a prompt's command substitution) or never. Possible values: auto, always, never.
--prompt <SHELL> Mark escape sequences as zero-width for a bash (\001…\002) or zsh (%{…%}) prompt. Possible values: bash, zsh.
Arguments
Argument Description
[PATH]... Paths to link, one per line; relative ones resolve here.
Examples

A bash prompt with a clickable working directory

PS1='$(rich shell link --tilde --links always --prompt bash) \$ '

rich spin

Run a command with a spinner and a title until it exits, and exit with its status (like gum spin); without a terminal it just runs the command

Usage

rich spin [--title TEXT] [--spinner NAME] [--show-output | --show-error] -- COMMAND [ARG]...

Options

Option Description
--title <TEXT> The text beside the spinner (default "Loading...")
--spinner <NAME> One of rich's spinners (default dots; rich asset --kind spinner picks one)
--show-output Print the command's output (stdout and stderr) once it exits; on a terminal it is otherwise held back.
--show-error Print the command's output only when it fails.

Arguments

Argument Description
<COMMAND>... The command and its arguments, after --.

Examples

A spinner until the build ends; its exit status is rich's

rich spin --title "Building" -- cargo build --release

The moon spinner, then the page

rich spin --spinner moon --show-output -- curl -sS https://example.com

rich console

Print the tracing events an intuiTUIve app sends from another terminal (like textual console): run the app with INTUITUIVE_CONSOLE=1

Usage

rich console [--socket PATH] [--trace] [-v] [-x TARGET]...

Options

Option Description
--socket <PATH> The Unix socket to listen on, in a directory only you can use (default console/console.sock in intuiTUIve's state directory)
--trace Show the app's inspector trace too: keys, focus, screens and signal writes.
-v, --verbose Show every event's fields on lines of their own.
-x, --exclude <TARGET>... Leave out events whose target starts with TARGET (repeatable)

Examples

Listen on the default socket; then INTUITUIVE_CONSOLE=1 cargo run --example demo

rich console

The app's trace too, without hyper's events

rich console --trace -x hyper

rich record

Run tapes (scripted terminal sessions: type, press and hold keys, wait for screen text, take screenshots) in a real terminal and write PNG, SVG and text screenshots, an asciinema cast, a GIF, an animated PNG (when asked), an MP4 (with FFmpeg) and an HTML page with a player; video has every screen update at the tape's frame rate, and Kitty, Sixel and iTerm2 images; --audio records the program's sound too; --check compares screenshots with committed ones instead

Usage

rich record [--check] [--output DIR] [--bin-dir DIR] [--format png,svg,cast,gif,apng,mp4,html] [--no-video] [--fps N] [--font FILE] [--window-frame on|off] [--caption TEXT] [--key-overlay on|off] [--audio] TAPE...

Tapes

  • Set Framerate N: video frames a second, 1 to 60 (12); --fps overrides it
  • Set FontSize N: the text size of video frames, in pixels (16)
  • KeyDown KEY, KeyUp KEY: hold a key (Up, Ctrl+F, or one character) down, let it go; it autorepeats meanwhile (Set KeyRepeat DELAY INTERVAL, 200ms 33ms)
  • Hold KEY DURATION: KeyDown, wait, KeyUp
  • Set KittyKeyboard on: report the kitty keyboard protocol, so a program can turn it on and hear releases
  • Output gif png: write only these formats; without an Output line, every format but the APNG
  • Output apng (or --format apng, or all): an animated PNG beside (or instead of) the GIF; it is written only when asked
  • Set Audio on (or --audio): record the program's sound, which it writes to the directory in RICH_RECORD_AUDIO (intuiTUIve's audio outputs do); an MP4 carries it as AAC, the other outputs get a WAV beside them (off)

rich plugins

List the plugins this build has — built in, linked, and any --plugin PATH loads — with their source, version, ABI and capabilities

Usage

rich plugins [list | info NAME] [--plugin PATH]... [--report json] [--config PATH] [--profile NAME] [--no-config] [--no-color]

Commands

Command Description
list A table of every plugin (the default)
info One plugin: its path, ABI, capabilities and description

rich plugins list

A table of every plugin (the default)

Usage
rich plugins list [--plugin PATH]... [--report json]

rich plugins info

One plugin: its path, ABI, capabilities and description

Usage
rich plugins info NAME [--plugin PATH]... [--report json]
Arguments
Argument Description
[NAME] The plugin's id, as list shows it.

rich plugin

Find, install, update and check plugins and asset packs from the plugin marketplace: a signed index, every file checked by SHA-256; an installed, enabled WASM plugin loads on every run without --plugin, after its file is checked against the lockfile

Usage

rich plugin COMMAND [ARGS] [--marketplace LOCATION] [--marketplace-keys FILE] [--plugin-dir DIR] [--report json]

Commands

Command Description
search List the marketplace's packages, or those with every word of QUERY in their id, name, description, keywords, authors or capabilities; the tier shows as ✓ official, approved or community, a maintainers' pick as ★ recommended, and who authored each
info One package: its tier, source, versions, what loads here, for a crate the cargo add line, and its downloads, 👍/👎 and reviews link when the marketplace's stats.json is there (not signed, shown only)
install Show the tier, permissions and capabilities, ask, then download, check (size, SHA-256, the WASM manifest in the sandbox) and install; a crate is refused with its cargo add line
update Move installed packages (or those named) to the newest version this host loads, asking first; a yanked version is replaced
remove Uninstall packages: the lockfile entry, then the file
list What is installed: version, kind, tier, enabled, whether the file still matches the lockfile, and yank reasons last seen; no network
enable Load an installed package again on every run
disable Keep a package installed but do not load it
verify Check every installed file against the lockfile, and every installed version against the current index; yanked versions are reported with their reason; exits 4 when a file or listing does not match
browse The marketplace in a selector, with each package's provenance (tier, source, hash, permissions) beside the list; Enter installs, updates, removes, enables or disables
publish Check a local package (a WASM plugin, a micro pack or a theme), compute its SHA-256 and size, and write its listing JSON for a pull request to the marketplace repository; no network

On the web

The marketplace's own site, https://buchochelliq-labs.github.io/rs-rich-marketplace/, searches and filters the same signed index in a browser; so does the docs site's Marketplace page, https://buchochelliq-labs.github.io/rs-rich-cli/latest/marketplace/. Both only show it: rich plugin install checks the signature.

Environment

  • RICH_MARKETPLACE: the marketplace, as --marketplace
  • RICH_MARKETPLACE_KEYS: a keys-N.json to trust, as --marketplace-keys
  • RICH_PLUGIN_DIR: the install directory, as --plugin-dir; also where every run looks for installed plugins

List the marketplace's packages, or those with every word of QUERY in their id, name, description, keywords, authors or capabilities; the tier shows as ✓ official, approved or community, a maintainers' pick as ★ recommended, and who authored each

Usage
rich plugin search [QUERY] [--kind KIND] [--tier TIER] [--recommended] [--sort id|downloads]
Options
Option Description
--kind <KIND> Only this kind: crate, wasm-plugin, micro-pack or theme.
--tier <TIER> Only this tier: official (rs-rich's own), reviewed (shown as approved) or community.
--recommended Only the maintainers' picks, marked ★ recommended.
--sort <ORDER> id (the default), or downloads: most downloaded first, from the marketplace's unsigned stats.json, with a Downloads column.
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[QUERY] Words to look for, in any case.
Examples

Packages with a rot13 capability, say

rich plugin search rot13

rs-rich's own themes

rich plugin search --kind theme --tier official

rich plugin info

One package: its tier, source, versions, what loads here, for a crate the cargo add line, and its downloads, 👍/👎 and reviews link when the marketplace's stats.json is there (not signed, shown only)

Usage
rich plugin info ID
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID] The package's id, as search shows it.

rich plugin install

Show the tier, permissions and capabilities, ask, then download, check (size, SHA-256, the WASM manifest in the sandbox) and install; a crate is refused with its cargo add line

Usage
rich plugin install ID[@VERSION]... [--yes]
Options
Option Description
-y, --yes Install without asking (for scripts); the summary is still shown.
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID]... Package ids, each optionally @VERSION (the only way to get a pre-release)
Examples

The newest version this host loads

rich plugin install shout

Exactly 0.2.0, without asking

rich plugin install shout@0.2.0 --yes

rich plugin update

Move installed packages (or those named) to the newest version this host loads, asking first; a yanked version is replaced

Usage
rich plugin update [ID...] [--yes]
Options
Option Description
-y, --yes Install without asking (for scripts); the summary is still shown.
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID]... Package ids.

rich plugin remove

Uninstall packages: the lockfile entry, then the file

Usage
rich plugin remove ID...
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID]... Package ids.

rich plugin list

What is installed: version, kind, tier, enabled, whether the file still matches the lockfile, and yank reasons last seen; no network

Usage
rich plugin list
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.

rich plugin enable

Load an installed package again on every run

Usage
rich plugin enable ID...
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID]... Package ids.

rich plugin disable

Keep a package installed but do not load it

Usage
rich plugin disable ID...
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.
Arguments
Argument Description
[ID]... Package ids.

rich plugin verify

Check every installed file against the lockfile, and every installed version against the current index; yanked versions are reported with their reason; exits 4 when a file or listing does not match

Usage
rich plugin verify
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.

rich plugin browse

The marketplace in a selector, with each package's provenance (tier, source, hash, permissions) beside the list; Enter installs, updates, removes, enables or disables

Usage
rich plugin browse
Options
Option Description
--marketplace <LOCATION> The marketplace: an https:// base URL, or a directory or file:// URL laid out as the marketplace repository is (artifacts from its artifacts/HOST/PATH mirror, never the network); else RICH_MARKETPLACE, else the official one.
--marketplace-keys <FILE> Trust this keys-N.json instead of the keys compiled in; else RICH_MARKETPLACE_KEYS.
--plugin-dir <DIR> Install into DIR; else RICH_PLUGIN_DIR, else $XDG_DATA_HOME/rich/plugins (~/.local/share/rich/plugins)
--report <FORMAT> json: the result or error envelope on stderr, nothing on stdout.

rich plugin publish

Check a local package (a WASM plugin, a micro pack or a theme), compute its SHA-256 and size, and write its listing JSON for a pull request to the marketplace repository; no network

Usage
rich plugin publish FILE --url URL [--listing FILE | --license SPDX --repository URL [--description TEXT]] [--source-revision COMMIT] [--output FILE]
Options
Option Description
--url <URL> Where the file will be downloaded from (https://, ending in its extension)
--listing <FILE> An existing listing to add this version to (it is rewritten unless --output is given)
--output <FILE> Where to write the listing (default packages/ID.json)
--source-revision <COMMIT> The full Git commit the artifact was built from (required for a WASM plugin)
--id <ID> A theme's id (default: the file name); for a plugin or pack, checked against its manifest.
--version <VERSION> A theme's version; for a plugin or pack, checked against its manifest.
--name <TEXT> The human-readable name (default: the id)
--description <TEXT> One line on what it adds (default: a WASM plugin's or micro pack's own)
--tier <TIER> community (the default), reviewed or official; raising it needs a maintainer.
--license <SPDX> The SPDX license expression (default: a micro pack's pack.json license)
--repository <URL> The source repository, https://.
--homepage <URL> A homepage, https://.
--author <NAME> An author; repeatable.
--keyword <WORD> A search keyword; repeatable, at most 8.
--published <DATE> The listing date, YYYY-MM-DD (default: today, UTC)
Arguments
Argument Description
[FILE] The .wasm, .zip/.richmicro or .ini/.theme file.
Examples

A new listing, packages/shout.json

rich plugin publish shout.wasm --url https://github.com/me/shout/releases/download/v0.2.0/shout.wasm --source-revision $(git rev-parse HEAD) --license MIT --repository https://github.com/me/shout

Add a version to an existing listing

rich plugin publish shout.wasm --url URL --source-revision COMMIT --listing packages/shout.json

rich doctor

Read-only build, terminal, config and pager diagnostics; --report json writes diagnostic data to stdout

Usage

rich doctor [--report json] [--config PATH] [--profile NAME] [--no-config] [--no-color]

rich configuration

Settings are TOML: version = 1, a [defaults] table, optional [profile.NAME] tables and [themes.NAME] style tables. rich config explain shows where each effective value comes from.

Sources

Settings are read from these sources, lowest precedence first; a later source overrides an earlier one:

  1. defaults — Built-in defaults
  2. environment (NO_COLOR) — A non-empty value sets no_color = true. A no_color = false in ./rich.toml cannot undo it; ~/.config/rich/config.toml, --config PATH and --color can
  3. config file (./rich.toml, else ~/.config/rich/config.toml) — The [defaults] table. Only the first file found is read; --config PATH reads that file instead and --no-config reads none
  4. profile ([profile.NAME]) — The profile selected with --profile (default: default) overrides the [defaults] table
  5. command line — Explicit flags override every other source

Keys

Key Type Default Environment Flag Description
mode enum: print, markdown, rst, org, asciidoc, man, json, syntax, csv, ipynb, jsonl, log, rule, image, gif, diff, inspect, ansi auto --print, --markdown, ... or a command word Render mode, as the flag or command of the same name
format enum: auto, json, yaml, toml, xml, ini, env, markdown, rst, org, asciidoc, man auto --format Input format. With --inspect, the parser (default auto-detect); otherwise auto detects piped or extensionless input and routes it (JSON to --json, other formats to highlighting, likely Markdown, reStructuredText, Org, AsciiDoc and man pages to their renderers, anything else to plain text), and a named format overrides the extension. A document format (markdown, rst, org, asciidoc, man) is the same as its mode flag
width positive integer --width Render the output N columns wide (the console keeps its own width, so --left/--center/--right still use it)
panel enum: ascii, ascii2, square, rounded, heavy, double, ascii_double_head, square_double_head, minimal, minimal_heavy_head, minimal_double_head, simple, simple_head, simple_heavy, horizontals, heavy_edge, heavy_head, double_edge, markdown, none --panel Wrap output in a panel, shrunk to fit its content (none = no panel)
padding string --padding Wrap output in padding (1, 2, or 4 comma-separated ints)
log_presentation enum: plain, rich plain --log-presentation With --log, select log presentation
mermaid_backend enum: text, mmdc, off --mermaid-backend How Mermaid diagrams (rich mermaid, ``mermaid fences in Markdown) are drawn: text draws flowcharts, sequence and ER diagrams as text, mmdc uses Mermaid's own CLI (a build with the mmdc feature;rich mermaid` tries it first there), off leaves fences as code
dot_backend enum: text, graphviz, off --dot-backend How DOT graphs (rich dot, ``dot fences in Markdown) are drawn: text draws them natively, graphviz also makes --export-svg write Graphviz's own SVG (thedot` program, installed separately), off leaves fences as code
rules array of rule tables --style-rule Style the cells, rows or columns of a data table by value: COLUMN OP VALUE:STYLE or COLUMN OP VALUE:row:STYLE (e.g. 'latency>500:bold red', 'status=failed:row:on red'); OP is == != < <= > >= *= ^= $= or a word such as contains or empty. Repeatable; applies to --csv, rich profile's table and rich inspect --table, and has no effect elsewhere
highlighter string --highlighter The code highlighter for source, Markdown code, view and diff: syntect (the default), or lumis in a build with the lumis feature
code_theme string --code-theme A theme of the chosen code highlighter, e.g. ansi_dark (rich doctor --report json lists them)
height positive integer --height With --image, render this many rows instead of the backend's default
image_fit enum: contain, cover, stretch, native --image-fit With --image and --height: contain letterboxes, cover crops at --image-anchor, stretch fills ignoring aspect. native needs no --height: it renders the image at its own pixel size (never enlarged), capped by --width, the terminal and --image-max-width/--image-max-height
image_anchor enum: center, top, bottom, left, right, top-left, top-right, bottom-left, bottom-right center --image-anchor Cover crop anchor
image_max_width positive integer --image-max-width With --image, never exceed N columns (aspect kept)
image_max_height positive integer --image-max-height With --image, never exceed N rows (aspect kept)
image_background string --image-background With --image: flatten transparency onto #RRGGBB (also colours contain padding; quote the # in your shell), leave it to the terminal's background (default), or show it on a gray checkerboard (checkerboard)
image_color enum: truecolor, ansi256, ansi16, grayscale truecolor --image-color Colour depth for --image (not Braille, which is monochrome) and --gif frames
image_dither enum: none, floyd-steinberg, bayer4x4, atkinson none --image-dither Dithering (needs a non-truecolor --image-color)
image_color_distance enum: rgb, oklab rgb --image-color-distance How the nearest palette colour is measured: encoded RGB, or perceptual OKLab (needs a non-truecolor --image-color)
image_brightness number 1.0 --image-brightness Tone adjustment (1.0 = unchanged). Brightness, contrast and gamma apply in that order, after rotation/flips and before grayscale and colour
image_contrast number 1.0 --image-contrast Tone adjustment (1.0 = unchanged)
image_gamma number 1.0 --image-gamma Tone adjustment (1.0 = unchanged)
image_rotate enum: 0, 90, 180, 270 0 --image-rotate Rotate still images clockwise
image_flip_horizontal bool --image-flip-horizontal Flip still images horizontally, after rotation
image_flip_vertical bool --image-flip-vertical Flip still images vertically, after rotation
image_grayscale bool --image-grayscale Composite and convert still images to grayscale
export_html path --export-html Also write a self-contained HTML document to PATH
export_svg path --export-svg Also write an SVG document to PATH. Unlike the HTML, it references its font from a CDN, so it is not self-contained offline.
pager bool --pager Page terminal output via MANPAGER, PAGER, then less/more.com
auto_pager bool --auto-pager Page only terminal output taller than the viewport
watch bool --watch Re-render changing files (several allowed) or one URL while stdout is a terminal; each file gets its own live region
watch_interval number 1 --watch-interval Poll interval in seconds
watch_debounce number 0.1 --watch-debounce Quiet period collapsing a burst of file events
watch_poll bool --watch-poll Poll local files at --watch-interval instead of file events
watch_exit_on_error bool --watch-exit-on-error End the watch with a non-zero exit when a render fails
watch_cache bool --watch-cache With URLs, render only when the response body changes
batch bool --batch Convert explicit files, directories, or globs deterministically
batch_input_root path --batch-input-root The directory --batch-preserve-dirs keeps paths relative to
batch_preserve_dirs bool --batch-preserve-dirs Preserve paths under --batch-input-root PATH
batch_name_template string --batch-name-template Name export leaves; export paths become directories
jobs positive integer 1 --jobs Parallel file-export workers; requires --batch. Terminal output stays in input order; active jobs finish on error.
progress bool true --progress Enable/disable batch counts on terminal stderr; hidden for redirected stderr, JSON reports and dry runs
continue_on_error bool --continue-on-error Process all planned inputs and aggregate failures
overwrite bool --overwrite Allow existing batch export destinations
collision enum: error, overwrite, suffix error --collision Batch policy for existing destinations
theme string --theme Select a named theme from config; --theme also finds installed themes
theme_file string --theme-file Load styles from an upstream rich theme file ([styles] section); --theme and --theme-style override it
plugins list of paths --plugin Load a runtime plugin: a WASM module (.wasm, sandboxed; the default wasm-plugins feature) or a native library (.so, .dylib, .dll, which runs its own code; a build with the dylib-plugins feature); repeatable. rich plugins list shows what is loaded
micro_project bool --micro-project Load micro assets from the project's .rich/micro/ (off by default: a project's assets load only when you trust it; ./rich.toml cannot turn this on)
no_color bool NO_COLOR --no-color Disable colored output (as does a non-empty NO_COLOR)
sanitize bool --sanitize Replace input terminal controls, JSON/notebook strings, titles and captions with visible inert text. On by default for content fetched from a URL, and for rich view, rich schema, rich log and text rich diff; --no-sanitize turns it off there

rich writes diagnostics to stderr and rendered output to stdout, so rich --csv data.csv > table.txt keeps the two apart.

--report json writes the result/error envelope to stderr for the same reason: stdout remains the rendered payload. rich doctor --report json is an informational command: its diagnostic document is written to stdout instead.

Successful reports include ok, code, exit_code and a result object. Failures include the same status fields plus message and an error object. The top-level message is retained for simple shell consumers; structured consumers can read error.message. Informational exits such as --help and --version print their normal text and do not emit a report envelope.

A failure always exits non-zero

Earlier versions printed a fabricated table and exited 0 when a CSV's delimiter could not be determined. That is fixed: unreadable input now fails loudly, so rich --csv "$f" && publish no longer proceeds on garbage.