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

# CLI

> Install and use the Preview CLI to script against your projects, or connect coding agents like Claude Code to them.

A command-line client for your Preview production data: projects, stories, scenes, shots, takes, media, and library items. It's JSON-first and built for scripting and for agentic tooling like Claude Code and Codex, not as a replacement for the app.

## Install

```bash theme={null}
curl -fsSL https://download.preview.io/cli/install | bash
```

## Log in

Run `preview auth login`. It opens a browser to confirm a device code, then stores your credentials locally; every other command works once you're signed in.

## What it's useful for

* **Scripting your production data**: list, create, and update projects, stories, scenes, shots, and takes from the command line or a script, without opening the app.
* **Uploading and managing media**: attach files to shots, manage library items (Characters, Locations, Props), and organize project assets.
* **Connecting coding agents**: give Claude Code, Codex, or similar tools direct, structured access to a project so they can help plan and build it out.
* **Batch operations**: run a list of operations from a single file instead of one command at a time.

<Tip>
  Every command supports `--json` for scripting; destructive commands require an extra `--yes` confirmation flag.
</Tip>
