---
title: openplanr diagram
description: "openplanr diagram: Create, verify, inspect, and rerender offline professional diagrams. Subcommands: new, edit, apply, render, inspect, check, gallery."
url: https://openplanr.dev/docs/cli/diagram
updated: 2026-10-06
related:
  - https://openplanr.dev/docs/cli/artifact.md
  - https://openplanr.dev/docs/cli/dashboard.md
  - https://openplanr.dev/docs/cli/linear.md
---

# openplanr diagram

Create, verify, inspect, and rerender offline professional diagrams

```text
openplanr diagram [options] [command]
```

## openplanr diagram new

Create a canonical editable diagram bundle

```text
openplanr diagram new [options] <path>
```

Arguments:

- `path` (required): canonical diagrams/{slug}/{slug}.planr-diagram-bundle.json path

Options:

- `--title <title>`: diagram title
- `--json`: output one stable machine envelope

## openplanr diagram edit

Open the local owner studio for an existing diagram

```text
openplanr diagram edit [options] <path>
```

Arguments:

- `path` (required): canonical diagram bundle path

Options:

- `--json`: output one stable machine envelope

## openplanr diagram apply

Preview a scoped edit, then explicitly accept that preview

```text
openplanr diagram apply [options] <path>
```

Arguments:

- `path` (required): canonical diagram bundle path

Options:

- `--transaction <file>`: typed diagram-edit-transaction JSON
- `--dry-run`: preview semantic and layout changes without applying
- `--accept <preview-token>`: apply the exact previewed transaction
- `--json`: output one stable machine envelope

## openplanr diagram render

Render a verified offline diagram set

```text
openplanr diagram render [options] <input>
```

Arguments:

- `input` (required): canonical .planr-diagram.json or Mermaid source

Options:

- `--slug <slug>`: override the output slug
- `--output <directory>`: output root; defaults to the repository root
- `--json`: output one stable machine envelope

## openplanr diagram inspect

Inspect source or generated manifest custody

```text
openplanr diagram inspect [options] <input-or-manifest>
```

Arguments:

- `input-or-manifest` (required): diagram source, manifest, or generated diagram directory

Options:

- `--json`: output one stable machine envelope

## openplanr diagram check

Validate source or verify generated bytes against their manifest

```text
openplanr diagram check [options] <input-or-manifest>
```

Arguments:

- `input-or-manifest` (required): diagram source, manifest, or generated diagram directory

Options:

- `--json`: output one stable machine envelope

## openplanr diagram gallery

List the searchable diagram grammar and primitive gallery

```text
openplanr diagram gallery [options]
```

Options:

- `--type <type>`: filter by grammar, alias, or layout family
- `--json`: output one stable machine envelope

## openplanr diagram rerender

Rerender after an intentional source edit

```text
openplanr diagram rerender [options] <manifest>
```

Arguments:

- `manifest` (required): generated diagram manifest

Options:

- `--accept <source>`: choose ir, mermaid, or excalidraw when source branches conflict
- `--json`: output one stable machine envelope
