cli-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:
Prerequisites:
- Python 3.10+
- inkscape must be installed on your system
Usage
Basic Commands
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
You can also start the REPL with a nonexistent project path. The CLI now seeds a new in-memory document instead of failing immediately:
Command Groups
Document
Document management commands.
Shape
Shape management commands.
Text
Text management commands.
Style
Style management commands.
Transform
Transform operations (translate, rotate, scale, skew).
Layer
Layer management commands.
Path Group
Path boolean operations.
Gradient
Gradient management commands.
Export Group
Export/render commands.
Session
Session management commands.
Examples
Create a New Project
Create a new inkscape project file.
Interactive REPL Session
Start an interactive session with undo/redo support.
Export Project
Export the project to a final output format.
Wrapped Text Layout
For title cards, chips, and portrait-safe panels, prefer wrapped text boxes instead of manually inserting line breaks:
Notes:
box-widthwraps long copy into multiple exported SVGtspanlines.box-heightlets long copy fail safely instead of running off-canvas.- 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 (
--jsonflag): Structured JSON for agent consumption
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - 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.1

