AI and automation
Command line
The isodraw command line tool, for people, scripts, CI and coding agents like Claude Code and Codex.
The isodraw CLI reads and changes diagrams and their docs from a terminal. It's built for coding agents as much as for people: every command takes --json, items are named by label, and new items are placed for you.
The CLI isn't on npm yet. Until it is, build it from the GitHub repo: it needs Node 20 or later.
git clone https://github.com/anothrNick/isodraw && cd isodraw
npm install
npm run build -w @isodraw/cli
(cd packages/cli && npm link) # puts `isodraw` on your PATHSign in
isodraw loginThis opens IsoDraw in your browser to choose a workspace and read or write access, then saves a token on this machine. For CI, or a machine without a browser, create an API token and use isodraw login --token isd_…, or set ISODRAW_TOKEN.
isodraw whoami # who you are, which workspace, read or write
isodraw logout # revoke this machine's token and forget itCommands
Diagrams are named by id or title, and items by id or label. Add --json to any command for JSON output.
Diagrams
isodraw diagrams list
isodraw diagrams create --title "Payments" [--file diagram.json]
isodraw diagrams get <diagram> # the full diagram JSON
isodraw diagrams rename <diagram> <title>
isodraw diagrams delete <diagram> --yesReading
isodraw describe <diagram> [--level a/b] # components, areas, connections and docs of a level
isodraw docs get <diagram> [--item X] [--level a/b]
isodraw preview <diagram> [--level a/b] # picture links (PNG and SVG), plus the app link
isodraw icons [search] # icons for --icon, by Terraform resource typeChanging
isodraw nodes add <diagram> --label "Redis" --icon aws_elasticache_cluster --near "API"
isodraw nodes update <diagram> <item> [--label L] [--color #hex] [--kind K] [--icon T]
isodraw nodes remove <diagram> <item>
isodraw edges add <diagram> "API" "Redis" --label cache [--style solid|dashed|dotted]
isodraw edges remove <diagram> <from> <to>
isodraw docs set <diagram> --item "Redis" --file redis.md # or Markdown on stdin
isodraw apply <diagram> --file changes.json [--dry-run] # many changes at once
isodraw layout <diagram> [--level a/b] # lay out a level by flowapply takes the same change format as the MCP server's apply_changes.
Import and export
isodraw import terraform state.json --title "Production"
isodraw export <diagram> --format json|mdCoding agents
Agents like Claude Code and Codex use the CLI through their shell. isodraw guide prints instructions written for them: the change format, levels, batch sizes and what to do when a call fails. The repo also has an isodraw skill for Claude Code in .claude/skills/isodraw/.
To serve IsoDraw's tools over stdio instead, for apps that run local MCP servers, use isodraw mcp. For most apps, the hosted MCP server is simpler.
Configuration
| Setting | How to set it |
|---|---|
| Server | --server, ISODRAW_SERVER, or the saved config. Defaults to https://isodraw.app. |
| Token | ISODRAW_TOKEN, or isodraw login |
| Saved config | ~/.config/isodraw/config.json |