The runcomfy CLI runs RunComfy AI media models from your terminal or any AI agent. It wraps the Model API so you can submit a request, wait for completion, and have the result automatically downloaded — in one command.Documentation Index
Fetch the complete documentation index at: https://docs.runcomfy.com/llms.txt
Use this file to discover all available pages before exploring further.
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 jsonemits a single line of JSON to stdout (stderr stays empty in JSON mode), soruncomfy ... | jq ...works in scripts. - AI-agent-friendly — every progress line goes to stderr; final payload to stdout;
sysexits-style exit codes (64usage /65data /69upstream /75retryable /77auth) so callers branch on failure type without parsing strings. - Browser OAuth —
runcomfy loginopens 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
| Command | Purpose |
|---|---|
login | OAuth authentication via the browser (device-code flow) |
logout | Clear the local token |
whoami | Show the currently authenticated user |
run | Run a Model API model end-to-end |
status | Poll a Model API request’s status |
cancel | Cancel a queued or running request |
completion | Generate a shell completion script |
runcomfy requests get and runcomfy requests cancel are equivalent to runcomfy status / runcomfy cancel.
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_TOKENfor CI, where the token is stored. - Troubleshooting — exit codes, common errors, proxy issues.
