---
title: Command line
description: Validate, inspect, render and preview the same saved source.
styles: [scientific]
---

Continue from [your first report](https://richview.ai/docs/first-report). Run these commands from the working folder that contains `first-report/`.

## Read the authoring guide

```sh
richview learn
richview learn grammar
richview learn chart-contract
richview learn style
richview learn workflow
```

`learn` prints the guide your coding agent uses. Give the agent the relevant section when it needs to repair a particular block or choose chart fields.

## Check the source and the drawing

```sh
richview validate first-report/report.rmd --format json
richview check first-report/report.rmd --chart-width 390 --format json
```

Validation finds source and resource errors. Checking also reports geometry, such as clipped labels or collisions, at the requested chart width. Browser inspection adds the actual font measurements and interactions. Check again after the final source edit.

## Write another presentation

```sh
richview generate first-report/report.rmd --style air -o review.html --format json
```

This writes `first-report/Rendered/review.html`. An output name changes the filename within `Rendered`, not the output root. `--style` supplies the complete style list for this call and replaces the source's list; it does not edit the source.

## Keep the operations straight

| You want to… | Use |
| --- | --- |
| Start a bounded report folder | `init` |
| Inspect syntax, fields and local resources | `validate` |
| Inspect chart geometry too | `check` |
| Write interactive HTML or a local PDF | `generate` |
| Preview one report with reload | `serve` |
| Connect an agent over stdio | `mcp` |
| Store immutable report versions | `server` and `publish` |
| Manage stored versions | `report` |
| Upload integrity-pinned files to configured storage | `asset` |
| Find a credited Unsplash photo | `image` |

The [command and flag reference](https://richview.ai/docs/tools) is generated from the actual CLI. Report commands exit 0 when no diagnostic is an error, 1 on a report error and 2 on a usage error. A draft with invalid rich blocks can still be written for repair; read the diagnostics and exit status. `serve`, `server` and `mcp` keep running until stopped. Asset and image commands have their own [result contracts](https://richview.ai/docs/tools).
