Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

cli-anything-drawio — Claude Code skill: what it does, how to install

A command-line harness over Draw.io: the skill hands your agent commands to build a diagram step by step and export it to PNG, PDF or SVG.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add HKUDS/CLI-Anything --skill cli-anything-drawio -a claude-code
Open on GitHub

What cli-anything-drawio does

cli-anything-drawio wraps Draw.io in a command-line harness the agent can call. A diagram is a project file, and the agent builds it piece by piece: project new -o myproject.json, then shape add, connect add, labels and coordinates. export render writes the result out as PNG, PDF or SVG.

The commands sit in six groups: project, shape, connect, page, export, session. Session carries undo and redo with up to 50 steps of history, so a bad edit gets rolled back without redrawing anything. Run it with no subcommand and you land in a REPL with tab-completion and history. Add --json and the output turns structured, which an agent can parse instead of reading tables.

You need Python 3.10 and drawio installed on the machine, plus the CLI itself through pip install cli-anything-drawio. Export leans on that local drawio install, so check it before asking the agent to draw. The docs also push absolute paths and return-code checks: 0 means success.

What it helps with

  • build a flow diagram from shapes and connectors
  • change one shape label or its coordinates without redrawing the file
  • export the diagram to PDF, PNG or SVG
  • roll back a bad edit with undo
  • get JSON output the agent can parse without scraping tables

Example prompts for the agent

  • Create `myproject.json` with three boxes connected in a row, then render it to `output.svg`.
  • Open `myproject.json`, list the shapes on the first page and move the top box to the left.
  • Undo the last change and show the session status.

How to install cli-anything-drawio

1Skills CLI (Vercel)

npx skills add HKUDS/CLI-Anything --skill cli-anything-drawio -a claude-code

2Manually: put the files in place

~/.claude/skills/cli-anything-drawio/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cli-anything-drawio/

From the same set18

The whole set →
cli-hub-meta-skill HKUDS A skill that gives agents a catalog of professional command-line tools built for AI. Search, install, and run CLIs for video, design, AI, and development without leaving your editor. Claude Code CX Codex Cursor +1 5,300installs cli-anything HKUDS Builds a Python harness with Click commands for any GUI application or repository. Generates REPL, tests, and docs following the CLI-Anything methodology. Claude Code CX Codex Cursor +1 2,100installs cli-anything-blender HKUDS A skill that adds a stateful command-line interface for editing Blender 3D scenes. Use it when an agent needs to assemble a scene, assign materials, or render a frame without manual clicking. Claude Code CX Codex Cursor +1 941installs cli-anything-obsidian HKUDS Manage an Obsidian vault from the terminal: read, create, search, and update notes or run editor commands. It suits agents that need to work without the GUI. Claude Code CX Codex Cursor +1 917installs cli-anything-notebooklm HKUDS Experimental harness to manage Google NotebookLM through a local CLI. It lets agents list notebooks, query sources, generate artifacts, and download files. Claude Code CX Codex Cursor +1 801installs cli-anything-libreoffice HKUDS Skill for creating and editing Writer, Calc, and Impress documents from the CLI without a GUI. Produces real ODF files (ZIP with XML) — useful when an AI agent needs to assemble a report, spreadsheet, or presentation programmatically. Claude Code CX Codex Cursor +1 669installs cli-anything-freecad HKUDS Turns FreeCAD into a scriptable CLI for your agent: 258 commands for primitives, sketches, PartDesign features and headless export. Claude Code CX Codex Cursor +1 643installs cli-anything-gimp HKUDS Provides a stateful image editing CLI built on Pillow and GIMP for AI agents. It handles layers, drawing, and headless rendering without a GUI. Claude Code CX Codex Cursor +1 609installs

Similar

delegate-setup amElnagdy This skill sets up delegation lanes: which implementer CLI takes feature, test or UI work, with a model and an effort dial. It writes config only after you say yes. Claude Code CX Codex Cursor +1 5,800installs gmgn-portfolio GMGNAI Skill analyzes crypto wallets by address via GMGN API: shows holdings, realized and unrealized P&L, win rate, trade history, and tokens created by a developer wallet. Works on Solana, BSC, Base, and Ethereum. Claude Code CX Codex Cursor +1 17,500installs iot-fleet ruvnet Manages Cognitum Seed device fleets through the cognitum-iot command line tool. It creates groups, lists fleets, and modifies device membership. Claude Code CX Codex Cursor +1 764installs dsql awslabs A deprecated compatibility redirect that points the agent to the canonical Aurora DSQL skill. Use it when old dsql references still appear in a project. Claude Code CX Codex Cursor +1 540installs code-documentation-code-explain sickn33 A skill that transforms tangled code into clear explanations with diagrams and step-by-step walkthroughs. Use it to understand unfamiliar code fast or prepare learning materials. Claude Code CX Codex Cursor +1 1,000installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs writing-plans Jesse Vincent This skill turns requirements for a multi-step task into an implementation plan before code changes begin. It helps when another engineer needs exact files, interfaces, and checks. Claude Code CX Codex 282,859installs

