> ## Documentation Index
> Fetch the complete documentation index at: https://docs.littledemo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI demos

Generate, list, inspect, and open demos from the command line.

## Generate a demo

```bash
littledemo demos create \
  --project proj_abc123 \
  --prompt "Show creating a workspace and inviting a teammate"
```

By default, the CLI waits for the demo to finish and prints the share URL plus iframe.

## Upload a local recording

```bash
littledemo demos upload ./demo.mp4 \
  --project proj_abc123 \
  --prompt "Show the checkout animation after applying a coupon" \
  --title "Coupon checkout flow" \
  --duration-ms 12000 \
  --open
```

The command uses your `littledemo login` credentials or `LITTLEDEMO_API_KEY` and uploads the video directly. Uploaded recordings become ready demos immediately and use the same share page, iframe, and media endpoints as generated demos.

Supported files are MP4 and WebM up to 100 MB (WebM requires Starter or higher; the Free plan accepts MP4 only). .mov screen recordings (macOS default) are remuxed to mp4 automatically (needs ffmpeg on PATH). Add `--thumbnail [file]` and `--gif [file]` to attach a PNG poster and an animated GIF (auto-detects sibling files named after the video, e.g. `demo.png`/`demo.gif`) — these power social unfurls and the `/thumb/:id.png` + `/gif/:id.gif` shortcut URLs used in PR comments. Use `--json` when an agent or PR script should capture the resulting `shareUrl`, `embedUrl`, and `videoUrl`.

## Useful flags

```bash
littledemo demos create \
  --project proj_abc123 \
  --prompt "Show the pricing plans and annual billing toggle" \
  --duration 10s \
  --template pricing-focus \
  --open
```

| Flag | Purpose |
| --- | --- |
| `--project` | Project ID. |
| `--prompt` | What the demo should show. |
| `--duration` | Target duration, such as `10s`. |
| `--template` | Recording style nudge. |
| `--style` | Alias for `--template`. |
| `--section` | Section hint for `section-focus`. |
| `--no-wait` | Queue and return immediately. |
| `--open` | Open the share page when ready. |
| `--json` | Print machine-readable output. |

## Inspect demos

```bash
littledemo demos list --project proj_abc123
littledemo demos get demo_abc123
littledemo demos open demo_abc123
```