---
name: shothub
description: Git for generative media on FilmDrive v2. Every file keeps its prompts, inputs, parameters, notes, and lineage across every move. Use when organizing projects, navigating folders, moving or copying files, pulling or pushing media, generating takes, picking winners, ordering cuts, or running FilmDrive admin.
---

# FilmDrive

FilmDrive is **Git for generative media**. Projects work like a Linux directory tree, keeping prompts, settings, and inputs beside every image, video, and audio file.

## Install
```bash
curl -fsSL https://filmdrive.ai/install | sh && shot admin login https://filmdrive.ai && shot admin install --claude && claude mcp add -s user --transport http shothub https://filmdrive.ai/mcp
```
Windows PowerShell uses `irm https://filmdrive.ai/install.ps1 | iex`. Run `shot admin install` for all detected agents or call MCP `admin(what="install")`.

| Word | What It Means | Example Path |
|---|---|---|
| Project | Top-level shared workspace | `scott/cinderella` |
| Folder | Groups related items in `reference/`, `sessions/`, `collections/`, `sequences/`, `bags/`, or `albums/` | `sessions/day1/sh01` |
| Take | One uploaded or generated image, video, or audio file | `.../carriage-t1.mp4` |
| `@stack` | Group of alternate takes for the same slot inside one folder | `.../@carriage` |
| Cut | Named play order of shot paths, subfolders, `@stacks`, or takes that may repeat entries | `_info.json` `cuts` |

## Six Rules

1. **Links first, bytes once.** Share `/s/` links instead of zips. Moves, copies, and 30-day `--undo` restores reuse stored file hashes without copying bytes.
2. **Folders group items.** Nest related takes under one parent folder instead of flat sibling folders.
3. **Inspect before editing.** To list the user's projects, call `ls(target="projects")` once over MCP or run `shot ls` in the CLI and answer right away without scanning local folders or every project. In the CLI, `shot pwd` shows the active folder and `shot cd` saves it per profile. Over MCP, always pass full `owner/project/...` paths and call `get(target="owner/project", tree=True)` before creating folders or rendering.
4. **Point with `@name`.** When reading, `@name` checks the current folder first, walks up parent folders to root, then looks in `reference/`. When writing or deleting, bare `@name` stays inside your current folder.
5. **RBAC guards every project.** Control who can see or edit information by granting `viewer`, `editor`, or `owner` access to an individual email or a team email list. Owners and editors can add or remove non-owners, while only owners can add, change, or remove owners. See [sharing.md](references/sharing.md).
6. **Ask before tidying someone else's folder.** Look through local files first, ask which files to skip and what plain names to use, and group extra takes into `@stacks`.

## Sidecars on Import and Export

Plain uploads need zero JSON files. When a folder or file carries extra details, FilmDrive stores two optional sidecars.

| Sidecar | Scope | What It Holds |
|---|---|---|
| `_info.json` | One folder | Its `kind`, still `hold` seconds, metadata, picks, and named `cuts` play orders with unlisted items in `unused` |
| `<stem>.json` | One media file | Recipe fields such as `tool`, `model`, `op`, `prompt`, `@name` `inputs`, `input_roles`, `based_on`, and `params`, plus `time` trim, `stack`, tags, and notes |

## Domain Guides
Open the matching guide in `domains/` before creating folders or pushing files. Default to [film.md](domains/film.md).

| Domain | Guide | Folder Structure |
|---|---|---|
| Film | [film.md](domains/film.md) | `reference/`, `sessions/`, `collections/`, and `sequences/` |
| Personal | [personal.md](domains/personal.md) | `<handle>/.inbound/<folder>/<files>` plus albums |
| Datasets | [dataset.md](domains/dataset.md) | `bags/<name>/<files>` with `--kind bag` |

## Verbs for MCP and CLI

Every verb below is **both** an MCP tool name and a `shot <verb>` CLI command accepting `--in`, `--as`, `--limit`, `--cursor`, `--json`, and `--yes`. When signed out, run `shot admin login` in the CLI or ask the user to click **Authenticate** on the `shothub` MCP server. Never call `/v2/auth/codes` under rule `ACCESS-6`.

