|
|
The EazyDraw Automation API A real scripting foundation — better than AppleScript. |
|
EazyDraw includes a local Automation API — a lightweight web service, running inside EazyDraw on your own Mac, that lets a script open and control your drawings. It speaks ordinary REST and JSON over HTTP, so any language that can make a web request can drive EazyDraw: Python, a shell script, JavaScript, Swift, Go, or a Jupyter notebook. It is ideal for batch production, assembling drawings from your library content, connecting EazyDraw to other tools, and — through the same interface — AI-assisted authoring. The service stays off until you turn it on, listens only on your own machine, and requires a private access token on every request. You are always in control of when it runs and what can reach it. Why not AppleScript? Mac drawing programs have traditionally been scripted with AppleScript. It works, but it is a single Mac-only language, its references are positional, and its data does not travel to other tools. The EazyDraw Automation API was designed from the start as a modern, general-purpose foundation:
• Language-agnostic. It is plain REST + JSON on
• Real data structures. Every response is JSON — typed sub-objects like • Stable identity across edits and sessions. Every drawing, layer, and graphic carries a persistent UUID. You can name an object once and refer to it reliably, even after it has been moved, restyled, or reshaped — the identifier survives. Positional, “the third rectangle” references break the moment a drawing changes; UUID references do not. • Works from the shell, CI, and notebooks. Requests are stateless HTTP calls with a bearer token — no GUI session to script, no scripting dictionary to host. Run them from a build pipeline, a cron job, or an interactive notebook.
• A self-documenting, versioned contract. Every endpoint is documented, versioned under • It doubles as your AI foundation. The very same interface is what connects EazyDraw to AI assistants like Claude. Build a script today; the door to agent-assisted drawing is already open. See EazyDraw and Claude. What you can automate The API covers the drawing, not just the file. A script can:
• Open and manage documents — open EazyDraw, SVG, PDF, DXF, and image files; read page setup, grid, scale, and the current viewport; read and set document metadata. Rich text, by range The newest addition is precise, non-destructive control of text. A script reads a text object’s styled runs — every span of the string with the attributes in effect — and edits them by character range or by matching a word. Highlight every occurrence of a term, color one phrase, set a heading bold and larger, align a paragraph, add a drop shadow — without disturbing the rest of the text. Because reading and writing use the same vocabulary, a run read from the drawing can be written straight back, unchanged. Text objects report whether the new content fits their box, so a script can shrink to fit or let linked boxes reflow — EazyDraw never silently resizes your layout. Python and the command line A companion Python package makes scripting immediate. Install it with:
Then open a drawing, address a text object by name, and fill it — the client returns ordinary Python dictionaries. Or reach the same endpoints directly with Turning it on Open EazyDraw Settings, click the Automation API button, generate an access token, and turn the service on. It listens on a configurable local port (52737 by default). The step-by-step guide, including the Settings panel, is in Help. Learn more
• EazyDraw Automation API Reference — every request and response, status codes, and examples.
|
|