comfyui-skill-cli 0.1.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- comfyui_skill_cli-0.2.2/PKG-INFO +229 -0
- comfyui_skill_cli-0.2.2/README.md +201 -0
- comfyui_skill_cli-0.2.2/comfyui_skill_cli.egg-info/PKG-INFO +229 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skill_cli.egg-info/SOURCES.txt +5 -1
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/client.py +70 -0
- comfyui_skill_cli-0.2.2/comfyui_skills_cli/commands/config.py +231 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/commands/deps.py +83 -17
- comfyui_skill_cli-0.2.2/comfyui_skills_cli/commands/history.py +96 -0
- comfyui_skill_cli-0.2.2/comfyui_skills_cli/commands/server.py +161 -0
- comfyui_skill_cli-0.2.2/comfyui_skills_cli/commands/upload.py +46 -0
- comfyui_skill_cli-0.2.2/comfyui_skills_cli/commands/workflow.py +657 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/config.py +20 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/main.py +7 -2
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/output.py +27 -3
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/pyproject.toml +1 -1
- comfyui_skill_cli-0.1.0/PKG-INFO +0 -139
- comfyui_skill_cli-0.1.0/README.md +0 -111
- comfyui_skill_cli-0.1.0/comfyui_skill_cli.egg-info/PKG-INFO +0 -139
- comfyui_skill_cli-0.1.0/comfyui_skills_cli/commands/server.py +0 -57
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/LICENSE +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skill_cli.egg-info/dependency_links.txt +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skill_cli.egg-info/entry_points.txt +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skill_cli.egg-info/requires.txt +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skill_cli.egg-info/top_level.txt +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/__init__.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/__main__.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/commands/__init__.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/commands/run.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/commands/skill.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/comfyui_skills_cli/storage.py +0 -0
- {comfyui_skill_cli-0.1.0 → comfyui_skill_cli-0.2.2}/setup.cfg +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: comfyui-skill-cli
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: ComfyUI Skill CLI — Agent-friendly workflow management
|
|
5
|
+
Author: HuangYuChuh
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI
|
|
8
|
+
Project-URL: Repository, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI
|
|
9
|
+
Project-URL: Issues, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI/issues
|
|
10
|
+
Keywords: comfyui,cli,agent,skill,workflow,ai,image-generation
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: typer>=0.9
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Requires-Dist: requests>=2.28
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# ComfyUI Skill CLI
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
<pre>
|
|
33
|
+
+--------------------------------------------------+
|
|
34
|
+
| |
|
|
35
|
+
| ____ __ _ _ ___ |
|
|
36
|
+
| / ___|___ _ __ ___ / _|_ _| | | |_ _| |
|
|
37
|
+
| | | / _ \| '_ ` _ \| |_| | | | | | || | |
|
|
38
|
+
| | |__| (_) | | | | | | _| |_| | |_| || | |
|
|
39
|
+
| \____\___/|_| |_| |_|_| \__, |\___/|___| |
|
|
40
|
+
| |___/ |
|
|
41
|
+
| ____ _ _ _ _ ____ _ ___ |
|
|
42
|
+
| / ___|| | _(_) | | / ___| | |_ _| |
|
|
43
|
+
| \___ \| |/ / | | | | | | | | | |
|
|
44
|
+
| ___) | <| | | | | |___| |___ | | |
|
|
45
|
+
| |____/|_|\_\_|_|_| \____|_____|___| |
|
|
46
|
+
| |
|
|
47
|
+
+--------------------------------------------------+
|
|
48
|
+
</pre>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
[中文版](./README.zh.md) | [English](./README.md)
|
|
52
|
+
|
|
53
|
+
Agent-friendly command-line tool for managing and executing [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflow skills. Any AI agent that can run shell commands (Claude, Codex, OpenClaw, etc.) can use ComfyUI through this CLI.
|
|
54
|
+
|
|
55
|
+
[Install](#install) · [Quick Start](#quick-start) · [Commands](#commands) · [For AI Agents](#for-ai-agents)
|
|
56
|
+
|
|
57
|
+
## Why comfyui-skill?
|
|
58
|
+
|
|
59
|
+
- **Agent-native** — structured JSON output, pipe-friendly, designed for AI agents to call
|
|
60
|
+
- **Zero config** — reads `config.json` and `data/` from the current directory, no setup needed
|
|
61
|
+
- **Full lifecycle** — discover, import, execute, manage workflows and dependencies in one tool
|
|
62
|
+
- **Multi-server** — manage multiple ComfyUI instances, route jobs to different hardware
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pipx install comfyui-skill-cli
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Development Mode
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/HuangYuChuh/ComfyUI_Skill_CLI.git
|
|
74
|
+
cd ComfyUI_Skill_CLI
|
|
75
|
+
pipx install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The `-e` flag (editable) links directly to your local source — any code change is reflected instantly.
|
|
79
|
+
|
|
80
|
+
### Update
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pipx upgrade comfyui-skill-cli
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# 1. Go to your ComfyUI Skills project directory
|
|
90
|
+
cd /path/to/your-skills-project
|
|
91
|
+
|
|
92
|
+
# 2. Check server status
|
|
93
|
+
comfyui-skill server status
|
|
94
|
+
|
|
95
|
+
# 3. List available workflows
|
|
96
|
+
comfyui-skill list
|
|
97
|
+
|
|
98
|
+
# 4. Execute a workflow
|
|
99
|
+
comfyui-skill run local/txt2img --args '{"prompt": "a white cat"}'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Every command supports `--json` for structured output.
|
|
103
|
+
|
|
104
|
+
## ID Convention
|
|
105
|
+
|
|
106
|
+
This CLI uses two types of IDs:
|
|
107
|
+
|
|
108
|
+
| Notation | Meaning | Example |
|
|
109
|
+
|----------|---------|---------|
|
|
110
|
+
| `<workflow_id>` | Workflow identifier, format: `server_id/workflow_name` | `local/txt2img` |
|
|
111
|
+
| `<server_id>` | Server identifier | `local`, `remote-a100` |
|
|
112
|
+
|
|
113
|
+
When `<workflow_id>` omits the server prefix, the default server is used:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
comfyui-skill run local/txt2img # explicit server
|
|
117
|
+
comfyui-skill run txt2img # uses default server
|
|
118
|
+
comfyui-skill run txt2img -s my_server # override server via flag
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Commands
|
|
122
|
+
|
|
123
|
+
### Workflow Discovery & Execution
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---------|-------------|
|
|
127
|
+
| `comfyui-skill list` | List all available workflows with parameters |
|
|
128
|
+
| `comfyui-skill info <workflow_id>` | Show workflow details and parameter schema |
|
|
129
|
+
| `comfyui-skill run <workflow_id> --args '{...}'` | Execute a workflow (blocking, returns images) |
|
|
130
|
+
| `comfyui-skill submit <workflow_id> --args '{...}'` | Submit a workflow (non-blocking, returns prompt_id) |
|
|
131
|
+
| `comfyui-skill status <prompt_id>` | Check execution status and download results |
|
|
132
|
+
| `comfyui-skill upload <image_path>` | Upload image to ComfyUI for use in workflows |
|
|
133
|
+
|
|
134
|
+
### Workflow Management
|
|
135
|
+
|
|
136
|
+
| Command | Description |
|
|
137
|
+
|---------|-------------|
|
|
138
|
+
| `comfyui-skill workflow import <json_path>` | Import workflow from local JSON (auto-detect format, auto-convert, auto-generate schema) |
|
|
139
|
+
| `comfyui-skill workflow import --from-server` | Import workflows from ComfyUI server userdata |
|
|
140
|
+
| `comfyui-skill workflow enable <workflow_id>` | Enable a workflow |
|
|
141
|
+
| `comfyui-skill workflow disable <workflow_id>` | Disable a workflow |
|
|
142
|
+
| `comfyui-skill workflow delete <workflow_id>` | Delete a workflow |
|
|
143
|
+
|
|
144
|
+
### Server Management
|
|
145
|
+
|
|
146
|
+
| Command | Description |
|
|
147
|
+
|---------|-------------|
|
|
148
|
+
| `comfyui-skill server list` | List all configured servers |
|
|
149
|
+
| `comfyui-skill server status [<server_id>]` | Check if ComfyUI server is online |
|
|
150
|
+
| `comfyui-skill server add --id <server_id> --url <url>` | Add a new server |
|
|
151
|
+
| `comfyui-skill server enable <server_id>` | Enable a server |
|
|
152
|
+
| `comfyui-skill server disable <server_id>` | Disable a server |
|
|
153
|
+
| `comfyui-skill server remove <server_id>` | Remove a server |
|
|
154
|
+
|
|
155
|
+
### Dependency Management
|
|
156
|
+
|
|
157
|
+
| Command | Description |
|
|
158
|
+
|---------|-------------|
|
|
159
|
+
| `comfyui-skill deps check <workflow_id>` | Check missing custom nodes and models |
|
|
160
|
+
| `comfyui-skill deps install <workflow_id> --repos '[...]'` | Install missing custom nodes via Manager |
|
|
161
|
+
| `comfyui-skill deps install <workflow_id> --models` | Install missing models via Manager |
|
|
162
|
+
| `comfyui-skill deps install <workflow_id> --all` | Auto-detect and install all missing deps |
|
|
163
|
+
|
|
164
|
+
### Configuration Transfer
|
|
165
|
+
|
|
166
|
+
| Command | Description |
|
|
167
|
+
|---------|-------------|
|
|
168
|
+
| `comfyui-skill config export --output <path>` | Export config and workflows as bundle |
|
|
169
|
+
| `comfyui-skill config import <path>` | Import config bundle (supports --dry-run) |
|
|
170
|
+
|
|
171
|
+
### Execution History
|
|
172
|
+
|
|
173
|
+
| Command | Description |
|
|
174
|
+
|---------|-------------|
|
|
175
|
+
| `comfyui-skill history list <workflow_id>` | List execution history for a workflow |
|
|
176
|
+
| `comfyui-skill history show <workflow_id> <run_id>` | Show details of a specific run |
|
|
177
|
+
|
|
178
|
+
### Global Options
|
|
179
|
+
|
|
180
|
+
| Option | Description |
|
|
181
|
+
|--------|-------------|
|
|
182
|
+
| `--json, -j` | Force JSON output |
|
|
183
|
+
| `--server, -s <server_id>` | Specify server ID |
|
|
184
|
+
| `--dir, -d <path>` | Specify data directory (default: current directory) |
|
|
185
|
+
| `--verbose, -v` | Verbose output |
|
|
186
|
+
|
|
187
|
+
### Output Modes
|
|
188
|
+
|
|
189
|
+
- **TTY** → Rich tables and progress bars (human-friendly)
|
|
190
|
+
- **Pipe / `--json`** → Structured JSON (agent-friendly)
|
|
191
|
+
- **Errors** → Always stderr
|
|
192
|
+
|
|
193
|
+
## For AI Agents
|
|
194
|
+
|
|
195
|
+
This CLI is designed to be called from `SKILL.md` definitions:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Typical agent workflow
|
|
199
|
+
comfyui-skill server status --json # 1. verify server is online
|
|
200
|
+
comfyui-skill list --json # 2. discover available workflows
|
|
201
|
+
comfyui-skill info local/txt2img --json # 3. check required parameters
|
|
202
|
+
comfyui-skill run local/txt2img --args '{...}' --json # 4. execute
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Import a new workflow
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Import and check dependencies in one step
|
|
209
|
+
comfyui-skill workflow import ./workflow.json --check-deps --json
|
|
210
|
+
|
|
211
|
+
# Install missing dependencies
|
|
212
|
+
comfyui-skill deps install local/my-workflow --all --json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Exit Codes
|
|
216
|
+
|
|
217
|
+
| Code | Meaning |
|
|
218
|
+
|------|---------|
|
|
219
|
+
| 0 | Success |
|
|
220
|
+
| 1 | General error |
|
|
221
|
+
| 2 | Invalid arguments |
|
|
222
|
+
| 3 | Server connection failed |
|
|
223
|
+
| 4 | Resource not found |
|
|
224
|
+
| 5 | Execution failed |
|
|
225
|
+
| 6 | Timeout |
|
|
226
|
+
|
|
227
|
+
## Compatibility
|
|
228
|
+
|
|
229
|
+
Built with [Typer](https://typer.tiangolo.com/), the same framework as [comfy-cli](https://github.com/Comfy-Org/comfy-cli). Designed to be integrated as a `comfy skills` subcommand in the future.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# ComfyUI Skill CLI
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
<pre>
|
|
5
|
+
+--------------------------------------------------+
|
|
6
|
+
| |
|
|
7
|
+
| ____ __ _ _ ___ |
|
|
8
|
+
| / ___|___ _ __ ___ / _|_ _| | | |_ _| |
|
|
9
|
+
| | | / _ \| '_ ` _ \| |_| | | | | | || | |
|
|
10
|
+
| | |__| (_) | | | | | | _| |_| | |_| || | |
|
|
11
|
+
| \____\___/|_| |_| |_|_| \__, |\___/|___| |
|
|
12
|
+
| |___/ |
|
|
13
|
+
| ____ _ _ _ _ ____ _ ___ |
|
|
14
|
+
| / ___|| | _(_) | | / ___| | |_ _| |
|
|
15
|
+
| \___ \| |/ / | | | | | | | | | |
|
|
16
|
+
| ___) | <| | | | | |___| |___ | | |
|
|
17
|
+
| |____/|_|\_\_|_|_| \____|_____|___| |
|
|
18
|
+
| |
|
|
19
|
+
+--------------------------------------------------+
|
|
20
|
+
</pre>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
[中文版](./README.zh.md) | [English](./README.md)
|
|
24
|
+
|
|
25
|
+
Agent-friendly command-line tool for managing and executing [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflow skills. Any AI agent that can run shell commands (Claude, Codex, OpenClaw, etc.) can use ComfyUI through this CLI.
|
|
26
|
+
|
|
27
|
+
[Install](#install) · [Quick Start](#quick-start) · [Commands](#commands) · [For AI Agents](#for-ai-agents)
|
|
28
|
+
|
|
29
|
+
## Why comfyui-skill?
|
|
30
|
+
|
|
31
|
+
- **Agent-native** — structured JSON output, pipe-friendly, designed for AI agents to call
|
|
32
|
+
- **Zero config** — reads `config.json` and `data/` from the current directory, no setup needed
|
|
33
|
+
- **Full lifecycle** — discover, import, execute, manage workflows and dependencies in one tool
|
|
34
|
+
- **Multi-server** — manage multiple ComfyUI instances, route jobs to different hardware
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pipx install comfyui-skill-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Development Mode
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
git clone https://github.com/HuangYuChuh/ComfyUI_Skill_CLI.git
|
|
46
|
+
cd ComfyUI_Skill_CLI
|
|
47
|
+
pipx install -e .
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The `-e` flag (editable) links directly to your local source — any code change is reflected instantly.
|
|
51
|
+
|
|
52
|
+
### Update
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pipx upgrade comfyui-skill-cli
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 1. Go to your ComfyUI Skills project directory
|
|
62
|
+
cd /path/to/your-skills-project
|
|
63
|
+
|
|
64
|
+
# 2. Check server status
|
|
65
|
+
comfyui-skill server status
|
|
66
|
+
|
|
67
|
+
# 3. List available workflows
|
|
68
|
+
comfyui-skill list
|
|
69
|
+
|
|
70
|
+
# 4. Execute a workflow
|
|
71
|
+
comfyui-skill run local/txt2img --args '{"prompt": "a white cat"}'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Every command supports `--json` for structured output.
|
|
75
|
+
|
|
76
|
+
## ID Convention
|
|
77
|
+
|
|
78
|
+
This CLI uses two types of IDs:
|
|
79
|
+
|
|
80
|
+
| Notation | Meaning | Example |
|
|
81
|
+
|----------|---------|---------|
|
|
82
|
+
| `<workflow_id>` | Workflow identifier, format: `server_id/workflow_name` | `local/txt2img` |
|
|
83
|
+
| `<server_id>` | Server identifier | `local`, `remote-a100` |
|
|
84
|
+
|
|
85
|
+
When `<workflow_id>` omits the server prefix, the default server is used:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
comfyui-skill run local/txt2img # explicit server
|
|
89
|
+
comfyui-skill run txt2img # uses default server
|
|
90
|
+
comfyui-skill run txt2img -s my_server # override server via flag
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Commands
|
|
94
|
+
|
|
95
|
+
### Workflow Discovery & Execution
|
|
96
|
+
|
|
97
|
+
| Command | Description |
|
|
98
|
+
|---------|-------------|
|
|
99
|
+
| `comfyui-skill list` | List all available workflows with parameters |
|
|
100
|
+
| `comfyui-skill info <workflow_id>` | Show workflow details and parameter schema |
|
|
101
|
+
| `comfyui-skill run <workflow_id> --args '{...}'` | Execute a workflow (blocking, returns images) |
|
|
102
|
+
| `comfyui-skill submit <workflow_id> --args '{...}'` | Submit a workflow (non-blocking, returns prompt_id) |
|
|
103
|
+
| `comfyui-skill status <prompt_id>` | Check execution status and download results |
|
|
104
|
+
| `comfyui-skill upload <image_path>` | Upload image to ComfyUI for use in workflows |
|
|
105
|
+
|
|
106
|
+
### Workflow Management
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---------|-------------|
|
|
110
|
+
| `comfyui-skill workflow import <json_path>` | Import workflow from local JSON (auto-detect format, auto-convert, auto-generate schema) |
|
|
111
|
+
| `comfyui-skill workflow import --from-server` | Import workflows from ComfyUI server userdata |
|
|
112
|
+
| `comfyui-skill workflow enable <workflow_id>` | Enable a workflow |
|
|
113
|
+
| `comfyui-skill workflow disable <workflow_id>` | Disable a workflow |
|
|
114
|
+
| `comfyui-skill workflow delete <workflow_id>` | Delete a workflow |
|
|
115
|
+
|
|
116
|
+
### Server Management
|
|
117
|
+
|
|
118
|
+
| Command | Description |
|
|
119
|
+
|---------|-------------|
|
|
120
|
+
| `comfyui-skill server list` | List all configured servers |
|
|
121
|
+
| `comfyui-skill server status [<server_id>]` | Check if ComfyUI server is online |
|
|
122
|
+
| `comfyui-skill server add --id <server_id> --url <url>` | Add a new server |
|
|
123
|
+
| `comfyui-skill server enable <server_id>` | Enable a server |
|
|
124
|
+
| `comfyui-skill server disable <server_id>` | Disable a server |
|
|
125
|
+
| `comfyui-skill server remove <server_id>` | Remove a server |
|
|
126
|
+
|
|
127
|
+
### Dependency Management
|
|
128
|
+
|
|
129
|
+
| Command | Description |
|
|
130
|
+
|---------|-------------|
|
|
131
|
+
| `comfyui-skill deps check <workflow_id>` | Check missing custom nodes and models |
|
|
132
|
+
| `comfyui-skill deps install <workflow_id> --repos '[...]'` | Install missing custom nodes via Manager |
|
|
133
|
+
| `comfyui-skill deps install <workflow_id> --models` | Install missing models via Manager |
|
|
134
|
+
| `comfyui-skill deps install <workflow_id> --all` | Auto-detect and install all missing deps |
|
|
135
|
+
|
|
136
|
+
### Configuration Transfer
|
|
137
|
+
|
|
138
|
+
| Command | Description |
|
|
139
|
+
|---------|-------------|
|
|
140
|
+
| `comfyui-skill config export --output <path>` | Export config and workflows as bundle |
|
|
141
|
+
| `comfyui-skill config import <path>` | Import config bundle (supports --dry-run) |
|
|
142
|
+
|
|
143
|
+
### Execution History
|
|
144
|
+
|
|
145
|
+
| Command | Description |
|
|
146
|
+
|---------|-------------|
|
|
147
|
+
| `comfyui-skill history list <workflow_id>` | List execution history for a workflow |
|
|
148
|
+
| `comfyui-skill history show <workflow_id> <run_id>` | Show details of a specific run |
|
|
149
|
+
|
|
150
|
+
### Global Options
|
|
151
|
+
|
|
152
|
+
| Option | Description |
|
|
153
|
+
|--------|-------------|
|
|
154
|
+
| `--json, -j` | Force JSON output |
|
|
155
|
+
| `--server, -s <server_id>` | Specify server ID |
|
|
156
|
+
| `--dir, -d <path>` | Specify data directory (default: current directory) |
|
|
157
|
+
| `--verbose, -v` | Verbose output |
|
|
158
|
+
|
|
159
|
+
### Output Modes
|
|
160
|
+
|
|
161
|
+
- **TTY** → Rich tables and progress bars (human-friendly)
|
|
162
|
+
- **Pipe / `--json`** → Structured JSON (agent-friendly)
|
|
163
|
+
- **Errors** → Always stderr
|
|
164
|
+
|
|
165
|
+
## For AI Agents
|
|
166
|
+
|
|
167
|
+
This CLI is designed to be called from `SKILL.md` definitions:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Typical agent workflow
|
|
171
|
+
comfyui-skill server status --json # 1. verify server is online
|
|
172
|
+
comfyui-skill list --json # 2. discover available workflows
|
|
173
|
+
comfyui-skill info local/txt2img --json # 3. check required parameters
|
|
174
|
+
comfyui-skill run local/txt2img --args '{...}' --json # 4. execute
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Import a new workflow
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Import and check dependencies in one step
|
|
181
|
+
comfyui-skill workflow import ./workflow.json --check-deps --json
|
|
182
|
+
|
|
183
|
+
# Install missing dependencies
|
|
184
|
+
comfyui-skill deps install local/my-workflow --all --json
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Exit Codes
|
|
188
|
+
|
|
189
|
+
| Code | Meaning |
|
|
190
|
+
|------|---------|
|
|
191
|
+
| 0 | Success |
|
|
192
|
+
| 1 | General error |
|
|
193
|
+
| 2 | Invalid arguments |
|
|
194
|
+
| 3 | Server connection failed |
|
|
195
|
+
| 4 | Resource not found |
|
|
196
|
+
| 5 | Execution failed |
|
|
197
|
+
| 6 | Timeout |
|
|
198
|
+
|
|
199
|
+
## Compatibility
|
|
200
|
+
|
|
201
|
+
Built with [Typer](https://typer.tiangolo.com/), the same framework as [comfy-cli](https://github.com/Comfy-Org/comfy-cli). Designed to be integrated as a `comfy skills` subcommand in the future.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: comfyui-skill-cli
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: ComfyUI Skill CLI — Agent-friendly workflow management
|
|
5
|
+
Author: HuangYuChuh
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI
|
|
8
|
+
Project-URL: Repository, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI
|
|
9
|
+
Project-URL: Issues, https://github.com/HuangYuChuh/ComfyUI_Skill_CLI/issues
|
|
10
|
+
Keywords: comfyui,cli,agent,skill,workflow,ai,image-generation
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Classifier: Topic :: Multimedia :: Graphics
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: typer>=0.9
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Requires-Dist: requests>=2.28
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# ComfyUI Skill CLI
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
<pre>
|
|
33
|
+
+--------------------------------------------------+
|
|
34
|
+
| |
|
|
35
|
+
| ____ __ _ _ ___ |
|
|
36
|
+
| / ___|___ _ __ ___ / _|_ _| | | |_ _| |
|
|
37
|
+
| | | / _ \| '_ ` _ \| |_| | | | | | || | |
|
|
38
|
+
| | |__| (_) | | | | | | _| |_| | |_| || | |
|
|
39
|
+
| \____\___/|_| |_| |_|_| \__, |\___/|___| |
|
|
40
|
+
| |___/ |
|
|
41
|
+
| ____ _ _ _ _ ____ _ ___ |
|
|
42
|
+
| / ___|| | _(_) | | / ___| | |_ _| |
|
|
43
|
+
| \___ \| |/ / | | | | | | | | | |
|
|
44
|
+
| ___) | <| | | | | |___| |___ | | |
|
|
45
|
+
| |____/|_|\_\_|_|_| \____|_____|___| |
|
|
46
|
+
| |
|
|
47
|
+
+--------------------------------------------------+
|
|
48
|
+
</pre>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
[中文版](./README.zh.md) | [English](./README.md)
|
|
52
|
+
|
|
53
|
+
Agent-friendly command-line tool for managing and executing [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflow skills. Any AI agent that can run shell commands (Claude, Codex, OpenClaw, etc.) can use ComfyUI through this CLI.
|
|
54
|
+
|
|
55
|
+
[Install](#install) · [Quick Start](#quick-start) · [Commands](#commands) · [For AI Agents](#for-ai-agents)
|
|
56
|
+
|
|
57
|
+
## Why comfyui-skill?
|
|
58
|
+
|
|
59
|
+
- **Agent-native** — structured JSON output, pipe-friendly, designed for AI agents to call
|
|
60
|
+
- **Zero config** — reads `config.json` and `data/` from the current directory, no setup needed
|
|
61
|
+
- **Full lifecycle** — discover, import, execute, manage workflows and dependencies in one tool
|
|
62
|
+
- **Multi-server** — manage multiple ComfyUI instances, route jobs to different hardware
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pipx install comfyui-skill-cli
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Development Mode
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/HuangYuChuh/ComfyUI_Skill_CLI.git
|
|
74
|
+
cd ComfyUI_Skill_CLI
|
|
75
|
+
pipx install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The `-e` flag (editable) links directly to your local source — any code change is reflected instantly.
|
|
79
|
+
|
|
80
|
+
### Update
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pipx upgrade comfyui-skill-cli
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# 1. Go to your ComfyUI Skills project directory
|
|
90
|
+
cd /path/to/your-skills-project
|
|
91
|
+
|
|
92
|
+
# 2. Check server status
|
|
93
|
+
comfyui-skill server status
|
|
94
|
+
|
|
95
|
+
# 3. List available workflows
|
|
96
|
+
comfyui-skill list
|
|
97
|
+
|
|
98
|
+
# 4. Execute a workflow
|
|
99
|
+
comfyui-skill run local/txt2img --args '{"prompt": "a white cat"}'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Every command supports `--json` for structured output.
|
|
103
|
+
|
|
104
|
+
## ID Convention
|
|
105
|
+
|
|
106
|
+
This CLI uses two types of IDs:
|
|
107
|
+
|
|
108
|
+
| Notation | Meaning | Example |
|
|
109
|
+
|----------|---------|---------|
|
|
110
|
+
| `<workflow_id>` | Workflow identifier, format: `server_id/workflow_name` | `local/txt2img` |
|
|
111
|
+
| `<server_id>` | Server identifier | `local`, `remote-a100` |
|
|
112
|
+
|
|
113
|
+
When `<workflow_id>` omits the server prefix, the default server is used:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
comfyui-skill run local/txt2img # explicit server
|
|
117
|
+
comfyui-skill run txt2img # uses default server
|
|
118
|
+
comfyui-skill run txt2img -s my_server # override server via flag
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Commands
|
|
122
|
+
|
|
123
|
+
### Workflow Discovery & Execution
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---------|-------------|
|
|
127
|
+
| `comfyui-skill list` | List all available workflows with parameters |
|
|
128
|
+
| `comfyui-skill info <workflow_id>` | Show workflow details and parameter schema |
|
|
129
|
+
| `comfyui-skill run <workflow_id> --args '{...}'` | Execute a workflow (blocking, returns images) |
|
|
130
|
+
| `comfyui-skill submit <workflow_id> --args '{...}'` | Submit a workflow (non-blocking, returns prompt_id) |
|
|
131
|
+
| `comfyui-skill status <prompt_id>` | Check execution status and download results |
|
|
132
|
+
| `comfyui-skill upload <image_path>` | Upload image to ComfyUI for use in workflows |
|
|
133
|
+
|
|
134
|
+
### Workflow Management
|
|
135
|
+
|
|
136
|
+
| Command | Description |
|
|
137
|
+
|---------|-------------|
|
|
138
|
+
| `comfyui-skill workflow import <json_path>` | Import workflow from local JSON (auto-detect format, auto-convert, auto-generate schema) |
|
|
139
|
+
| `comfyui-skill workflow import --from-server` | Import workflows from ComfyUI server userdata |
|
|
140
|
+
| `comfyui-skill workflow enable <workflow_id>` | Enable a workflow |
|
|
141
|
+
| `comfyui-skill workflow disable <workflow_id>` | Disable a workflow |
|
|
142
|
+
| `comfyui-skill workflow delete <workflow_id>` | Delete a workflow |
|
|
143
|
+
|
|
144
|
+
### Server Management
|
|
145
|
+
|
|
146
|
+
| Command | Description |
|
|
147
|
+
|---------|-------------|
|
|
148
|
+
| `comfyui-skill server list` | List all configured servers |
|
|
149
|
+
| `comfyui-skill server status [<server_id>]` | Check if ComfyUI server is online |
|
|
150
|
+
| `comfyui-skill server add --id <server_id> --url <url>` | Add a new server |
|
|
151
|
+
| `comfyui-skill server enable <server_id>` | Enable a server |
|
|
152
|
+
| `comfyui-skill server disable <server_id>` | Disable a server |
|
|
153
|
+
| `comfyui-skill server remove <server_id>` | Remove a server |
|
|
154
|
+
|
|
155
|
+
### Dependency Management
|
|
156
|
+
|
|
157
|
+
| Command | Description |
|
|
158
|
+
|---------|-------------|
|
|
159
|
+
| `comfyui-skill deps check <workflow_id>` | Check missing custom nodes and models |
|
|
160
|
+
| `comfyui-skill deps install <workflow_id> --repos '[...]'` | Install missing custom nodes via Manager |
|
|
161
|
+
| `comfyui-skill deps install <workflow_id> --models` | Install missing models via Manager |
|
|
162
|
+
| `comfyui-skill deps install <workflow_id> --all` | Auto-detect and install all missing deps |
|
|
163
|
+
|
|
164
|
+
### Configuration Transfer
|
|
165
|
+
|
|
166
|
+
| Command | Description |
|
|
167
|
+
|---------|-------------|
|
|
168
|
+
| `comfyui-skill config export --output <path>` | Export config and workflows as bundle |
|
|
169
|
+
| `comfyui-skill config import <path>` | Import config bundle (supports --dry-run) |
|
|
170
|
+
|
|
171
|
+
### Execution History
|
|
172
|
+
|
|
173
|
+
| Command | Description |
|
|
174
|
+
|---------|-------------|
|
|
175
|
+
| `comfyui-skill history list <workflow_id>` | List execution history for a workflow |
|
|
176
|
+
| `comfyui-skill history show <workflow_id> <run_id>` | Show details of a specific run |
|
|
177
|
+
|
|
178
|
+
### Global Options
|
|
179
|
+
|
|
180
|
+
| Option | Description |
|
|
181
|
+
|--------|-------------|
|
|
182
|
+
| `--json, -j` | Force JSON output |
|
|
183
|
+
| `--server, -s <server_id>` | Specify server ID |
|
|
184
|
+
| `--dir, -d <path>` | Specify data directory (default: current directory) |
|
|
185
|
+
| `--verbose, -v` | Verbose output |
|
|
186
|
+
|
|
187
|
+
### Output Modes
|
|
188
|
+
|
|
189
|
+
- **TTY** → Rich tables and progress bars (human-friendly)
|
|
190
|
+
- **Pipe / `--json`** → Structured JSON (agent-friendly)
|
|
191
|
+
- **Errors** → Always stderr
|
|
192
|
+
|
|
193
|
+
## For AI Agents
|
|
194
|
+
|
|
195
|
+
This CLI is designed to be called from `SKILL.md` definitions:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Typical agent workflow
|
|
199
|
+
comfyui-skill server status --json # 1. verify server is online
|
|
200
|
+
comfyui-skill list --json # 2. discover available workflows
|
|
201
|
+
comfyui-skill info local/txt2img --json # 3. check required parameters
|
|
202
|
+
comfyui-skill run local/txt2img --args '{...}' --json # 4. execute
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Import a new workflow
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Import and check dependencies in one step
|
|
209
|
+
comfyui-skill workflow import ./workflow.json --check-deps --json
|
|
210
|
+
|
|
211
|
+
# Install missing dependencies
|
|
212
|
+
comfyui-skill deps install local/my-workflow --all --json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Exit Codes
|
|
216
|
+
|
|
217
|
+
| Code | Meaning |
|
|
218
|
+
|------|---------|
|
|
219
|
+
| 0 | Success |
|
|
220
|
+
| 1 | General error |
|
|
221
|
+
| 2 | Invalid arguments |
|
|
222
|
+
| 3 | Server connection failed |
|
|
223
|
+
| 4 | Resource not found |
|
|
224
|
+
| 5 | Execution failed |
|
|
225
|
+
| 6 | Timeout |
|
|
226
|
+
|
|
227
|
+
## Compatibility
|
|
228
|
+
|
|
229
|
+
Built with [Typer](https://typer.tiangolo.com/), the same framework as [comfy-cli](https://github.com/Comfy-Org/comfy-cli). Designed to be integrated as a `comfy skills` subcommand in the future.
|
|
@@ -15,7 +15,11 @@ comfyui_skills_cli/main.py
|
|
|
15
15
|
comfyui_skills_cli/output.py
|
|
16
16
|
comfyui_skills_cli/storage.py
|
|
17
17
|
comfyui_skills_cli/commands/__init__.py
|
|
18
|
+
comfyui_skills_cli/commands/config.py
|
|
18
19
|
comfyui_skills_cli/commands/deps.py
|
|
20
|
+
comfyui_skills_cli/commands/history.py
|
|
19
21
|
comfyui_skills_cli/commands/run.py
|
|
20
22
|
comfyui_skills_cli/commands/server.py
|
|
21
|
-
comfyui_skills_cli/commands/skill.py
|
|
23
|
+
comfyui_skills_cli/commands/skill.py
|
|
24
|
+
comfyui_skills_cli/commands/upload.py
|
|
25
|
+
comfyui_skills_cli/commands/workflow.py
|