Skip to main content
skill CX Codex

cli-anything-comfyui — Claude Code skill: ComfyUI CLI

A skill that hands your coding agent a terminal for ComfyUI, so it can queue workflows, browse models and pull finished images without a GUI in the way.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add HKUDS/CLI-Anything --skill cli-anything-comfyui -a claude-code
Open on GitHub

What cli-anything-comfyui does

The skill turns ComfyUI into something your agent can drive from the shell. Queue a workflow, see what is running, interrupt it, list checkpoints and LoRAs, download the PNGs when the run finishes. Commands come in five groups: workflow, queue, models, images and system.

It is a Python package sitting on top of the ComfyUI REST API. A repl mode adds tab-completion and command history if you want to poke at things by hand. Every command accepts --json and returns structured output, which is how the skill tells agents to call it, plus a non-zero exit code and stderr text when something fails.

Before any of this works you need Python 3.10+ and a ComfyUI instance already listening on port 8188. Nothing answers until that server is up, so run system stats first instead of queueing blind. For downloads, images download takes --filename and --output, and absolute paths save you from hunting for a file in the wrong directory.

What it helps with

  • queue a workflow from a JSON file
  • list which checkpoints and LoRAs the server already has
  • interrupt a generation that is running too long
  • download every image from a single prompt
  • validate a workflow against the node graph before running it

Example prompts for the agent

  • Check that ComfyUI is up: cli-anything-comfyui system stats
  • Queue my_workflow.json and show me the queue status
  • Download all images from prompt <id> into ./outputs

How to install cli-anything-comfyui

1Skills CLI (Vercel)

npx skills add HKUDS/CLI-Anything --skill cli-anything-comfyui -a claude-code

2Manually: put the files in place

~/.claude/skills/cli-anything-comfyui/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cli-anything-comfyui/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cli-anything-comfyui

How do I install cli-anything-comfyui in Claude Code?

Run npx skills add HKUDS/CLI-Anything --skill cli-anything-comfyui -a claude-code. The skill then sits at ~/.claude/skills/cli-anything-comfyui/SKILL.md.

What does cli-anything-comfyui do?

It drives ComfyUI from the command line over its REST API: queue prompts, list models and node types, download generated images, read server stats. Built for agents and for people who would rather not click through the GUI.

What do I need before using it?

Python 3.10+ and ComfyUI already running on port 8188. The CLI itself installs separately with pip install cli-anything-comfyui.

Source text

SKILL.md · Apache-2.0
---
name: "cli-anything-comfyui"
description: >-
  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.
---

# 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-comfyui
```

**Prerequisites:**
- 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 stats
```

### REPL Mode

Start an interactive session for exploratory use:

```bash
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

```bash
# Server stats
cli-anything-comfyui system stats

# Server info
cli-anything-comfyui system info
```

### Discover 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-nodes
```

### Queue 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 history
```

### Download 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 ./outputs
```

## Output Formats

All commands support dual output modes:

- **Human-readable** (default): Tables, colors, formatted text
- **Machine-readable** (`--json` flag): Structured JSON for agent consumption

```bash
# 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:

1. **Always use `--json` flag** for parseable output
2. **Check return codes** - 0 for success, non-zero for errors
3. **Parse stderr** for error messages on failure
4. **Use absolute paths** for all file operations
5. **Verify ComfyUI is running** with `system stats` before 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

© HKUDS · Apache-2.0 · HKUDS/CLI-Anything

Similar skills

Everything for AI and ML →

From the same set55

cli-anything-gimp Provides a stateful image editing CLI built on Pillow and GIMP for AI agents. It handles layers, drawing, and headless rendering without a GUI. CX Codex +1 617installs cli-anything-inkscape Stateful command-line interface skill for editing vector graphics in Inkscape, tracking project state in JSON, and manipulating SVG documents. CX Codex +1 605installs cli-anything-browser This skill maps Chrome's Accessibility Tree to a virtual filesystem. Agents navigate pages, inspect elements, and click buttons with standard terminal commands. CX Codex +1 594installs cli-anything-godot Controls Godot projects from the command line, including scenes, GDScript runs, and exports. Useful when an agent needs to change or inspect a game project. CX Codex +1 548installs cli-anything-ollama Skill for working with local LLMs through the Ollama REST API directly from your editor. Lets agents run models, generate text, chat, and create embeddings without a GUI. CX Codex +1 542installs cli-anything-kdenlive Controls Kdenlive video editing through a stateful terminal tool. Helps coding agents build timelines, apply filters, and export projects to MLT XML without manual GUI work. CX Codex +1 536installs cli-anything-qgis Drives a QGIS project from the shell: GeoPackage layers, WKT features, print layouts, PDF export and qgis_process algorithms. Useful when the map has to be built without clicking. CX Codex +1 534installs cli-anything-audacity A skill that puts a stateful Audacity CLI in your agent's hands: edit tracks, clips and effects, then render without opening the GUI. CX Codex +1 530installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor