Comfy-Org/comfy-cli
CLI for using ComfyUI
What comfy‑cli does
comfy‑cli is a Python‑based command‑line interface that helps you install, run, and extend ComfyUI, an open‑source engine for generating images, video and other media with AI models (e.g., Stable Diffusion, Flux, DALL·E, etc.). Instead of manually cloning the ComfyUI repo, installing Python dependencies, and fiddling with JSON workflow files, you type simple commands like comfy install, comfy run, or comfy generate.
Core capabilities
| Feature | What it means for you |
|---|---|
| One‑command install & launch | comfy setup (or comfy install + comfy launch) downloads the latest ComfyUI code, its manager, and all required Python packages in one step. |
| Direct model calls | comfy generate talks to partner image/video nodes (Flux, DALL·E, Stability AI, etc.) without you having to create a UI workflow JSON. |
| Custom node management | Install, update, snapshot, or bisect custom node packs from the Comfy Registry or GitHub with commands like comfy node install <id> and comfy node update all. |
| Fast dependency resolution | Flags --fast-deps or --uv-compile use the uv resolver to compile a single lockfile for all nodes, making installs noticeably quicker. |
| Model downloading | Pull models from CivitAI, Hugging Face, or any URL with a single command. |
| Run local or cloud workflows | comfy run --workflow file.json --where cloud sends a workflow to Comfy Cloud (no GPU needed). The same command works against a locally‑running ComfyUI server. |
| Agent‑friendly JSON output | Adding --json makes every command emit a structured envelope, which LLM‑based agents (Claude, Cursor, etc.) can parse and act on. |
| Cross‑platform | Works on Windows, macOS and Linux; can be installed in a virtualenv, conda env, or via pipx. |
| Shell autocomplete | comfy --install-completion gives tab‑completion for all sub‑commands and options. |
Typical workflow
- Install the CLI –
pip install comfy-cli(Python 3.10+). - Set up ComfyUI –
comfy setup(interactive wizard) orcomfy install. - Add nodes or models –
comfy node install comfyui‑impact‑packorcomfy model download <url>. - Run a generation –
comfy generate --prompt "a cyberpunk city at night"(local) or add--where cloudto run on the hosted service. - Retrieve results –
comfy download <prompt_id> -o ./outputs.
Why it matters
ComfyUI is a powerful but manually‑heavy platform for AI‑driven media creation. comfy‑cli removes the friction of setup, dependency hell, and JSON‑only workflow execution, making the engine accessible to developers, CI pipelines, and AI agents that need to invoke image generation programmatically.
Quick reference (selected commands)
comfy install– download ComfyUI + manager.comfy launch– start the UI server (add--backgroundto daemonise).comfy generate– call a partner model directly from the terminal.comfy run --workflow FILE.json [--where cloud]– execute a saved workflow.comfy node install <registry‑id>– add a custom node pack.comfy update all– refresh ComfyUI and all installed nodes.comfy cloud login/comfy cloud status– manage the hosted Comfy Cloud account.comfy --json <subcommand>– machine‑readable output for LLM agents.
Who should use it?
- Developers who want to script installations, CI tests, or automated generation.
- Researchers needing reproducible environments for generative‑media experiments.
- LLM‑powered agents (Claude, Cursor, etc.) that need a stable JSON interface to drive image creation.
- Artists comfortable with the terminal who want a faster way to spin up ComfyUI and access many model providers.
Where to learn more
- GitHub repository – https://github.com/Comfy-Org/comfy-cli (README, issue tracker, CI status badges).
- ComfyUI project – https://github.com/comfyanonymous/ComfyUI (the engine this CLI wraps).
- Comfy Cloud – https://www.comfy.org/ (hosted GPU service used via
--where cloud).
All details above are taken directly from the project's README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project