跳到正文
Skillpedia
图片与图标58k · #3198

cli-anything-comfyui

它能做什么

这个技能让你的智能体通过命令行在 ComfyUI 中运行 AI 图像生成。适合使用 ComfyUI、想排队运行任务并收集结果而不打开应用的人。

适用场景

  • ✓当你想在 ComfyUI 中排队运行一个 AI 图像工作流的时候。
  • ✓当你想查看图像生成任务进度的时候。
  • ✓当你想把 ComfyUI 中生成的图片下载下来的时候。

技能链接

https://github.com/HKUDS/CLI-Anything/blob/main/comfyui/agent-harness/cli_anything/comfyui/skills/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/comfyui/agent-harness/cli_anything/comfyui/skills/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我在 ComfyUI 中排队运行我的人像工作流,任务完成后下载图片。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能通过 REST API 将你的工作流发送到 ComfyUI 服务器。它可以监控队列、管理模型,并下载已完成的图片。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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:

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 (--json flag): 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:

  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

常见问题

ComfyUI 需要处于运行状态吗?

需要,ComfyUI 必须已安装,并在 localhost 的 8188 端口上运行。

它可以管理模型吗?

可以,这个技能可以管理 ComfyUI 所使用的 AI 模型。

有可视界面吗?

没有,这个技能基于命令行,不过它也有用于交互的 REPL 模式。

详情

作者的原始描述

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.

repo: HKUDS/CLI-Anything

热度

GitHub 星标
58k
排名
#3198
许可证
Apache-2.0
更新时间
2026/9/21

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能