excalidraw scenes
List, create, update, share, delete, and edit workspace scenes.
Work with Excalidraw scenes, including metadata, collection placement, and drawing content.
excalidraw scenes [options] [command]| Command | Description |
|---|---|
render | Render a workspace scene as a local PNG or SVG. |
list | List scene metadata in the current workspace. |
get | Show metadata for one scene. |
create | Create a scene, optionally with content from a file. |
update | Update scene metadata. |
delete | Move a scene to trash. |
share | Turn a scene's public link on or off. |
share-slides | Share a scene's frames as a presentation. |
content | Read, replace, or patch scene canvas JSON. |
Examples
excalidraw scenes list --limit 25
excalidraw scenes list --collection-id <collectionId>
excalidraw scenes get <sceneId>
excalidraw scenes content get <sceneId> --out scene.jsonNotes
- Scene metadata commands do not read or write drawing elements.
- Use
excalidraw scenes content --helpfor commands that handle the canvas JSON. - Every scene belongs to a collection. Personal (uk-) API keys may pass
privateas the collection ID.
render
Fetch scene content through the public API, then render it locally with an installed browser.
excalidraw scenes render [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to render. |
| Option | Description |
|---|---|
--out <file> | Write the image to a file (overwrites), - for stdout, or a directory with --all-frames. Required. |
--format <format> | Png or svg; defaults to the --out extension, else png. |
--frame-id <id> | Render just this frame, clipped to its bounds. |
--all-frames | Render each frame to its own file in the --out directory. |
--padding <pixels> | Padding in scene pixels; ignored for frames; default 20. |
--scale <number> | Resolution multiplier, up to 16; default 1. |
--max-width <pixels> | Maximum PNG width, up to 16384; default 16384. |
--max-height <pixels> | Maximum PNG height, up to 16384; default 16384. |
--theme <theme> | Light or dark; defaults to the scene's export preference. |
--transparent | Export with a transparent background. |
--browser-path <path> | Path to Chrome, Chromium, Edge, or Firefox; a binary named firefox is driven as Firefox. Environment variable: EXCALIDRAW_BROWSER_PATH. |
--fonts-url <urls> | Comma-separated mirror URLs or local folders for CJK fonts, or none. Environment variable: EXCALIDRAW_FONTS_URL. |
--timeout <ms> | Browser startup and render deadline; default 30000 ms. |
Examples
excalidraw scenes render <sceneId> --out scene.png
excalidraw scenes render <sceneId> --out scene.svg --theme dark
excalidraw scenes render <sceneId> --frame-id <frameId> --out frame.png
excalidraw scenes render <sceneId> --all-frames --out slides/
excalidraw scenes render <sceneId> --out - > scene.pngNotes
- Needs an API key that can read the scene, and an installed Chrome, Chromium, Edge or Firefox. The key never reaches the browser.
- The format follows the
--outextension, .png or .svg, unless--formatis set. SVGs embed their fonts and have no size limit. --all-frameswrites each frame to the--outdirectory as its own file, numbered in presentation order, such as 01-intro.png.- With
--out -, stdout gets only the image, without the JSON summary. Errors and retry notices go to stderr. - Fonts, proxies, browsers and size limits: /docs/cli/rendering
list
List scene metadata, sharing links, and collection assignments without fetching full canvas content.
excalidraw scenes list [options]| Option | Description |
|---|---|
--collection-id <id> | Only return scenes in this collection. |
--limit <number> | Maximum number of scenes to return, from 1 to 100; default 5. |
--offset <number> | Number of scenes to skip for offset pagination. |
--all | Fetch every page and print one combined list; --limit sets the page size. |
Examples
excalidraw scenes list --limit 50
excalidraw scenes list --collection-id <collectionId> --limit 25
excalidraw scenes list --all --output tableNotes
- Use this first when you need scene IDs for follow-up commands.
- Use
--limitto keep output bounded for scripts and agents, or--allto walk every page. - With
--allthe output is { count, data } instead of a single page with hasNextPage.
get
Get one scene's metadata, sharing links, pinned state, and collection assignment.
excalidraw scenes get [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID returned by a list or create command. |
Examples
excalidraw scenes get <sceneId>Notes
- This returns metadata only. Use
scenes content getto fetch drawing elements and files.
create
Create a scene in a collection. With --file, write its drawing content in the same run; without it, the scene starts empty.
excalidraw scenes create [options]| Option | Description |
|---|---|
--name <name> | Name for the new scene. Required. |
--collection-id <id> | Collection to place the scene in; personal API keys may use private. Required. |
--pinned | Pin the scene in the workspace UI. |
--file <file> | Scene content JSON to write into the new scene; use - to read stdin. |
Examples
excalidraw scenes create --name "Architecture sketch" --collection-id <collectionId>
excalidraw scenes create --name "Sprint board" --collection-id <collectionId> --pinned
excalidraw scenes create --name "Scratchpad" --collection-id private
excalidraw scenes create --name "Imported" --collection-id <collectionId> --file drawing.excalidraw
generate-diagram | excalidraw scenes create --name "Generated" --collection-id <collectionId> --file -Notes
--filetakes a full Excalidraw export or a partial payload with elements, appState or files, and is checked before the scene is created. Without it the scene starts empty.- Workspace API keys need a real collection ID; personal (uk-) keys may pass
privatefor the owner's private collection. - More: /docs/cli/scene-content
update
Rename, pin, or move a scene without changing its drawing content.
excalidraw scenes update [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to update. |
| Option | Description |
|---|---|
--name <name> | New scene name. |
--collection-id <id> | Move the scene to this collection; personal API keys may use private. |
--pinned | Pin the scene in the workspace UI. |
--no-pinned | Unpin the scene. |
Examples
excalidraw scenes update <sceneId> --name "Updated diagram"
excalidraw scenes update <sceneId> --collection-id <collectionId>
excalidraw scenes update <sceneId> --no-pinnedNotes
- Provide at least one field to update. Omitted fields stay unchanged.
- Use
--pinnedto pin and--no-pinnedto unpin.
delete
Soft-delete a scene by moving it to trash. This does not permanently destroy it.
excalidraw scenes delete [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to move to trash. |
Examples
excalidraw scenes delete <sceneId>Notes
- Existing links or integrations may stop working while the scene is in trash.
share
Set what anyone with the scene's public link may do, and print the link. This is the link from the scene's Share dialog.
excalidraw scenes share [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to share. |
| Option | Description |
|---|---|
--access <access> | View, edit, or none to turn the link off. Required. |
Examples
excalidraw scenes share <sceneId> --access view
excalidraw scenes share <sceneId> --access edit
excalidraw scenes share <sceneId> --access none
excalidraw scenes share <sceneId> --access view | jq -r .urlNotes
- Anyone with the link can open the scene without signing in. With view or edit, they can also read and write comments.
- The output is the link's access and its URL; url is null once the link is off.
- Turning the link on fails with HTTP 403 when a workspace admin has disabled scene sharing.
share-slides
Turn the scene's shared presentation link on, or off with --off, and print the link. Anyone with the link can step through the scene's frames as slides without signing in.
excalidraw scenes share-slides [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID whose frames to share. |
| Option | Description |
|---|---|
--off | Turn the shared slides link off. |
Examples
excalidraw scenes share-slides <sceneId>
excalidraw scenes share-slides <sceneId> --offNotes
- Each frame in the scene is one slide. Sharing fails with HTTP 400 when the scene has no frames.
- The link stays the same when sharing is turned off and on again; url is null while it's off.
- Turning sharing on fails with HTTP 403 when a workspace admin has disabled scene sharing.
content
Work with the complete Excalidraw scene content: elements, files, app state, and version data.
excalidraw scenes content [options] [command]| Command | Description |
|---|---|
get | Fetch complete scene content. |
put | Replace all content in a scene. |
patch | Merge partial content into a scene. |
Examples
excalidraw scenes content get <sceneId> --out scene.json
excalidraw scenes content patch <sceneId> --file patch.json
excalidraw scenes content put <sceneId> --file replacement.jsonNotes
- Prefer patch for incremental agent edits. Use put only for authoritative full replacements.
- Patch merges with the stored scene; put replaces the stored scene.
content get
Return the full scene JSON, including elements, files, app state, and embedded file status.
excalidraw scenes content get [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to read. |
| Option | Description |
|---|---|
--out <file> | Write response JSON to a file (overwrites); - prints to stdout. |
Examples
excalidraw scenes content get <sceneId>
excalidraw scenes content get <sceneId> --out scene.jsonNotes
- Large scenes can produce large JSON. Use
--outwhen saving content for review, backup, or later patching. - GET responses may include filesFailedToEmbed; write commands ignore that field if it is reused as input.
content put
Authoritatively replace a scene with the complete Excalidraw content JSON from a file.
excalidraw scenes content put [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to replace. |
| Option | Description |
|---|---|
--file <file> | Complete scene content JSON file; use - to read stdin. Required. |
Examples
excalidraw scenes content put <sceneId> --file replacement.json
cat drawing.excalidraw | excalidraw scenes content put <sceneId> --file -Notes
- This is a full replacement: elements not present in the file are removed from the scene.
- The file only needs elements; missing fields are filled in, and the file is checked before anything is sent.
- Connected editors are forced to reload. For most automated edits, use patch instead.
- More: /docs/cli/scene-content
content patch
Patch scene content by merging the supplied elements, files, or appState fields into the current scene.
excalidraw scenes content patch [options] <sceneId>| Argument | Description |
|---|---|
<sceneId> | Scene ID to patch. |
| Option | Description |
|---|---|
--file <file> | Partial scene content JSON file; use - to read stdin. Required. |
Examples
excalidraw scenes content patch <sceneId> --file patch.json
echo '{"appState":{"viewBackgroundColor":"#f8f9fa"}}' | excalidraw scenes content patch <sceneId> --file -Notes
- Send at least one of elements, appState or files. Elements and files you leave out are kept.
- Elements merge by ID, and the higher version wins: to change an element, send it with its version increased. Send it with isDeleted: true to remove it.
- Files are added or replaced by ID. From appState, only viewBackgroundColor and lockedMultiSelections are stored.
- More: /docs/cli/scene-content
Last updated on