

The BlitzReels CLI is the same editor you use in the dashboard, exposed as commands. Run it yourself, or let your AI agent run it.

## Sign in [#sign-in]

```bash
blitzreels auth login
```

Opens BlitzReels in your browser, shows the one-time CLI code, and waits for you to click `Connect CLI`. After confirmation, the CLI remembers you on this machine.

If an agent is using the CLI for you, it should first probe the session:

```bash
blitzreels projects list --status active --json
```

If that reports a missing API key or signed-out state, run `blitzreels auth login`, then retry the same read command.

Only confirm the browser request when the code in BlitzReels matches the code printed in your terminal.

## Pick a workspace [#pick-a-workspace]

`auth login` gives the CLI an account key that works in every workspace you belong to. Each command acts in one of them.

```bash
blitzreels workspace list
blitzreels workspace use "BlitzReels Partners"
blitzreels auth whoami
```

`workspace list` marks the active workspace. `workspace use` takes an id or an exact name and saves it as the default. `workspace use --default` clears it.

For one command, pass `--workspace-id ID`. In scripts, set `BLITZREELS_WORKSPACE_ID`. Order: `--workspace-id`, then `BLITZREELS_WORKSPACE_ID`, then the saved default, then the key's own default.

## A typical session [#a-typical-session]

```bash
# Prepare brand context from a public website
blitzreels onboarding scan start --website-url https://example.com --json
blitzreels onboarding scan get --run-id RUN_ID --json
blitzreels onboarding profile get --json
blitzreels onboarding logo import --profile-id PROFILE_ID --replace-existing false
blitzreels onboarding complete --brand-name "Creator Studio" --platforms tiktok,linkedin --json

# Pull a YouTube video into your library
blitzreels media import-youtube --url https://youtu.be/...

# Or create a managed short directly from YouTube
blitzreels clips create --source-type youtube \
  --youtube-url https://youtu.be/... \
  --name "Launch clip" \
  --min-duration 8 \
  --max-duration 45 \
  --qa-mode permissive \
  --json

# Check admission and credits first, then poll the batch compactly
blitzreels clips quote --asset-id ASSET_ID --count 5 --json
blitzreels clips batch wait --batch-id BATCH_ID --timeout-ms 1800000 --json

# Add a hook to the first 2 seconds
blitzreels text add --project-id PRJ_xxx \
  --text "WAIT FOR IT" --at 0 --duration 2 \
  --font-family Pacifico --color "#17FFA6"

# Smooth an existing zoom effect
blitzreels effects zoom update --project-id PRJ_xxx \
  --timeline-item-id TLI_xxx --scale-end 1.1 \
  --easing easeInOut --duration 1.8

# Render the final short
blitzreels exports start --project-id PRJ_xxx
blitzreels exports download --export-id EXP_xxx --output ./short.mp4

# Inspect credit balance and AI Studio pricing (one row per model; --model ID for detail)
blitzreels credits balance --json
blitzreels credits pricing --kind video --json
```

## What the CLI covers [#what-the-cli-covers]

* **Projects** — create, rename, list, delete
* **Onboarding** — scan a website for brand context, review profile fields, import a logo, complete setup
* **Media** — upload files, import from YouTube, organize folders
* **Clips** — create managed shorts from YouTube or workspace assets
* **Timeline** — place clips, position overlays, move layers
* **Effects** — add/update zoom, mask, and color-grade effects
* **Text overlays** — hooks, lower thirds, brand cards
* **Captions** — apply themes, fix words, emphasize keywords
* **Audio** — search a stock library, drop in a track
* **Cuts** — remove silences and verbal stumbles, preview before applying
* **AI generation** — inspect credit pricing and generate images, videos, voice, music, and sound
* **Exports** — render and download finished shorts

## Built for AI agents [#built-for-ai-agents]

Every command supports flags that make automation safe:

* **Preview before it ships.** Add `--dry-run` to any write command and the CLI shows what it would do without doing it.
* **Pipes into anything.** Add `--json` and outputs become structured data your agent (or script) can parse.
* **Helpful error messages.** Typos suggest the closest valid command instead of failing silently.
* **Agent context.** `blitzreels agent-context --json` returns a machine-readable contract — flags, examples, destructive markers — so agents know what they can do.
* **Bounded output.** `--fields a,b` selects fields; list commands return compact rows by default. `--timeout-ms` bounds each API request, or the whole wait on `wait` commands.
* **Errors never look like success.** Failures exit non-zero and print one `{ "error": ... }` object to stderr; stdout stays empty.

Quoted `--prompt` values preserve line breaks.
Use `blitzreels credits pricing --kind KIND --json` before paid AI Studio generation.

## Brand onboarding for agents [#brand-onboarding-for-agents]

Use onboarding commands when a workspace needs brand context before video creation:

```bash
blitzreels onboarding scan start --website-url "https://example.com" --business-outcome book_calls --json
blitzreels onboarding scan get --run-id RUN_ID --json
blitzreels onboarding profile update --brand-name "Creator Studio" --protected-words "Brand,Product" --json
blitzreels onboarding logo import --profile-id PROFILE_ID --replace-existing false --json
blitzreels onboarding complete --brand-name "Creator Studio" --platforms tiktok,linkedin --save-workspace-icon true --json
```

The scan command returns a `run_id`. Poll it until the status is terminal, then read or patch the brand profile before completing onboarding. Mutating onboarding commands support `--dry-run`.

## Next steps [#next-steps]

* [Agent Skills](/docs/agent-skills-repo) — drop-in skill packs for Claude Code, Cursor, and Codex
* [Video Editor API and CLI](/docs/video-editor-api-cli) — captions, transcripts, B-roll, media, and export workflow
* [Agent Integrations](/integrations) — Claude Code, Codex, Cursor, and shell-agent video editing workflows
* [Quickstart](/docs/quickstart) — make your first short
* [API reference](/docs/reference) — the underlying REST API
