Skip to content

CLI Reference ​

The richview CLI generates, validates, lints, verifies, and publishes reports from the command line.

Global options ​

FlagDescription
-o, --output <dir>Output directory
-f, --format <format>Output format: json or pretty (default: pretty)
--verboseEnable verbose output
--no-colorDisable colored output
-v, --versionPrint version

Commands ​

generate <schema> ​

Generate an HTML report from a JSON or YAML schema file. Alias: render.

bash
richview generate report.yaml
richview generate report.json -o dist/

validate <schema> ​

Validate a schema file against the RichView report schema without rendering.

bash
richview validate report.yaml

lint <schema> ​

Check a report for quality issues across data quality, chart quality, accessibility, best practices, structure, and provenance.

bash
richview lint report.yaml
richview lint report.yaml --severity warning
richview lint report.yaml --category data-quality,chart-quality
richview lint report.yaml --disable missing-alt-text,missing-provenance
FlagDescription
--severity <level>Minimum severity: error, warning, info (default: info)
--category <cat>Filter by category (comma-separated)
--disable <rules>Disable specific rules (comma-separated)

verify [report] ​

Run verification assertions on a report file.

bash
richview verify report.yaml
richview verify --list-types

check <schema> ​

Combined quality check: validates schema, lints, and verifies assertions in one pass.

bash
richview check report.yaml
richview check report.yaml --verify-only
richview check report.yaml --lint-only

init [name] ​

Scaffold a new report project with an example schema.

bash
richview init my-report
richview init dashboard --template dashboard
richview init report --json

Templates: starter, dashboard, analysis, charts, blank, postmortem, monthly-review, data-quality, sales-pipeline, executive-summary.

serve <schema> ​

Start a local dev server with live reload.

bash
richview serve report.yaml
richview serve report.yaml --port 8080 --open

export <schema> ​

Export a report to PDF.

bash
richview export report.yaml
richview export report.yaml --paper Letter --landscape

publish <schema> ​

Package a report as a deployable static site.

