Comfy CLI
raw JSON → 1.7.3 verified Mon Apr 27 auth: no python
A command-line interface for managing ComfyUI installations, workflows, and models. Version 1.7.3 requires Python >=3.10 and is actively maintained.
pip install comfy-cli Common errors
error ModuleNotFoundError: No module named 'comfy_cli' ↓
cause Trying to import with hyphen instead of underscore
fix
Use
from comfy_cli import ComfyUI error comfy: command not found ↓
cause comfy-cli not installed or not in PATH
fix
Run
pip install comfy-cli and ensure Python binaries are in PATH Warnings
breaking Version 1.7.0 changed the CLI argument --port to --port-number ↓
fix Update scripts to use --port-number instead of --port
gotcha The CLI uses `comfy` command, not `comfy-cli`. Some users try `comfy-cli` which fails. ↓
fix Use `comfy` as the command, e.g., `comfy install`
Imports
- ComfyUI wrong
from comfycli import ComfyUIcorrectfrom comfy_cli import ComfyUI
Quickstart
from comfy_cli import ComfyUI
import os
# Initialize with optional API key
comfy = ComfyUI(api_key=os.environ.get('COMFY_API_KEY', ''))
# Install and run ComfyUI
comfy.install()
comfy.start()