CLI-Anything >-
git clone https://github.com/HKUDS/CLI-Anything
T=$(mktemp -d) && git clone --depth=1 https://github.com/HKUDS/CLI-Anything "$T" && mkdir -p ~/.claude/skills && cp -r "$T/inkscape/agent-harness/cli_anything/inkscape/skills" ~/.claude/skills/hkuds-cli-anything-de9791 && rm -rf "$T"
inkscape/agent-harness/cli_anything/inkscape/skills/SKILL.mdcli-anything-inkscape
A stateful command-line interface for vector graphics editing, following the same patterns as the GIMP and Blender CLI harnesses. Directly manipulates SVG (XML) documents with a JSON project format for state tracking.
Installation
This CLI is installed as part of the cli-anything-inkscape package:
pip install cli-anything-inkscape
Prerequisites:
- Python 3.10+
- inkscape must be installed on your system
Usage
Basic Commands
# Show help cli-anything-inkscape --help # Start interactive REPL mode cli-anything-inkscape # Create a new document cli-anything-inkscape document new -o project.json # Run with JSON output (for agent consumption) cli-anything-inkscape --json document info -p project.json
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-inkscape # Enter commands interactively with tab-completion and history
You can also start the REPL with a nonexistent project path. The CLI now seeds a new in-memory document instead of failing immediately:
cli-anything-inkscape --project /abs/path/new-title.inkscape-cli.json
Command Groups
Document
Document management commands.
| Command | Description |
|---|---|
| Create a new document |
| Open an existing project |
| Save the current project |
| Show document information |
| List available document profiles |
| Set the canvas size |
| Set the document units |
| Print raw project JSON |
Shape
Shape management commands.
| Command | Description |
|---|---|
| Add a rectangle |
| Add a circle |
| Add an ellipse |
| Add a line |
| Add a polygon |
| Add a path |
| Add a star |
| Remove a shape by index |
| Duplicate a shape |
| List all shapes/objects |
| Get detailed info about a shape |
Text
Text management commands.
| Command | Description |
|---|---|
| Add a text element; supports , , and for wrapped layouts |
| Set a text property (text, font-family, font-size, fill, box-width, box-height, line-height, etc.) |
| List all text objects |
Style
Style management commands.
| Command | Description |
|---|---|
| Set the fill color of an object |
| Set the stroke color (and optionally width) of an object |
| Set the opacity of an object (0.0-1.0) |
| Set an arbitrary style property on an object |
| Get the style properties of an object |
| List all available style properties |
Transform
Transform operations (translate, rotate, scale, skew).
| Command | Description |
|---|---|
| Translate (move) an object |
| Rotate an object |
| Scale an object |
| Skew an object horizontally |
| Skew an object vertically |
| Get the current transform of an object |
| Clear all transforms from an object |
Layer
Layer management commands.
| Command | Description |
|---|---|
| Add a new layer |
| Remove a layer by index |
| Move an object to a different layer |
| Set a layer property (name, visible, locked, opacity) |
| List all layers |
| Move a layer from one position to another |
| Get detailed info about a layer |
Path Group
Path boolean operations.
| Command | Description |
|---|---|
| Union of two objects |
| Intersection of two objects |
| Difference of two objects (A minus B) |
| Exclusion (XOR) of two objects |
| Convert a shape to a path |
| List available path boolean operations |
Gradient
Gradient management commands.
| Command | Description |
|---|---|
| Add a linear gradient |
| Add a radial gradient |
| Apply a gradient to an object |
| List all gradients |
Export Group
Export/render commands.
| Command | Description |
|---|---|
| Render the document to PNG |
| Export the document as SVG |
| Export the document as PDF (requires Inkscape) |
| List export presets |
Session
Session management commands.
| Command | Description |
|---|---|
| Show session status |
| Undo the last operation |
| Redo the last undone operation |
| Show undo history |
Examples
Create a New Project
Create a new inkscape project file.
cli-anything-inkscape document new -o myproject.json # Or with JSON output for programmatic use cli-anything-inkscape --json document new -o myproject.json
Interactive REPL Session
Start an interactive session with undo/redo support.
cli-anything-inkscape # 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.
cli-anything-inkscape --project myproject.json export pdf output.pdf --overwrite
Wrapped Text Layout
For title cards, chips, and portrait-safe panels, prefer wrapped text boxes instead of manually inserting line breaks:
cli-anything-inkscape --project title.json text add \ --text "Real capture + Veo cold open + Gemini score + thumbnail plate" \ --x 180 --y 470 --font-size 118 \ --box-width 1180 --box-height 260 --line-height 1.05 cli-anything-inkscape --project title.json text set 0 box-width 980 cli-anything-inkscape --project title.json text set 0 line-height 1.15
Notes:
wraps long copy into multiple exported SVGbox-width
lines.tspan
lets long copy fail safely instead of running off-canvas.box-height- Use wrapped text boxes for long-copy graphics before resorting to manual line breaking.
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 (
flag): Structured JSON for agent consumption--json
# Human output cli-anything-inkscape project info -p project.json # JSON output for agents cli-anything-inkscape --json project info -p project.json
For AI Agents
When using this CLI programmatically:
- Always use
flag for parseable output--json - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use absolute paths for all file operations
- Verify outputs exist after export operations
- Prefer wrapped text boxes for headlines and variable-length copy so layouts remain stable across edits
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