| MCP Tool / CLI Command | Key MCP Args & CLI Flags |
|---|---|
| `get` / `shot get` | `target` such as `owner/slug`, `models`, `events`, or `new`, plus `tree=True`, `group`, `detail`, and `mobile=True` |
| `set` / `shot set` | `target` or `targets`, `title`, `summary`, `kind`, `stack`, `tags`, `only=True`, `time`, `hold`, `note` |
| `search` / `shot search` | `query`, `scope` or `--in`, `tags`, `like`, `used` or `--used REF`, `picked`, `sort`, `group` |
| `make` / `shot make` | `target` or `--in`, `prompt`, `stack`, `kind`, `inputs` or `--input`, `based_on`, `model` or `--with`, `params`, `grid`, `bake`, `cut`, `dry_run` |
| `pick` / `shot pick` | `target`, `approve=True` or `--approve`, `off=True` or `--off`, `note` |
| `cut` / `shot cut` | `target` or `--in`, `name` or `--name`, `items`, `insert`, `move`, `remove`, `pick=True` or `--pick`, `mobile=True`, `delete` |
| `pull` / `shot pull` | `target`, `format` such as `flow`, `canvas`, or `shothub`, `mobile=True` or `--mobile` |
| `push` / `shot push` | `target` or `--in`, `files` with `data_base64`, `url`, or `{name, size}`, `source` including `gcs_uri` with `format` `raw`, `--async`, `dry_run` |
| `share` / `shot share` | `target`, `add` or `--add`, `remove` or `--remove`, `role` such as `viewer`, `editor`, or `owner` |
| `admin` / `shot admin` | `what` such as `whoami`, `spend`, `lists`, `sample`, or `install`; CLI also adds `access gs://bucket/` with `--remove` to open or close GCS bucket reads |

When a user says **"Show me Goldilocks"**, asks for a practice project, or signs in with no projects yet, call `admin(what="sample")` over MCP or run `shot admin sample` in the CLI. Then open the returned project with `get(target=..., tree=True)` and show its `href`. Ask again any time to reset that private copy to the sample under rule `ACCESS-12`.

Linux file commands **`ls`**, **`find`**, **`mkdir`**, **`cp`**, **`mv`**, and **`rm`** also work as both MCP tools and `shot` commands. Both `cp` and `push` accept `gs://bucket/prefix/` paths for recursive server-to-server imports of media plus FilmDrive sidecars and `_info.json`. Use `--undo` or `undo=True` on `rm` to restore a soft-deleted item. The CLI also includes `pwd`, `cd`, and `man`. On MCP, `find`, `search`, `ls`, and `get` return a ready-to-paste `markdown` image on every take so you can display visuals right in chat. Pass `-t 4.0:9.5` in the CLI or `time=[4.0, 9.5]` on MCP `set`, `cp`, or `mv` to trim clips.

## References
| File | MCP Resource URI | Solves |
|---|---|---|
| [moving.md](references/moving.md) | `shothub://references/moving` | Folder navigation, `@name` scoping, and moving, copying, or uploading files |
| [film-language.md](references/film-language.md) | `shothub://references/film-language` | `@stacks`, picks, cuts, `@names`, and note anchors |
| [models.md](references/models.md) | `shothub://references/models` | Model input schemas, `--input` vs `--based-on`, `--dry-run`, and spend |
| [billing.md](references/billing.md) | `shothub://references/billing` | Credit tiers, micro-credit holds and refunds, BYOK keys, and token spend caps |
| [bots.md](references/bots.md) | `shothub://references/bots` | `/v2/chat` SSE, MCP chat tools, `screen_context`, hot window, and cold history |
| [take-json.md](references/take-json.md) | `shothub://references/take-json` | `_info.json`, `cuts`, `<stem>.json`, `Recipe`, and `Note` |
| [sharing.md](references/sharing.md) | `shothub://references/sharing` | Project roles, `shot admin lists`, `--as` tokens, and `/mcp` |
| [events.md](references/events.md) | `shothub://references/events` | Unseen dailies, history, cursors, and jobs |
| [links.md](references/links.md) | `shothub://references/links` | Short `/s/` deep links, `focus`, and `seq` |
| [previews.md](references/previews.md) | `shothub://references/previews` | Thumbnails, blur hashes, video hover grids, and iOS mobile MP4 playback |
| [cli.md](references/cli.md) | Local CLI via `shot man` | CLI flags and per-verb man pages under `cli/` plus HTTP `/v2` in [api.md](references/api.md) |
