> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octonote.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Canvases

> Write a mermaid flowchart; Octonote lays it out as real, editable shapes.

```bash theme={null}
octonote canvas create "Login flow" --from-mermaid flow.mmd
octonote canvas redraw cnv_… --from-mermaid flow.mmd
octonote canvas pull cnv_… -o board.json   # raw canvas JSON (octodraw format)
```

## canvas create

Create a canvas — drawn from a mermaid flowchart or class diagram, from canvas JSON, or empty

```bash theme={null}
octonote canvas create [title] [options]
```

| Argument or option | What it does |
| - | - |
| `<title>` | title (default: Untitled canvas) |
| `-m, --from-mermaid <path>` | mermaid flowchart or class diagram file ("-" for stdin) to draw as real shapes |
| `-f, --file <path>` | canvas JSON (from `canvas pull`) |
| `-n, --notebook <notebook>` | put it in a notebook (id or exact name) |
| `--publish` | publish it to the web and print the public URL |

## canvas redraw

Replace a canvas with a drawing of a mermaid flowchart or class diagram

```bash theme={null}
octonote canvas redraw <canvas> [options]
```

| Argument or option | What it does |
| - | - |
| `<canvas>` | canvas id (cnv\_…) or URL (required) |
| `-m, --from-mermaid <path>` | mermaid flowchart or class diagram file ("-" for stdin) (required) |

## canvas pull

Save a canvas as JSON (Octonote canvas format: \{ version: 1, items })

```bash theme={null}
octonote canvas pull <canvas> [options]
```

| Argument or option | What it does |
| - | - |
| `<canvas>` | canvas id (cnv\_…) or URL (required) |
| `-o, --out <path>` | file to write (default: \<id>.json) |

## canvas push

Replace a canvas with canvas JSON (from `canvas pull`)

```bash theme={null}
octonote canvas push <file> [options]
```

| Argument or option | What it does |
| - | - |
| `<file>` | canvas JSON ("-" for stdin) (required) |
| `--id <canvas>` | canvas to update (required) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.