Skip to main content
The runcomfy CLI drives RunComfy from your terminal or any AI agent. It covers the Model API, Serverless API (ComfyUI) and Trainer API — so you can find a model, run it, manage your own workflow deployments, and train a LoRA without leaving the shell. A single command submits a request, waits for completion, and downloads the result.
Repository: runcomfy-com/runcomfy-cli

What it gives you

  • One command end-to-end — submit, poll, fetch the result, and download generated files into your working directory.
  • Pipe-friendly--output json emits a single line of JSON to stdout (stderr stays empty in JSON mode), so runcomfy ... | jq ... works in scripts.
  • AI-agent-friendly — every progress line goes to stderr; final payload to stdout; sysexits-style exit codes (64 usage / 65 data / 69 upstream / 75 retryable / 77 auth) so callers branch on failure type without parsing strings.
  • Browser OAuthruncomfy login opens a device-code flow in your browser. No long-lived API key copy-paste, and no token in your shell history.
  • Streaming downloads, with safety — multi-hundred-MB video outputs stream straight to disk; downloads are restricted to RunComfy CDN hosts so a compromised model can’t trick the CLI into pulling arbitrary content.

Commands at a glance

Aliases: runcomfy requests get / result / cancel are equivalent to runcomfy status / result / cancel.

Which one runs my model?

  • A model from the catalogrun. No setup, per-request billing.
  • My own ComfyUI workflowdeployments run, against a deployment you create once and choose hardware for.
  • A LoRA I trained — either: pass it to run as an input on its base model, or deploy it for a dedicated endpoint.

Next steps

  • Quickstart — install, log in, generate your first image.
  • Install — npx, npm i -g, curl install.sh, build from source.
  • Authentication — device-code flow, RUNCOMFY_TOKEN for CI, where the token is stored.
  • Troubleshooting — exit codes, common errors, proxy issues.