> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-mintlify-b90d3c69.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

### Overview

`comfy-cli` is a [command line tool](https://github.com/Comfy-Org/comfy-cli) 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

<CodeGroup>
  ```bash pip theme={null}
  pip install comfy-cli
  ```

  ```bash homebrew theme={null}
  brew tap Comfy-Org/comfy-cli
  brew install comfy-org/comfy-cli/comfy-cli
  ```
</CodeGroup>

To get shell completion hints:

```bash theme={null}
comfy --install-completion
```

### Install ComfyUI

Create a virtual environment with any Python version greater than 3.9.

<CodeGroup>
  ```bash conda theme={null}
  conda create -n comfy-env python=3.11
  conda activate comfy-env
  ```

  ```bash venv theme={null}
  python3 -m venv comfy-env
  source comfy-env/bin/activate
  ```
</CodeGroup>

Install ComfyUI

```bash theme={null}
comfy install
```

<Warning>You still need to install CUDA, or ROCm depending on your GPU.</Warning>

### Run ComfyUI

```bash theme={null}
comfy launch
```

## Call partner nodes directly with `comfy generate` (Beta)

<Info>
  **`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](https://github.com/Comfy-Org/comfy-cli/issues).
</Info>

<Tip>
  `comfy generate` is the fastest way to call Comfy's [partner nodes](/tutorials/partner-nodes/overview) 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.
</Tip>

### Prerequisites

* [Create a Comfy API key](/development/comfyui-server/api-key-integration)
* [Add credits to your account](/interface/credits)
* Optional: [Browse partner nodes and per-call pricing](/tutorials/partner-nodes/overview)

Set the key once, then go:

```bash theme={null}
export COMFY_API_KEY=comfyui-...   # or pass --api-key on each call
```

### Your first generation

```bash theme={null}
comfy generate flux-pro \
    --prompt "a cat on the moon, cinematic lighting" \
    --width 1024 --height 1024 \
    --download cat.png
```

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`.

### Popular models

A few of the most-used partner models, callable with one line:

```bash theme={null}
# Nano Banana (Google Gemini Flash Image) — text-to-image and prompt-driven edits
comfy generate nano-banana \
    --prompt "a watercolor of a sleeping fox" \
    --download fox.png

# Same alias, now an image edit — pass a reference with --image (repeatable):
comfy generate nano-banana \
    --prompt "add a top hat" \
    --image ./cat.png \
    --download edited.png

# Pick a Gemini variant:
comfy generate nano-banana \
    --prompt "neon city skyline" \
    --model gemini-3-pro-image-preview \
    --download city.png

# Seedance (ByteDance) — text-to-video, up to 1080p / 12s clips
comfy generate seedance \
    --prompt "a hummingbird hovering over a flower" \
    --resolution 1080p --duration 5 \
    --download hummingbird.mp4

# Seedance image-to-video — pick a lite/i2v variant and pass a first frame
comfy generate seedance \
    --model seedance-1-0-lite-i2v-250428 \
    --prompt "the wave crests and crashes" \
    --image ./still.jpg \
    --download wave.mp4

# Grok (xAI) — image generation and editing
comfy generate grok --prompt "a cyberpunk street market at night" --download street.png
comfy generate grok-edit --prompt "swap the umbrella for a parasol" --image ./photo.jpg --download out.png

# Grok video
comfy generate grok-video --prompt "a paper plane gliding through a cathedral" --download flight.mp4
```

### Discover models

```bash theme={null}
comfy generate list                            # all available models
comfy generate list --category text-to-video   # filter by category
comfy generate list --partner kling            # filter by partner
comfy generate schema flux-kontext             # see the params for one model
```

### 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):

```bash theme={null}
comfy generate flux-kontext \
    --prompt "add a top hat and a monocle" \
    --input_image ./photo.jpg \
    --download out.png

comfy generate ideogram-edit \
    --image cat.png --mask mask.png \
    --prompt "add sunglasses" \
    --rendering_speed TURBO \
    --download edited.png
```

If you'd rather upload once and reuse the signed URL across many calls:

```bash theme={null}
comfy generate upload ./photo.jpg
# → prints a signed URL you can pass as --input_image
```

<Note>
  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](/comfy-cli/reference#upload) for details.
</Note>

### Video generation (async jobs)

Video jobs are async — the CLI blocks and polls until ready by default:

```bash theme={null}
comfy generate kling \
    --prompt "a paper boat drifting on a river at dusk" \
    --duration 5 \
    --download boat.mp4
```

Pass `--async` to return immediately with a job id, then resume later:

```bash theme={null}
comfy generate luma --prompt "neon koi swimming through clouds" --aspect_ratio 16:9 --async
# → prints a job id; resume with:
comfy generate resume luma <job_id> --download out.mp4
```

### Scripting with JSON output

For pipelines, `--json` emits the raw API response:

```bash theme={null}
comfy generate dalle --prompt "a watercolor whale" --json | jq '.data[0].url'
```

See the [reference](/comfy-cli/reference) for the full list of commands, flags, and model aliases.

## Manage Custom Nodes

```bash theme={null}
comfy node install <NODE_NAME>
```

We use `cm-cli` for installing custom nodes. See the [docs](https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/docs/en/cm-cli.md) for more information.

## Manage Models

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

```bash theme={null}
comfy model download --url <url> --relative-path models/checkpoints
```

## Contributing

We encourage contributions to comfy-cli! If you have suggestions, ideas, or bug reports, please open an issue on our [GitHub repository](https://github.com/Comfy-Org/comfy-cli/issues). If you want to contribute code, fork the repository and submit a pull request.

Refer to the [Dev Guide](https://github.com/Comfy-Org/comfy-cli/blob/main/DEV_README.md) for further details.

## Analytics

We track usage of the CLI to improve the user experience. You can disable this by running:

```bash theme={null}
comfy tracking disable
```

To re-enable tracking, run:

```bash theme={null}
comfy tracking enable
```
