cli-anything-comfyui
Original:🇺🇸 English
Translated
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.
2installs
Sourcehkuds/cli-anything
Added on
NPX Install
npx skill4agent add hkuds/cli-anything cli-anything-comfyuiTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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:
bash
pip install cli-anything-comfyuiPrerequisites:
- Python 3.10+
- ComfyUI must be installed and running at http://localhost:8188
Usage
Basic Commands
bash
# 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 statsREPL Mode
Start an interactive session for exploratory use:
bash
cli-anything-comfyui repl
# Enter commands interactively with tab-completion and historyCommand Groups
Workflow
Workflow management commands.
| Command | Description |
|---|---|
| List saved workflows |
| Load a workflow from a JSON file |
| Validate a workflow JSON against the ComfyUI node graph |
Queue
Generation queue management.
| Command | Description |
|---|---|
| Queue a workflow for execution |
| Show current queue status (running and pending) |
| Clear the generation queue |
| Show prompt execution history |
| Interrupt the currently running generation |
Models
Model discovery commands.
| Command | Description |
|---|---|
| List available checkpoint models |
| List available LoRA models |
| List available VAE models |
| List available ControlNet models |
| Show detailed info for a specific node type |
| List all available node types |
Images
Generated image management.
| Command | Description |
|---|---|
| List generated images on the server |
| Download a specific generated image |
| Download all images from a prompt execution |
System
Server status and information.
| Command | Description |
|---|---|
| Show ComfyUI system statistics (GPU, CPU, memory) |
| Show ComfyUI server info and extensions |
Examples
Check System Status
bash
# Server stats
cli-anything-comfyui system stats
# Server info
cli-anything-comfyui system infoDiscover Available Models
bash
# List checkpoints
cli-anything-comfyui models checkpoints
# List LoRAs
cli-anything-comfyui models loras
# List all node types
cli-anything-comfyui models list-nodesQueue and Monitor Generation
bash
# 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 historyDownload Generated Images
bash
# 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 ./outputsOutput Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (flag): Structured JSON for agent consumption
--json
bash
# Human output
cli-anything-comfyui system stats
# JSON output for agents
cli-anything-comfyui --json system statsFor 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 ComfyUI is running with before other commands
system stats
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