tldraw-api
Installation
SKILL.md
tldraw API
Operate the installed tldraw Desktop app through its authenticated localhost API. Prefer this skill over UI automation when the app is running and the task can be expressed as editor records or document scripts.
Start safely
- Require tldraw Desktop to be running with at least one document open.
- Run
scripts/tldraw_api.sh docsto discover document IDs and file paths. - Read the target with
shapesbefore mutating it. Preserve shapes unrelated to the request. - Use stable semantic IDs such as
shape:payments-api, not random IDs, when reruns may occur. - Never print or persist the bearer token. The wrapper reads it dynamically from tldraw's
server.json. - Never edit an open
.tldrawarchive directly. Mutate it through/execor its script workspace, then save through tldraw.
The wrapper requires curl and jq. Set TLDRAW_STATE_FILE only when tldraw stores server.json outside its normal platform location.