---
title: "BlitzReels CLI and SDK: edit videos from your terminal"
canonical: "https://blitzreels.com/changelog/meet-the-sdk-and-cli"
---

# BlitzReels CLI and SDK: edit videos from your terminal

Milestone: 2026-05-09
Article published: 2026-09-26
Status: Product update

Install the BlitzReels CLI with npm, sign in from your browser, then clip, caption, edit and export videos from a terminal, a script or an AI agent.

![A glowing terminal command on a black background: npm install --global blitzreels.](https://blitzreels.com/images/changelog/meet-the-sdk-and-cli.jpg)

## Less glue between you and the edit

The [video API](https://blitzreels.com/changelog/video-creation-becomes-programmable) made BlitzReels programmable in February, but every integration still had to handle keys, requests and JSON on its own. If you spend your day in a terminal, or you’d like an AI agent to do the editing, that’s a lot of setup before the first cut.

In May we published two packages on npm that take care of it: `blitzreels`, a command-line tool, and `@blitzreels/sdk`, a typed TypeScript client. The CLI runs on the SDK, so both reach the same projects you open in the editor. The May 9 update added more editing and export commands.

## A first session in the terminal

Here’s a short session with today’s CLI. IDs come from the output of the step before.
1. Install it with `npm install --global blitzreels`, then run `blitzreels doctor` to see your version and whether a key is set up.
2. Sign in with `blitzreels auth login`. BlitzReels opens in your browser with a one-time code: check it matches the one in your terminal, then click Connect CLI. On a remote machine, add `--no-browser` and open the printed link yourself.
3. Check where you are with `blitzreels auth whoami`, which shows the workspace your key belongs to.
4. Bring in a recording with `blitzreels media upload --file ./episode.mp4`, or use `blitzreels media import-youtube --url URL` for a YouTube link.
5. Cut clips with `blitzreels clips create --asset-id ASSET_ID --count 5`. Add `--output ./clips` to export them as 1080p MP4 files on your machine.
6. Fix a misheard word: `blitzreels captions words list --project-id PROJECT_ID --match-text "Superbase"` finds it, and `blitzreels captions words text --project-id PROJECT_ID --word-id WORD_ID --text "Supabase"` corrects it.
7. Add a hook with `blitzreels text add --project-id PROJECT_ID --text "Wait for it" --at 0 --duration 2`.
8. Export: read the project’s revision with `blitzreels projects get --project-id PROJECT_ID --json`, run `blitzreels exports start --project-id PROJECT_ID --expected-revision N`, then save the file with `blitzreels exports download --export-id EXPORT_ID --output ./short.mp4`.

Every command accepts `--help`, and it works before you sign in.

## Built so AI agents can drive it

We designed the CLI so an AI agent can use it as carefully as you would. Claude Code, Codex and Cursor can all run it from their terminal. The [BlitzReels for AI agents](https://blitzreels.com/agents) page walks through the setup for each, and there’s a dedicated [Claude Code integration](https://blitzreels.com/integrations/claude-code) guide.

A few details make that work:
- `blitzreels agent-context --json` returns a compact index of commands, with the ones that write or delete marked.
- `blitzreels agent-context --command "media attach" --json` gives one command’s typed flags, defaults, examples and known errors.
- `--dry-run` on a write command prints the request without sending it.
- `--json` turns the output into data a script or an agent can parse.
- A typo such as `caption words list` gets a suggestion for `captions words list` instead of a silent failure.

Destructive commands always need an explicit confirmation flag, even in a dry run. If you’d rather connect an assistant without a terminal, use the [MCP server](https://blitzreels.com/mcp).

## The SDK, for your own code

If you’re building an app rather than a script, use the SDK. Install it with `npm install @blitzreels/sdk`, create a `BlitzReelsClient` with your API key, and call methods like `client.projects.list` or `client.clips.create`, with typed inputs and results. It has no Next.js or server-only imports, so it fits into your own TypeScript projects.

The [SDK guide](https://blitzreels.com/docs/sdks) has setup and examples. The [CLI documentation](https://blitzreels.com/docs/cli) covers each area: projects, media, clips, the timeline, effects, text, captions, audio, silence and mistake cuts, generation and exports.

## Access and limits

Both packages are free to install. What they can do depends on your workspace: the key saved by `auth login` belongs to one workspace, and its plan sets the credits, export limits and rate limits. When a command hits a plan limit, it stops with an `upgrade_required` error and a link to billing.

The key is stored in the macOS Keychain when available, otherwise in `~/.blitzreels/config.json`. The CLI checks for a new version at most once a day; `blitzreels version` shows the one you have, and `npm i -g blitzreels@latest` updates it.

## Questions

### How do I install the BlitzReels CLI?

Run `npm install --global blitzreels`, then `blitzreels auth login` to connect it to your account through the browser. To try it without installing, prefix commands with `npx`, as in `npx blitzreels auth login`.

### Can Claude Code, Codex or Cursor use the BlitzReels CLI?

Yes. Any agent that can run terminal commands can use it. `blitzreels agent-context --json` gives it a machine-readable list of commands, and `--dry-run` lets it preview a change before making it.

### What’s the difference between the BlitzReels CLI and SDK?

The CLI is a command-line tool for terminals, scripts and agents. The SDK, `@blitzreels/sdk`, is a typed TypeScript client for your own code. The CLI is built on the SDK, and both use the same API.

### Do I need a paid plan to use the BlitzReels CLI?

No, it works with any workspace. Your plan’s credits, export limits and rate limits still apply, and a command that hits one returns an `upgrade_required` error with a billing link.

### Which workspace does the CLI edit?

The one tied to the key that `blitzreels auth login` saves. Run `blitzreels auth whoami` to check it before you start.

## Make your first edit from the terminal

Install the CLI, sign in and find every command and flag in the CLI guide.

[Read the CLI guide](https://blitzreels.com/docs/cli)

We wrote this story later, looking back at our product history. The date at the top marks the work described here; features and access may have changed since then.