npx claudepluginhub mrgoonie/leonardo-cli --plugin leonardoThis skill uses the workspace's default tool permissions.
Drive Leonardo.Ai (https://leonardo.ai) end-to-end: text-to-image, text-to-video, image-to-video, upscaling, and account/credit management. Wraps the `leonardo` (alias `leo`) CLI shipped at https://github.com/mrgoonie/leonardo-cli.
Generates images using Gemini (default) or fal.ai FLUX.2 klein 4B (--cheap for speed/cost), and videos with Grok Imagine or fal.ai LTX-2. CLI supports aspect ratios, quality, image editing via --assets.
Generates images from text, edits/upscales images, creates videos from images/videos via Venice AI APIs using Python CLI scripts. Supports Sora, WAN, Runway models.
Provides fal.ai image-to-video endpoints, motion keywords, prompts, and TypeScript/Python examples for Kling 2.5/2.6 Pro, MiniMax Hailuo, Luma Dream Machine, SVD. For portrait/product animation workflows.
Share bugs, ideas, or general feedback.
Drive Leonardo.Ai (https://leonardo.ai) end-to-end: text-to-image, text-to-video, image-to-video, upscaling, and account/credit management. Wraps the leonardo (alias leo) CLI shipped at https://github.com/mrgoonie/leonardo-cli.
Bundled slash commands: /leo-gen <prompt> (image), /leo-video <prompt> (video). They activate this skill and dispatch to the CLI with sensible defaults.
This skill handles: prompting, model selection, polling, file output. It does NOT handle: payment/billing UI, dataset training, fine-tuned model creation (use Leonardo's web app for those).
LEONARDO_API_KEY. If a user pastes it inline, redact it in any summary.leo config path instead.npm i -g leonardo-cli (exposes leonardo and short alias leo).--api-key flagLEONARDO_API_KEY env var.env / .env.local (walks up cwd)./leonardo.config.json~/.config/leonardo-cli/config.jsonleo me (shows credits + tier) and leo config path.| Goal | Command |
|---|---|
| Text → image (with download + polling) | leo generate <prompt> |
| Text → video (returns jobId, no auto-poll) | leo video <prompt> |
| Upscale an image by ID | leo upscale <imageId> |
| Fetch upscale/variation result | leo variation <variationId> |
| Poll a generation/job | leo status <generationId> |
| List image models | leo models |
| List video models | leo video-models |
| Account + credits | leo me |
| Manage config | `leo config get |
For images, run leo models and pick a UUID; for videos use the static enum from leo video-models. See references/image-models.md and references/video-models.md for curated picks per use case (photoreal, anime, cinematic, fast, premium).
Image (single):
leo generate "a cyberpunk cat" -o cat.png
Image (batch into directory):
leo generate "a sunset" -d ./outputs -n 4 -w 1024 -h 1024
Image (advanced flags):
leo generate "moody portrait" -m <modelUuid> --alchemy --ultra \
--contrast 3.5 --negative "blurry, low quality" --seed 42
Video (text-to-video):
leo video "a dragon flying over Tokyo" -m VEO3 --resolution RESOLUTION_720
Video returns a generationId immediately — poll with leo status <id> until COMPLETE; download the URL with curl/wget.
Always pass --json when running the CLI from inside agentic workflows or scripts. stdout becomes a single JSON object; stderr carries human progress; colors disabled.
leo generate "a cat" --json | jq '.images[0].path'
leo video "a cat" --json | jq -r .generationId
JSON shape (image):
{ "ok": true, "generationId": "...", "status": "COMPLETE",
"images": [{ "id": "...", "url": "...", "path": "./...png", "bytes": 812345 }] }
| Code | Meaning | Action |
|---|---|---|
| 0 | Success | continue |
| 1 | Generic failure | inspect stderr |
| 2 | Usage / argument error | fix flags |
| 3 | Missing/invalid auth | check leo config path |
| 4 | Leonardo API error | retry or inspect API status |
| 5 | Polling timeout | re-run leo status <id> |
| Use case | Command |
|---|---|
| Photoreal portrait | leo generate "<prompt>" -m 7b592283-e8a7-4c5a-9ba6-d18c31f258b9 --alchemy --contrast 3.5 |
| Quick draft (cheap) | leo generate "<prompt>" -w 512 -h 512 --no-download --json |
| Veo 3 cinematic | leo video "<prompt>" -m VEO3 --resolution RESOLUTION_720 --enhance |
| Motion 2.0 fast | leo video "<prompt>" -m MOTION2FAST --resolution RESOLUTION_480 |
| Kling 2.5 turbo | leo video "<prompt>" -m Kling2_5 --resolution RESOLUTION_720 |
For full per-model recipes (parameters, costs, supported resolutions, image-to-video), load references/recipes.md.
references/image-models.md — choosing image model + tuning flags (alchemy/ultra/contrast/style)references/video-models.md — full video model enum, resolution support, t2v vs i2vreferences/recipes.md — copy-paste recipes per family (Motion 2, Veo 3, Kling, Hailuo, LTX, Seedance)references/troubleshooting.md — auth errors, timeouts, common API errorsleo config path → confirm key source. Fix with leo config set apiKey lk_....leo status <id>; raise --wait-timeout for slow models (Veo, large batches).images[]: API returned COMPLETE but content was filtered; revise prompt.Kling2_5 not kling2_5). Cross-check with leo video-models.-o given.-d given OR -n > 1. Auto-named leonardo-<id>-NN.png.LEONARDO_OUTPUT_DIR env → outputDir config → ..--no-download: skip files, only emit URLs.