Install drawio-ai-kit
Requirements
- Node.js 20.6+ or Bun 1.4+ (the bundle runs on either)
- npm (ships with Node) or Bun to install it
Optional (everything else works without them):
- draw.io desktop app — enables
drawio-ai render(PNG/SVG export + vision self-check). If the binary isn’t on PATH, setDRAWIO_CLIto it. On headless Linux (no display), alsoapt install xvfband wrap exports withxvfb-run -a. - Graphviz (
brew install graphviz/apt install graphviz) — enablesvendor/autolayout.pyfor large graphs (>~15 nodes), including--tunedirection selection.
Install
npm i -g drawio-ai-kit
# or, with Bun:
bun add -g drawio-ai-kit
This puts the drawio-ai binary on PATH. The npm package is about 2 MB, so the install takes seconds.
Releases are published from CI with npm provenance, so each version traces back to its commit and workflow run.
Pin a version with drawio-ai-kit@2.0.1.
Release channels: npm latest tracks the v2 branch (every version bump on v2 publishes). Other versions
are published from vX.Y.Z git tags under the dist-tag release-<major>; install them by exact version.
One-line alternative: install.sh in this repo installs drawio-ai-kit@latest (Bun or npm), links the
drawio-ai command into ~/.local/bin and registers the skill. Use BIN_DIR=/dir or --bin-dir /dir for
another location, --version X.Y.Z to pin.
See the README Quick start. sh install.sh --dry-run prints what it would run. Before installing, it removes
old installs:
- global copies from npm or Bun, including old git installs
- old skills and pre-1.0 skill folders
- the pre-1.0 MCP entry
--no-clean skips that step.
As a project dependency (for scripts and TypeScript types): npm i drawio-ai-kit (or bun add drawio-ai-kit), then import { Diagram } from "drawio-ai-kit".
If ~/.local/bin (or your BIN_DIR) isn’t on PATH, the installer prints the export PATH=… line to add.
With a manual bun add -g, Bun’s own bin dir ~/.bun/bin must be on PATH instead.
The npm registry is the only supported source. Installing from git or GitHub
(npm i -g github:…, a clone) is not supported: dist/ is not in the repo. To work on the kit itself,
see CONTRIBUTING.md.
The CLI is a Bun-minified production bundle in dist/, built by CI at release (never committed). It runs on
plain Node or Bun, so npm users never need Bun. The package has no install scripts, so Bun’s
lifecycle-script blocking doesn’t affect it.
Add the skill
The kit ships ONE skill, skills/drawio/ (SKILL.md + references/ + workflows/), covering
AWS, Azure, GCP, Databricks, multi-cloud and BPMN. Install it with the skills CLI (auto-detects
Claude Code, Cursor, Codex, Gemini CLI, … and writes to each agent’s skill dir).
drawio-ai skill install hands the skill folder of the package you just installed to that CLI, so nothing is downloaded twice:
drawio-ai skill install # interactive: pick agents + scope
drawio-ai skill install -g -y # every detected agent, user-wide, no prompts
drawio-ai skill install -a claude-code -y
Any extra flags pass through to skills add. Install the skill this way only, from the npm package.
Do not use npx skills add sparklabx/drawio-ai-kit, which clones the repo.
Restart your agent after adding it. Try: “draw an AWS 3-tier web app”
Upgrading from an older version? Re-run install.sh, which removes the old skills and skill folders for you.
To do it by hand: npx skills remove drawio-aws drawio-azure drawio-gcp drawio-databricks drawio-bpmn.
Verify
drawio-ai --help
drawio-ai search s3
drawio-ai validate path/to/diagram.drawio
Source: INSTALL.md on GitHub ↗