Questions about cli-anything-drawio

How do I install cli-anything-drawio in Claude Code?

Run npx skills add HKUDS/CLI-Anything --skill cli-anything-drawio -a claude-code. The skill file then sits at ~/.claude/skills/cli-anything-drawio/SKILL.md.

What does cli-anything-drawio do?

It gives the agent a command line over Draw.io: new projects, shapes, connectors, pages, and export to PNG, PDF or SVG.

What do I need for the skill to work?

Python 3.10 and drawio installed on the system. The CLI itself is a separate install: pip install cli-anything-drawio.

Source text

SKILL.md · Apache-2.0
---
name: "cli-anything-drawio"
description: >-
  Command-line interface for Drawio - A CLI harness for **Draw.io** — create, edit, and export diagrams from the command line....
---

# cli-anything-drawio

A CLI harness for **Draw.io** — create, edit, and export diagrams from the command line.

## Installation

This CLI is installed as part of the cli-anything-drawio package:

```bash
pip install cli-anything-drawio
```

**Prerequisites:**
- Python 3.10+
- drawio must be installed on your system


## Usage

### Basic Commands

```bash
# Show help
cli-anything-drawio --help

# Start interactive REPL mode
cli-anything-drawio

# Create a new project
cli-anything-drawio project new -o project.json

# Run with JSON output (for agent consumption)
cli-anything-drawio --json project info -p project.json
```

### REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

```bash
cli-anything-drawio
# Enter commands interactively with tab-completion and history
```


## Command Groups


### Project

Project management: new, open, save, info.

| Command | Description |
|---------|-------------|
| `new` | Create a new blank diagram |
| `open` | Open an existing .drawio project file |
| `save` | Save the current project |
| `info` | Show detailed project information |
| `xml` | Print the raw XML of the current project |
| `presets` | List available page size presets |


### Shape

Shape operations: add, remove, move, resize, style.

| Command | Description |
|---------|-------------|
| `add` | Add a shape to the diagram |
| `remove` | Remove a shape by ID |
| `list` | List all shapes on a page |
| `label` | Update a shape's label text |
| `move` | Move a shape to new coordinates |
| `resize` | Resize a shape |
| `style` | Set a style property on a shape |
| `info` | Show detailed info about a shape |
| `types` | List all available shape types |


### Connect

Connector operations: add, remove, style.

| Command | Description |
|---------|-------------|
| `add` | Add a connector between two shapes |
| `remove` | Remove a connector by ID |
| `label` | Update a connector's label |
| `style` | Set a style property on a connector |
| `list` | List all connectors on a page |
| `styles` | List available edge styles |


### Page

Page operations: add, remove, rename, list.

| Command | Description |
|---------|-------------|
| `add` | Add a new page |
| `remove` | Remove a page by index |
| `rename` | Rename a page |
| `list` | List all pages |


### Export

Export operations: render to PNG, PDF, SVG.

| Command | Description |
|---------|-------------|
| `render` | Export the diagram to a file |
| `formats` | List available export formats |


### Session

Session management: status, undo, redo.

| Command | Description |
|---------|-------------|
| `status` | Show current session status |
| `undo` | Undo the last operation |
| `redo` | Redo the last undone operation |
| `save-state` | Save session state to disk |
| `list` | List all saved sessions |




## Examples


### Create a New Project

Create a new drawio project file.

```bash
cli-anything-drawio project new -o myproject.json
# Or with JSON output for programmatic use
cli-anything-drawio --json project new -o myproject.json
```


### Interactive REPL Session

Start an interactive session with undo/redo support.

```bash
cli-anything-drawio
# Enter commands interactively
# Use 'help' to see available commands
# Use 'undo' and 'redo' for history navigation
```


### Export Project

Export the project to a final output format.

```bash
cli-anything-drawio --project myproject.json export render output.pdf --overwrite
```


## State Management

The CLI maintains session state with:

- **Undo/Redo**: Up to 50 levels of history
- **Project persistence**: Save/load project state as JSON
- **Session tracking**: Track modifications and changes

## Output Formats

All commands support dual output modes:

- **Human-readable** (default): Tables, colors, formatted text
- **Machine-readable** (`--json` flag): Structured JSON for agent consumption

```bash
# Human output
cli-anything-drawio project info -p project.json

# JSON output for agents
cli-anything-drawio --json project info -p project.json
```

## For AI Agents

When using this CLI programmatically:

1. **Always use `--json` flag** for parseable output
2. **Check return codes** - 0 for success, non-zero for errors
3. **Parse stderr** for error messages on failure
4. **Use absolute paths** for all file operations
5. **Verify outputs exist** after export operations

## More Information

- Full documentation: See README.md in the package
- Test coverage: See TEST.md in the package
- Methodology: See HARNESS.md in the cli-anything-plugin

## Version

1.0.0

© HKUDS · Apache-2.0 · HKUDS/CLI-Anything

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor