Dolly from the terminal.
Install with npm, authenticate once, generate from any script or pipeline.
npm install -g dolly-cli
dolly auth login11 commands, 32 models, no dependencies. Node >=18.17.
Install
Two lines, then you are in
npm install -g dolly-clidolly auth loginThe key comes from Account, then API keys. It is stored in ~/.dolly/config at mode 0600, never echoed back, and never passed on the command line unless you pass it yourself. In CI, set DOLLY_API_KEY in the environment instead.
Reference
Every command
| Command | Flags | What it does |
|---|---|---|
dolly auth login [--base <url>] | --base | Store an API key in ~/.dolly/config |
dolly auth status | none | Show the signed-in account and balance |
dolly models | --kind | List models |
dolly assets add <files…> | --handle --kind | Upload and name an asset you can reference later |
dolly assets ls | none | List your assets |
dolly assets rm <handle> | none | Delete an asset |
dolly quote <kind> [prompt] | --model --refs --count --json | Price a generation without spending |
dolly gen <kind> <prompt> | --model --refs --out --yes --max-spend --count --no-wait --json | Generate. Shows the quote first |
dolly edit <op> <file> | --out --yes --json | bg-remove upscale extend reframe resize restore colorize retouch |
dolly job <id> | --json | Status of a job or batch |
dolly batch <file.csv> | --out --yes --max-spend --resume --dry-run --json | Run many rows with per-row quoting |
The flags that mean the same thing everywhere: --model <id>, --refs @handle, --out <dir|file>, --yes, --max-spend <credits>, --json, --no-wait. Run dolly --help for the same list in your terminal.
Examples
Four that earn their keep
An image, straight into the repo
A path with an extension is a file, so the output lands exactly where the code expects it.
dolly gen image "a matte black espresso machine on a marble counter" \
--out ./public/images/hero.png --yesA video from a reference
Upload the thing once, name it, then reference it by handle for as long as it is useful.
dolly assets add ./photos/watch-*.jpg --handle mywatch --kind product
dolly gen video "a slow push in, studio lighting" --model seedance-2.5 --refs @mywatch --out ./renders/A voiceover
Quote it first if you want to see the number before it is spent.
dolly quote voice "Everything you need, and nothing you do not." --model elevenlabs-v3
dolly gen voice "Everything you need, and nothing you do not." --model elevenlabs-v3 --out ./audio/vo.mp3 --yesA batch, with a ceiling
Every row is quoted before anything runs, and the ceiling is enforced by the server rather than by the script.
for p in ./prompts/*.txt; do
dolly gen image "$(cat "$p")" --out ./renders/ --max-spend 40 --yes
doneOutput
Output and files
Without --out, a generation prints its URLs and stays in your library. With --out, a path that has an extension is written as that file and anything else is treated as a directory, one file per output. Images come back as PNG or WEBP, video as MP4, voice and music as MP3, exactly as the model produced them.
With --json the whole run is one JSON document on stdout and nothing else, which is the mode to use from a script. The exit code carries the outcome:
| Exit | Meaning |
|---|---|
0 | ok |
1 | error |
2 | usage |
3 | auth |
4 | credits |
5 | ceiling/declined |
6 | moderation |
7 | generation failed |
8 | rate limited |
Questions
Questions, answered
What do I need installed?
Where is my key kept?
Can I run it in CI?
Does it tell me the price first?
What happens if a generation fails?
Is it the same account as the web app?
Elsewhere
Or let an agent do it
The MCP connector gives an assistant the same capability as tools rather than commands. Same account, same credits, same refunds.