Comfy-Org/comfy-cli
A Python CLI for managing ComfyUI workspaces and running local or cloud workflows
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & 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.
comfy run accepts workflow JSON, converts UI exports, and can route jobs to Comfy Cloud.node install uses Manager's cm-cli; registry-install --version pins a Registry archive and runs its bundled installer without Manager.--fast-deps uses the CLI's DependencyCompiler; --uv-compile uses Manager v4.1+ and attributes conflicts to nodes..safetensors uploads up to 25 GB in 64 MiB pieces.comfy update comfy --version validates the target before checkout, stashes dirty work by default, and leaves the installed PyTorch build untouched.--json output and explicit workspace selection support scripting; comfy which checks the selected target.ComfyUI operators who want scriptable workspace setup, model and node management, and repeatable local or cloud job submission.
You mainly author graphs visually, or your application already provisions ComfyUI and only needs a direct job-submission API.
Quick Start & Installation
pip install comfy-cli
comfy setupAI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Comfy-Org/comfy-cli.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about comfy-cli
How should I integrate workflow execution into a script?
comfy run --workflow ./workflow.json. API export is the clearest integration format; the CLI can also convert UI-format JSON. On Comfy Cloud, use the returned prompt_id with comfy jobs wait and comfy download, or use --wait to block at submission. Pin the local workspace explicitly when a script depends on a particular node or model set.What hardware and VRAM should I plan for?
Can a company self-host or redistribute comfy-cli?
When is comfy-cli a better fit than the web UI or direct API calls?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy