Skip to main content

Overview

comfy-cli is a command line tool that makes it easier to install and manage Comfy. It does two things:
  1. Manage a local ComfyUI install — install, launch, update, snapshot, and bisect ComfyUI and its custom nodes.
  2. Call hosted partner nodes directly — generate images and video from Seedance, Nano Banana (Gemini), Grok, Flux, Ideogram, DALL·E, Recraft, Stability, Kling, Luma, Runway, Pika, Vidu, Hailuo, Moonvalley, and more, with a single command. No local ComfyUI or workflow JSON required.

Install CLI

To get shell completion hints:

Install ComfyUI

Create a virtual environment with any Python version greater than 3.9.
Install ComfyUI
You still need to install CUDA, or ROCm depending on your GPU.

Run ComfyUI

Call partner nodes directly with comfy generate (Beta)

comfy generate is in beta. Flag names, model aliases, and output formats may change while we iron things out based on feedback. The underlying partner endpoints are stable — the CLI ergonomics on top of them are what’s still evolving. File feedback or issues on the comfy-cli GitHub repo.
comfy generate is the fastest way to call Comfy’s partner nodes from a terminal or a script. It hits the same hosted endpoints you’d otherwise wire into a ComfyUI workflow, but as one-shot CLI calls — perfect for batch jobs, quick experiments, and automation pipelines where standing up a full ComfyUI graph is overkill.

Prerequisites

Set the key once, then go:

Your first generation

That’s it — the CLI uploads any local file inputs, submits the job, polls until it’s ready, and saves the result to cat.png. A few of the most-used partner models, callable with one line:

Discover models

Image editing with a reference image

Pass local file paths directly — the CLI uploads them through Comfy’s storage endpoint (or base64-encodes inline, depending on what each partner expects):
If you’d rather upload once and reuse the signed URL across many calls:
Uploaded reference assets are auto-deleted after 24 hours. They’re stored in a Comfy-managed GCS bucket and served via signed URLs. For most workflows (upload → use → done) this is transparent; for long-running pipelines, plan to re-upload before each job. See the reference for details.

Video generation (async jobs)

Video jobs are async — the CLI blocks and polls until ready by default:
Pass --async to return immediately with a job id, then resume later:

Scripting with JSON output

For pipelines, --json emits the raw API response:
See the reference for the full list of commands, flags, and model aliases.

Manage Custom Nodes

We use cm-cli for installing custom nodes. See the docs for more information.

Manage Models

Downloading models with comfy-cli is easy. Just run:

Contributing

We encourage contributions to comfy-cli! If you have suggestions, ideas, or bug reports, please open an issue on our GitHub repository. If you want to contribute code, fork the repository and submit a pull request. Refer to the Dev Guide for further details.

Analytics

We track usage of the CLI to improve the user experience. You can disable this by running:
To re-enable tracking, run: