# Command reference

> Page: https://docs.plotwork.dev/cli/commands. Index of every page: https://docs.plotwork.dev/llms.txt

Every command of the Plotwork command line, `plotwork`, with a page for each. The pages say the same as `plotwork <command> --help`, which prints the options, defaults, examples, and exit codes of one command in a terminal.

## TL;DR

| Question | Answer |
|---|---|
| How do I run a command? | `npx -y @buun_group/plotwork@0.1.0 <command>`, with no install, or `plotwork <command>` once the package is installed. See [Overview](https://docs.plotwork.dev/cli/overview.md). |
| Which command keeps pictures in step? | [`plotwork sync`](https://docs.plotwork.dev/cli/commands/sync.md), and `plotwork sync --check` in CI. |
| Which commands read the repository settings? | `sync`, `validate`, `check`, `render`, `outline`, `generate`, `publish`. See [Configuration](https://docs.plotwork.dev/cli/configuration.md). |
| What do the exit codes mean? | `0` all is well, `1` a problem in a diagram, `2` a mistake in the command line. |
| Where is the help in a terminal? | `plotwork --help` lists every command; `plotwork <command> --help` prints one. |

## Commands

| Command | What it does |
|---|---|
| [`plotwork sync`](https://docs.plotwork.dev/cli/commands/sync.md) | Draw the pictures under every diagram fence of Markdown files; `--check` fails when one is stale |
| [`plotwork validate`](https://docs.plotwork.dev/cli/commands/validate.md) | Check every diagram of a Markdown or `.diagram` file; `--strict` also fails on warnings |
| [`plotwork check`](https://docs.plotwork.dev/cli/commands/check.md) | Check every diagram against a team's style rules; fails on a broken rule at level error |
| [`plotwork render`](https://docs.plotwork.dev/cli/commands/render.md) | Draw the first diagram of a file, or a view link, to an SVG that carries its source |
| [`plotwork read`](https://docs.plotwork.dev/cli/commands/read.md) | Print the source a Plotwork SVG, a view link, or a hosted link carries, to edit it |
| [`plotwork outline`](https://docs.plotwork.dev/cli/commands/outline.md) | Print a plain-text outline of every diagram, to check what it says |
| [`plotwork generate`](https://docs.plotwork.dev/cli/commands/generate.md) | Make the diagrams the settings' sources name from their files; `--check` fails on drift |
| [`plotwork import-source`](https://docs.plotwork.dev/cli/commands/import-source.md) | Turn SQL, OpenAPI, Terraform, Compose, CSV, a git log, and more into Plotwork source |
| [`plotwork import`](https://docs.plotwork.dev/cli/commands/import.md) | Convert Mermaid to Plotwork: a `.mmd` file, or every `mermaid` fence of a Markdown file |
| [`plotwork export`](https://docs.plotwork.dev/cli/commands/export.md) | Print paste-ready text of the first diagram for Confluence or Notion |
| [`plotwork publish`](https://docs.plotwork.dev/cli/commands/publish.md) | Save every diagram of a `.diagram` or Markdown file to Plotwork, where your organisations' Publishing settings decide, and print the link |
| [`plotwork icons`](https://docs.plotwork.dev/cli/commands/icons.md) | Search the bundled icons by name |

## See also

| Doc | Why |
|---|---|
| [Quick start](https://docs.plotwork.dev/cli/quick-start.md) | The first diagram, from install to a checked pull request |
| [Exit codes and output formats](https://docs.plotwork.dev/cli/exit-codes-and-output.md) | What every code and format means |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The same operations for an AI agent, over MCP |
