cli-anything-blender
A stateful command-line interface for 3D scene editing, following the same patterns as the GIMP CLI harness. Uses a JSON scene description format with bpy script generation for actual Blender rendering.
Installation
This CLI is installed as part of the cli-anything-blender package:
Prerequisites:
- Python 3.10+
- blender (>= 4.2) must be installed on your system
Usage
Basic Commands
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
Command Groups
Scene
Scene management commands.
Object Group
3D object management commands.
Material
Material management commands.
Modifier Group
Modifier management commands.
Camera
Camera management commands.
Light
Light management commands.
Animation
Animation and keyframe commands.
Render Group
Render settings and output commands.
Preview
Real preview bundle capture and live preview session commands.
Typical bundle artifacts for recipe quick:
hero.pngfrom real Eevee preview renderingworkbench.pngfrom real Blender Workbench rendering
Live sessions persist:
session.jsonas the mutable head- immutable bundle directories
trajectory.jsonas append-only command-to-preview history
Viewer side:
cli-hub previews inspect <bundle-or-session>cli-hub previews html <bundle-or-session> -o page.htmlcli-hub previews watch <session-dir> --opencli-hub previews open <bundle-or-session>
Session
Session management commands.
Examples
Create a New Project
Create a new Blender scene project file.
Interactive REPL Session
Start an interactive session with undo/redo support.
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
Preview Workflow
Use Blender previews when the agent needs truthful visual checkpoints:
For agents, preview capture --json returns bundle metadata plus artifact file
paths. preview live status --json returns session metadata plus a compact
trajectory_summary.
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
- MANDATORY: Use absolute paths for all file operations (rendering, project files). Relative paths are prone to failure in background execution.
- Use
preview captureorpreview live ...for visual verification instead of inferring scene quality from JSON alone - Read returned artifact paths such as
hero.pngandworkbench.png; the JSON payload references files, it does not inline image bytes - Treat
_bundle_diras one snapshot only; for stable live history, use_session_dirplus_trajectory_path - Use
cli-hub previews ...only to inspect/open existing previews; preview generation itself always happens throughcli-anything-blender preview ...
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

