# Repository Briefing: Comfy-Org/comfy-cli
> Source: https://repoforai.com/repo/Comfy-Org/comfy-cli (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Comfy-Org/comfy-cli
- **Official Docs / Website**: https://docs.comfy.org/comfy-cli/getting-started
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: GPL-3.0
- **Engineering Health**: A (85/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 11/20)
- **Latest Release**: v1.29.0 (2026-11-24) — https://github.com/Comfy-Org/comfy-cli/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: CLI, Local AI, Self-Hosted
- **Momentum**: 1,074 ★ total (+1 24h / +6 7d) · 186 forks
- **Topics**: `ai`, `comfyui`, `command-line`, `stable-diffusion`
- **When to Use**: Best for: ComfyUI operators who want scriptable workspace setup, model and node management, and repeatable local or cloud job submission. Skip if: You mainly author graphs visually, or your application already provisions ComfyUI and only needs a direct job-submission API.

## Overview
```text
### Architecture & Core Mechanics
comfy-cli is a Python command-line frontend for ComfyUI, not an inference engine. The setuptools-built package lives under `comfy_cli/`. Local commands target a workspace containing ComfyUI and its Python environment. The CLI installs and launches that runtime, then submits workflows to the local ComfyUI server. The cloud path routes execution to Comfy Cloud, with browser OAuth for sign-in and a `prompt_id` for tracking submitted jobs and retrieving results.

Custom nodes extend ComfyUI rather than the CLI. `comfy node install` delegates channel-based resolution and installation to ComfyUI-Manager's `cm-cli`. `comfy node registry-install` instead calls the Comfy Registry API, downloads a published archive into `custom_nodes/`, and runs the node's bundled install script. Dependency resolution follows a similar split: the CLI's `DependencyCompiler` uses `uv` for `--fast-deps`, while Manager's `UnifiedDepResolver` backs `--uv-compile` on Manager v4.1 or later.

### Key Capabilities & Differentiators
The CLI manages core installation, launch, and version changes alongside custom-node snapshots and bisection. `comfy run` accepts API-format workflow JSON and can convert UI-format exports. Cloud submission returns a `prompt_id` without waiting by default, so scripts can separate submission, monitoring, and download; `--wait` keeps the submit command running until completion. For prompt-driven jobs that do not need a workflow file, `comfy generate` calls hosted image and video models such as Flux, Gemini/nano-banana, Kling, and Runway.

Model management covers CivitAI, Hugging Face, and direct URLs. Explicit token flags take precedence over environment variables, which in turn take precedence over saved configuration; environment-provided tokens are not persisted. On servers that support resumable uploads, `comfy model upload` transfers a single `.safetensors` file of up to 25 GB in 64 MiB pieces. To resume an interrupted transfer, rerun it with the same file, model folder, account, and workspace while the saved session remains valid.

### Trade-offs & Limitations
Compared with the ComfyUI web UI, the CLI is better suited to repeatable provisioning, version changes, and job submission, not visual graph editing. Direct API calls are a simpler fit when an existing service already manages the ComfyUI runtime and only needs to submit jobs. Local execution keeps inference and outputs on infrastructure you control, but leaves you responsible for model storage, PyTorch compatibility, and custom-node maintenance. Hosted execution avoids local GPU provisioning but adds subscription and credit costs and requires workflows and any uploaded assets to leave the local environment.

Registry version pinning identifies a node archive; it does not reproduce Manager's dependency resolution, and installation executes third-party code. Use trusted nodes and isolate workspaces where practical. In CI, `comfy update all --exit-on-fail` only catches failures that Manager reports with a nonzero exit code; individual pack errors logged with a zero exit can still slip through. A core version switch also is not transactional: if dependency installation fails after checkout, the workspace remains on the selected version.

### Hardware & Deployment Guide
On Windows, macOS, or Linux, start with Python 3.10+ and `pip install comfy-cli`. Use `comfy setup` for guided local or cloud configuration, with `-y` for non-interactive installs, or use `comfy install` to provision ComfyUI and, by default, Manager. Installation prefers an active virtualenv or conda environment, then an existing workspace `.venv` or `venv`. With neither present, a normal pip install uses the CLI's Python, while `pipx` and `uv tool` installs create a workspace `.venv`; use `comfy launch` to run with the intended interpreter.

For self-hosting, validate the platform-appropriate PyTorch build and size storage, RAM, and accelerator capacity for the actual workflows. Initial provisioning may need network access for code, packages, and weights. Comfy Cloud removes the local GPU requirement but needs OAuth sign-in, an active subscription, and credits for generation. Release v1.28.0 added output-node target checks to cloud job status and watch commands; v1.29.0 made model-download claims shared across workspaces.
```

## Key Capabilities
```text
- Execution: `comfy run` accepts workflow JSON, converts UI exports, and can route jobs to Comfy Cloud.
- Node installation: `node install` uses Manager's `cm-cli`; `registry-install --version` pins a Registry archive and runs its bundled installer without Manager.
- Dependency resolution: `--fast-deps` uses the CLI's `DependencyCompiler`; `--uv-compile` uses Manager v4.1+ and attributes conflicts to nodes.
- Model assets: Downloads support CivitAI, Hugging Face, and direct URLs; supported cloud servers accept resumable `.safetensors` uploads up to 25 GB in 64 MiB pieces.
- Version management: `comfy update comfy --version` validates the target before checkout, stashes dirty work by default, and leaves the installed PyTorch build untouched.
- Automation: Structured `--json` output and explicit workspace selection support scripting; `comfy which` checks the selected target.
```

## Quick Start / Clone
```bash
pip install comfy-cli
comfy setup
```