bash
richview publish report.yaml
richview publish report.yaml --slug my-report --no-badge
richview publish report.yaml --server https://reports.example.com
FlagDescription
--slug <slug>Custom URL slug (default: slugified title)
--no-badgeOmit the "Made with RichView" badge
--server <url>Custom server URL for publishing (default: https://richview.uk)

watch <schema> ​

Watch a schema file and rebuild on every change.

bash
richview watch report.yaml
richview watch report.yaml --include data.csv

convert <schema> ​

Convert a report between JSON and YAML formats.

bash
richview convert report.yaml --to json
richview convert report.json -o report.yaml

diff <base> <head> ​

Compare two report versions and show what changed.

bash
richview diff v1.yaml v2.yaml

merge <files...> ​

Merge multiple report files into a single report.

bash
richview merge part1.yaml part2.yaml
richview merge *.yaml --title "Combined Report" --duplicates rename

stats <schema> ​

Show comprehensive statistics about a report: section counts, word counts, data coverage.

bash
richview stats report.yaml

info <schema> ​

Show a one-screen overview of a report: title, section breakdown, word count, and lint status.

bash
richview info report.yaml
richview info report.yaml -f json

describe <schema> ​

Generate a text description of a report for agent self-verification.

bash
richview describe report.yaml
richview describe report.yaml --text-only
richview describe report.yaml --section revenue-chart

summary <schema> ​

Show a compact text summary for agent pipelines. Alias: toc.

bash
richview summary report.yaml --plain

inspect <schema> ​

Deep introspection: data profiling, assertion coverage, column statistics.

bash
richview inspect report.yaml

extract <schema> ​

Extract structured data from report sections.

bash
richview extract report.yaml --type chart
richview extract report.yaml --section revenue-chart --what data

transform <schema> ​

Apply transformations to a report.

bash
richview transform report.yaml --keep-type chart,table
richview transform report.yaml --head 5
richview transform report.yaml --strip-assertions --anonymize

import <file> ​

Import CSV or JSON data as a report section.

bash
richview import data.csv
richview import data.json --type chart --chart-type line

embed <schema> ​

Generate embeddable HTML for a report or section.

bash
richview embed report.yaml
richview embed report.yaml --section revenue-chart --mode html

data <subcommand> ​

Data source guidance, diagnostics, and live data fetch.

data guide ​

Show a guide to all supported data sources (inline, file, SQL, slash-command, fetch).

bash
richview data guide
richview data guide -f json

data check <report> ​

Inspect a report file and list every data source used, with type and status.

bash
richview data check report.yaml
richview data check report.yaml -f json

data fetch <provider> <query> ​

Fetch live data from built-in providers. Returns a preview table by default, or full JSON with -f json.

Stocks (Yahoo Finance):

bash
richview data fetch stocks AAPL
richview data fetch stocks MSFT -f json

Returns daily OHLCV (open, high, low, close, volume) for the past 30 trading days.

Crypto (CoinGecko):

bash
richview data fetch crypto BTC
richview data fetch crypto ETH -f json

Supported symbols: BTC, ETH, SOL, ADA, DOT, AVAX, MATIC, LINK, DOGE, XRP, BNB, LTC, ATOM, UNI, SHIB. Returns daily price and volume for the past 30 days.

Weather (Open-Meteo):

bash
richview data fetch weather London
richview data fetch weather "New York" -f json

Returns daily temperature (max/min in Celsius) and precipitation for the next 7 days.

connect <subcommand> ​

Manage database connections for SQL data sources. Requires the RichView API server (richview serve or pnpm dev). Set RICHVIEW_SERVER env var to point to a remote server.

connect list ​

List all configured database connections.

bash
richview connect list
richview connect list -f json

connect add ​

Register a new database connection.

bash
richview connect add \
  --name my-postgres \
  --type postgres \
  --database mydb \
  --host localhost \
  --port 5432 \
  --username admin \
  --password secret \
  --ssl \
  --test
FlagDescription
--name <name>Connection name (required)
--type <type>Database type: postgres, mysql, sqlite (required)
--database <db>Database name or file path (required)
--host <host>Database host
--port <port>Database port
--username <user>Database username
--password <pass>Database password
--sslEnable SSL
--testTest the connection immediately after creating

connect remove <id> ​

Remove a database connection by ID.

bash
richview connect remove conn_abc123

connect test <id> ​

Test an existing connection.

bash
richview connect test conn_abc123

connect query <id> <sql> ​

Run a SQL query against a connection and display results.

bash
richview connect query conn_abc123 "SELECT * FROM sales LIMIT 10"
richview connect query conn_abc123 "SELECT date, SUM(revenue) FROM metrics GROUP BY date" -f json

template <subcommand> ​

List, preview, apply, export, or import report templates.

template list ​

List all built-in templates.

bash
richview template list
richview template list -f json

template show <name> ​

Show details about a specific template.

bash
richview template show dashboard

template apply <name> ​

Generate a report file from a template.

bash
richview template apply dashboard --title "Q4 Dashboard"
richview template apply analysis --json -o reports/

template export <name> ​

Export a built-in template as a standalone JSON or YAML file. Useful for sharing or customizing templates.

bash
richview template export dashboard -o dashboard-template.json
richview template export starter --yaml -o starter-template.yaml

template import <file> ​

Validate and inspect an external template file. Checks that the file has the required fields (name, description, template) and that the embedded report schema is valid.

bash
richview template import my-template.json
richview template import custom-template.yaml -f json

feedback <subcommand> [report] ​

Manage a human-agent feedback loop. Feedback is stored in a sidecar file next to the report (e.g., report.feedback.json).

bash
richview feedback init report.yaml
richview feedback show report.yaml
richview feedback show report.yaml --unresolved-only
richview feedback add report.yaml --section intro --type suggestion --message "Add more context"
richview feedback resolve report.yaml --id <uuid> --by reviewer

theme <subcommand> ​

Manage corporate branding.

bash
richview theme init
richview theme validate brand.yaml
richview theme preview brand.yaml

schema ​

Output the RichView report JSON Schema for IDE autocomplete.

bash
richview schema
richview schema --compact
richview schema --search chart
richview schema --section big-number

screenshot <schema> ​

Take a PNG screenshot of a rendered report for agent verification.

bash
richview screenshot report.yaml
richview screenshot report.yaml --width 1440 --full-page

Generate an index page listing all reports in a directory.

bash
richview gallery ./reports --recursive

db <subcommand> ​

Database management for self-hosted instances. Requires the RichView API server. Set RICHVIEW_SERVER env var or use --server to point to a remote server. Authentication uses RICHVIEW_API_KEY.

db stats ​

Show database statistics: report count, section count, user count, and database file size.

bash
richview db stats
richview db stats -f json
richview db stats --server https://my-richview.example.com

db clean ​

Remove test and orphan reports matching known patterns. Performs a dry run first and shows what would be deleted. Use --force to actually delete.

bash
richview db clean
richview db clean --force
richview db clean --server https://my-richview.example.com --force

db vacuum ​

Run SQLite VACUUM to reclaim disk space after deleting reports.

bash
richview db vacuum
richview db vacuum --server https://my-richview.example.com
FlagDescription
--server <url>Server URL (default: https://richview.uk or RICHVIEW_SERVER env var)
--forceSkip confirmation for destructive operations

chart <subcommand> ​

Work with RichView chart YAML specs outside of a full report. Useful for iterating on chart design before embedding in a report.

chart preview <file.yaml> ​

Render a chart YAML spec as a standalone HTML page and open it in your browser. Writes to a temp file by default, or to a specific path with -o.

bash
richview chart preview my-chart.yaml
richview chart preview my-chart.yaml -o preview.html

chart validate <file.yaml> ​

Validate a chart YAML spec against the chart schema without rendering.

bash
richview chart validate my-chart.yaml
richview chart validate my-chart.yaml -f json

chart convert <file.json> ​

Convert a JSON chart section object to YAML format. Accepts either a full chart section or a bare { chartType, config } object.

bash
richview chart convert chart-section.json
richview chart convert chart-section.json -o chart.yaml

completions [shell] ​

Generate shell completion scripts.

bash
richview completions bash >> ~/.bashrc
richview completions zsh >> ~/.zshrc
richview completions fish > ~/.config/fish/completions/richview.fish

Released under the Elastic License 2.0 (ELv2).