Agent skill
cli-anything-comfyui
Command-line interface for ComfyUI - AI image generation workflow management via ComfyUI REST API. Designed for AI agents and power users who need to queue workflows, manage models, download generated images, and monitor the generation queue without a GUI.
Install this agent skill to your Project
npx add-skill https://github.com/HKUDS/CLI-Anything/tree/main/comfyui/agent-harness/cli_anything/comfyui/skills
SKILL.md
cli-anything-comfyui
AI image generation workflow management via the ComfyUI REST API. Designed for AI agents and power users who need to queue workflows, manage models, download generated images, and monitor the generation queue without a GUI.
Installation
This CLI is installed as part of the cli-anything-comfyui package:
pip install cli-anything-comfyui
Prerequisites:
- Python 3.10+
- ComfyUI must be installed and running at http://localhost:8188
Usage
Basic Commands
# Show help
cli-anything-comfyui --help
# Start interactive REPL mode
cli-anything-comfyui repl
# Check server stats
cli-anything-comfyui system stats
# Run with JSON output (for agent consumption)
cli-anything-comfyui --json system stats
REPL Mode
Start an interactive session for exploratory use:
cli-anything-comfyui repl
# Enter commands interactively with tab-completion and history
Command Groups
Workflow
Workflow management commands.
| Command | Description |
|---|---|
list |
List saved workflows |
load |
Load a workflow from a JSON file |
validate |
Validate a workflow JSON against the ComfyUI node graph |
Queue
Generation queue management.
| Command | Description |
|---|---|
prompt |
Queue a workflow for execution |
status |
Show current queue status (running and pending) |
clear |
Clear the generation queue |
history |
Show prompt execution history |
interrupt |
Interrupt the currently running generation |
Models
Model discovery commands.
| Command | Description |
|---|---|
checkpoints |
List available checkpoint models |
loras |
List available LoRA models |
vaes |
List available VAE models |
controlnets |
List available ControlNet models |
node-info |
Show detailed info for a specific node type |
list-nodes |
List all available node types |
Images
Generated image management.
| Command | Description |
|---|---|
list |
List generated images on the server |
download |
Download a specific generated image |
download-all |
Download all images from a prompt execution |
System
Server status and information.
| Command | Description |
|---|---|
stats |
Show ComfyUI system statistics (GPU, CPU, memory) |
info |
Show ComfyUI server info and extensions |
Examples
Check System Status
# Server stats
cli-anything-comfyui system stats
# Server info
cli-anything-comfyui system info
Discover Available Models
# List checkpoints
cli-anything-comfyui models checkpoints
# List LoRAs
cli-anything-comfyui models loras
# List all node types
cli-anything-comfyui models list-nodes
Queue and Monitor Generation
# Queue a workflow
cli-anything-comfyui queue prompt --workflow my_workflow.json
# Check queue status
cli-anything-comfyui queue status
# View execution history
cli-anything-comfyui --json queue history
Download Generated Images
# List generated images
cli-anything-comfyui images list
# Download a specific image
cli-anything-comfyui images download --filename ComfyUI_00001_.png --output ./out.png
# Download all images from a prompt
cli-anything-comfyui images download-all --prompt-id <id> --output-dir ./outputs
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
# Human output
cli-anything-comfyui system stats
# JSON output for agents
cli-anything-comfyui --json system stats
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 ComfyUI is running with
system statsbefore other commands
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
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
cli-anything-sts2
Command-line interface for Slay the Spire 2 - Control the real game through a local bridge mod HTTP API. Reads normalized game state and sends action commands for combat, navigation, rewards, and menu management.
musescore
CLI for music notation — transpose, export PDF/audio/MIDI, extract parts, manage instruments
cli-anything-videocaptioner
AI-powered video captioning — transcribe speech, optimize/translate subtitles, burn into video with beautiful customizable styles (ASS outline or rounded background). Free ASR and translation included.
cli-anything-openscreen
Command-line interface for Openscreen — a screen recording editor. A stateful CLI for editing screen recordings with zoom, speed ramps, trim, crop, annotations, and polished exports. Built on the Openscreen JSON project format with ffmpeg as the rendering backend. Designed for AI agents and power users who need programmatic video editing.
cli-anything-adguardhome
Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI agents and power users who need to manage filtering, DNS rewrites, clients, DHCP, and query logs without a GUI.
cli-anything-intelwatch
Zero friction. Full context. Competitive intelligence, M&A due diligence, and OSINT directly from your terminal. Uses Node.js/npx.
Didn't find tool you were looking for?