Excalidraw CLI

excalidraw collections

Organize scenes into workspace collections.

List, create, rename, delete, and populate collections in the current workspace.

excalidraw collections [options] [command]
CommandDescription
listList workspace collections.
getShow one collection.
createCreate a collection.
updateRename a collection.
deleteMove a collection and its scenes to trash.
scenesList or create scenes inside a collection.

Examples

excalidraw collections list --limit 50
excalidraw collections create --name "Product diagrams"
excalidraw collections scenes list <collectionId>

Notes

  • Use collection IDs with scenes commands to scope list and create operations.

list

Return collection metadata for the current workspace with optional pagination.

excalidraw collections list [options]
OptionDescription
--limit <number>Maximum number of collections to return, from 1 to 100; default 5.
--offset <number>Number of collections to skip for offset pagination.
--allFetch every page and print one combined list; --limit sets the page size.

Examples

excalidraw collections list
excalidraw collections list --limit 100
excalidraw collections list --all --output table

Notes

  • Use this to discover collection IDs before creating or moving scenes.
  • With --all the output is { count, data } instead of a single page with hasNextPage.

get

Get metadata for a specific collection by ID.

excalidraw collections get [options] <collectionId>
ArgumentDescription
<collectionId>Collection ID returned by a list or create command.

Examples

excalidraw collections get <collectionId>

create

Create a workspace collection for grouping scenes by project, team, or topic.

excalidraw collections create [options]
OptionDescription
--name <name>Name for the new collection. Required.

Examples

excalidraw collections create --name "Roadmap"

update

Update collection metadata. Currently, collections can be renamed.

excalidraw collections update [options] <collectionId>
ArgumentDescription
<collectionId>Collection ID to update.
OptionDescription
--name <name>New collection name. Required.

Examples

excalidraw collections update <collectionId> --name "Architecture"

delete

Soft-delete a collection and every scene in it by moving them to trash. Nothing is permanently destroyed.

excalidraw collections delete [options] <collectionId>
ArgumentDescription
<collectionId>Collection ID to move to trash.

Examples

excalidraw collections delete <collectionId>

Notes

  • Every scene in the collection is moved to trash along with it.
  • Check collection contents before deletion with collections scenes list.

scenes

Work with scenes through a collection-scoped view.

excalidraw collections scenes [options] [command]
CommandDescription
listList scenes in one collection.
createCreate a scene in a collection, optionally with content from a file.

Examples

excalidraw collections scenes list <collectionId> --limit 25
excalidraw collections scenes create <collectionId> --name "New diagram"

scenes list

Return scene metadata for a collection without fetching full canvas content.

excalidraw collections scenes list [options] <collectionId>
ArgumentDescription
<collectionId>Collection ID to list scenes from.
OptionDescription
--limit <number>Maximum number of scenes to return, from 1 to 100; default 5.
--offset <number>Number of scenes to skip for offset pagination.
--allFetch every page and print one combined list; --limit sets the page size.

Examples

excalidraw collections scenes list <collectionId>
excalidraw collections scenes list <collectionId> --limit 100
excalidraw collections scenes list <collectionId> --all --output table

Notes

  • With --all the output is { count, data } instead of a single page with hasNextPage.

scenes create

Create a scene in the selected collection. With --file, write its drawing content in the same run; without it, the scene starts empty.

excalidraw collections scenes create [options] <collectionId>
ArgumentDescription
<collectionId>Collection ID to create the scene in.
OptionDescription
--name <name>Name for the new scene. Required.
--pinnedPin the scene in the workspace UI.
--file <file>Scene content JSON to write into the new scene; use - to read stdin.

Examples

excalidraw collections scenes create <collectionId> --name "Onboarding map"
excalidraw collections scenes create <collectionId> --name "Pinned board" --pinned
excalidraw collections scenes create <collectionId> --name "Imported" --file drawing.excalidraw

Notes

  • Without --file the created scene starts empty. Use excalidraw scenes content patch or excalidraw scenes content put to add canvas content.
  • With --file, a full Excalidraw export is written via PUT and a partial payload is merged via PATCH; see excalidraw scenes create --help.

Last updated on

On this page