Open source diagram editor for people, teams, and agents — one small JSON format (.adraw), a fast canvas, and tools so automation and humans stay in sync.
Website: autodraw.ink — free web canvas at /app, format spec at /spec, read-only share links at /v?d=….
Architecture and flow diagrams should be easy to sketch, hand off, and evolve. Autodraw keeps the loop simple: draw or generate a .adraw file, commit or share it, open it in the browser or native app, and let CLI / MCP do the same operations your editor does — so agents and CI can maintain diagrams next to code.
From the repo root after pnpm install, build the CLI once (pnpm build or pnpm --filter @maelstromlab/autodraw build), then:
npx -y @maelstromlab/autodraw init ./demo.adraw
npx -y @maelstromlab/autodraw add node ./demo.adraw --text "API" --x 200 --y 200
npx -y @maelstromlab/autodraw add node ./demo.adraw --text "Worker" --x 420 --y 220
npx -y @maelstromlab/autodraw add edge ./demo.adraw --from <first-id> --to <second-id> --preset 1
npx -y @maelstromlab/autodraw export ./demo.adraw --format svg --output ./demo.svgOpen autodraw.ink/app and drag in demo.adraw, or paste a share payload from the spec page. Same format everywhere.
git clone https://github.com/biering/autodraw.git
cd autodraw
pnpm install| What you want | Command |
|---|---|
| Web marketing + editor (Astro) | pnpm --filter web dev |
| Desktop UI in browser (Vite, no Rust) | pnpm dev |
| Full desktop (Tauri + Rust) | pnpm dev:tauri |
| All package builds | pnpm build |
| Tests | pnpm -r test |
The desktop app needs Rust and Tauri 2 prerequisites for native shells. If cargo is missing from PATH, try pnpm dev:tauri (it prepends ~/.cargo/bin when present).
.adrawv1 — UTF-8 JSON; validated in@autodraw/core. Full field list: autodraw.ink/spec.- CLI —
@maelstromlab/autodraw:npx -y @maelstromlab/autodraw …(orpnpm exec autodraw …when developing from this repo). - MCP + API — hosted on autodraw.ink: remote MCP at
/api/mcpand REST/api/diagrams(seeapps/web/README.md). The CLI addsautodraw cloud upload|pull|push|sharefor quick round-trips.
Agents can emit JSON that matches the spec, write .adraw files in-repo, or call CLI/MCP in CI. Share links (/v?d=…, /app?d=…) use gzip + base64url encoding — see the spec page for details.
| Package | Role |
|---|---|
apps/core |
Schema (Zod), node styles, routing, renderSVG() |
apps/editor |
React Flow editor (web + desktop) |
apps/app |
Tauri 2 shell, licensing, native export |
apps/web |
Astro site + public /app canvas |
apps/cli |
oclif CLI for scripts and agents (@maelstromlab/autodraw on npm) |
Contributions are welcome. Open an issue to discuss larger changes; small fixes and docs can go straight to a PR.
- Match existing style and keep diffs focused.
pnpm buildandpnpm -r testshould pass where relevant.- Formatting:
pnpm format/ Biome (biome.jsonat repo root).
Releases are driven by release-please (manifest mode). On each push to main, .github/workflows/cli-release.yaml runs release-please; it opens or updates a release PR when there are releasable commits under apps/cli/**. Merging that PR creates a Git tag and triggers a publish of @maelstromlab/autodraw to npm (bundles @autodraw/core into the CLI; core does not need to be on npm).
Conventional commits: release-please only considers changes in apps/cli/**. If you ship CLI behavior via apps/core/** only, add a companion commit scoped for the CLI (e.g. fix(cli): bump bundled core) so the release PR picks up the bump.
Configure the NPM_TOKEN secret on the repo. Branch protection must allow GitHub Actions to push release commits / open PRs, or supply a PAT.
@autodraw/core is workspace-only (private: true). Only @maelstromlab/autodraw is released to npm. Hosted MCP/API live on the web Worker (apps/web); configure the DIAGRAMS R2 binding in apps/web/wrangler.jsonc before PUT/POST work in production.
- CLI PDF export uses a raster page inside PDF for portability; the desktop app can produce vector PDF via Rust.
- Keyboard in the webview: undo/redo
Cmd/Ctrl+Z/Cmd+Shift+Z; file shortcuts match the native menu when running in Tauri.