cli-anything-gimp
A stateful command-line interface for image editing, built on Pillow. Designed for AI agents and power users who need to create and manipulate images without a GUI.
Installation
This CLI is installed as part of the cli-anything-gimp package:
Prerequisites:
- Python 3.10+
- gimp is recommended for native batch rendering, but layered compositions can
still render through the built-in Pillow path when GIMP is unavailable or when
deferred
drawoperations are present
Usage
Basic Commands
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
Command Groups
Project
Project management commands.
Layer
Layer management commands.
Canvas
Canvas operations.
Filter Group
Filter management commands.
Media
Media file operations.
Export Group
Export/render commands.
Session
Session management commands.
Draw
Drawing operations (applied at render time).
Examples
Create a New Project
Create a new gimp project file.
Interactive REPL Session
Start an interactive session with undo/redo support.
Export Project
Export the project to a final output format.
Layered Composition Workflow
For overlay-heavy compositions:
Notes:
layer setnow accepts negativeoffset_xandoffset_yvalues in both command mode and REPL mode.draw textanddraw rectare render-time operations. Treat the exported image, not only the project JSON, as the thing to review.- For projects with deferred draw ops, expect the Pillow render path to be the stable default even if GIMP is installed.
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
- Review rendered outputs after offset, draw, blend-mode, or filter changes instead of trusting saved project state alone
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

