Leonardo Cli
Description
Leonardo.Ai CLI — generate images, videos, upscales. AI-agent and human friendly.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
leonardo-cli

A Leonardo.Ai command-line interface for generating images, videos, upscales, and more.
Designed to be both **AI-agent friendly** (`--json`, deterministic exit codes, stderr logs) and **human friendly** (colors, progress, helpful errors).
$ leonardo generate "a cyberpunk cat" -o cat.png
→ Submitting generation (1024x1024, n=1)
generationId: 4f8e...
→ Polling for completion...
attempt 1 — status: PENDING
attempt 2 — status: COMPLETE
✓ Saved cat.png (812345 bytes)
done 1 image(s)
Install
Requires [Bun](https://bun.sh) ≥ 1.1.
git clone https://github.com/mrgoonie/leonardo-cli.git
cd leonardo-cli
bun install
# run from source
bun run leonardo --help
# or build a single executable
bun run build && ./dist/cli.js --help
After `npm i -g leonardo-cli` you get two binaries pointing to the same CLI:
leonardo— full nameleo— short alias
API Key
Get a key at .
The CLI resolves your API key in this order — **first match wins**:
| Priority | Source | Example |
|---|---|---|
| 1 | --api-key flag |
leonardo --api-key lk_… me |
| 2 | LEONARDO_API_KEY env var (incl. OS-level shell) |
export LEONARDO_API_KEY=lk_… |
| 3 | .env.local / .env.*.local / .env (walks up from cwd) |
see .env.example |
| 4 | ./leonardo.config.json (walks up from cwd) |
see leonardo.config.example.json |
| 5 | User config: $XDG_CONFIG_HOME/leonardo-cli/config.json (default ~/.config/leonardo-cli/config.json) |
written by leonardo config set |
Inspect what was resolved:
leonardo config path # paths + which source the key came from
leonardo config show # effective config (key redacted)
leonardo config set apiKey lk_xxx
Output
Single file:
leonardo generate "a sunset" -o sunset.png
Directory (auto-named: `leonardo--NN.png`):
leonardo generate "a sunset" -d ./outputs -n 4
Skip
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI