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

# Bundle rules

> The exact rules of bundles: deploying a directory, the deploy flags, visibility, managing bundles, and how agents read one

For agents and developers: the exact rules bundles follow. For what a bundle is and why to deploy one, read [Bundles](https://docs.tokenrip.com/concepts/bundles.md).

A **bundle** is a versioned tree of files deployed as a single unit. Where an [artifact](https://docs.tokenrip.com/concepts/artifacts.md) is one file, a bundle is a whole directory — and its primary use is hosting a **live static website**.

Deploy a folder of HTML/CSS/JS and get back a URL that serves it as a real site: relative links between pages work, assets load, and client-side JavaScript runs. It's the right primitive for a multi-page course, a microsite, a generated report with assets, or any static `dist/` directory.

## Deploy a directory

```bash theme={null}
rip deploy ./my-site --title "My Site"
```

The CLI zips the directory, uploads it, and prints two URLs:

* **Live site** — `https://bundles.tokenrip.com/<id>/` — the rendered website.
* **Page** — `https://tokenrip.com/b/<id>` — a shareable page showing the file list, with links to the live site and a downloadable archive.

`index.html` at the root is the default entrypoint. Re-deploy a new version anytime:

```bash theme={null}
rip deploy ./my-site --bundle <id-or-slug>   # publishes a new version (archive, --description, --entrypoint, --spa)
rip bundle rollback <id-or-slug> 1            # flip back to an earlier version
```

`rip deploy <dir>` and `rip bundle deploy <dir>` are the same command. Its flags:

| Flag | Description |
| - | - |
| `--title <title>` | Display title of a new bundle (default: directory name) |
| `--slug <slug>` | Human-readable slug of a new bundle |
| `--description <text>` | Optional description |
| `--bundle <id-or-slug>` | Publish a new version of an existing bundle. A version takes the archive, `--description`, `--entrypoint` and `--spa`; `--title`, `--slug` and `--visibility` belong to the bundle and are refused here |
| `--visibility <v>` | `private`, `link` (default), or `public`, for a new bundle |
| `--entrypoint <file>` | Default file to serve (default: `index.html`) |
| `--spa` | SPA fallback — serve the entrypoint for unknown paths |
| `--dry-run` | Zip and inspect locally without uploading |

> [!NOTE]
>
> Live sites are served from a dedicated, cookieless origin (`bundles.tokenrip.com`) — separate from the app — so your site's JavaScript runs in full isolation. Your fonts and CDN scripts load normally.

## Visibility

| Visibility | Live site | Who can see it |
| - | - | - |
| `link` (default) | served at the unguessable URL | anyone with the link |
| `public` | served at the same URL, marked public | anyone |
| `private` | not live-served | only you (via the authenticated API) |

```bash theme={null}
rip deploy ./course --visibility public
```

## Managing bundles

```bash theme={null}
rip bundle list                 # your bundles
rip bundle get <id-or-slug>     # metadata + file manifest
rip bundle versions <id>        # version history
rip bundle open <id> --browser  # open the live site
rip bundle delete <id>          # to the trash for 30 days; rip trash restore <id>
```

The web app has no bundles page: deploy and manage bundles from the CLI or through your agent. A deleted bundle shows on the web app's **Trash** page, where you can restore it.

## For agents

Every bundle is readable structurally without rendering: `GET /v0/bundles/<id>` returns metadata plus the full file manifest, and `GET /v0/bundles/<id>/files/<path>` streams any file. The MCP tools `deploy_bundle`, `bundle_get`, and `bundle_get_file` cover the same ground; each names the bundle `id`: its id, your slug for it, its live URL or its page URL. The `/b/<id>` page embeds `tokenrip:*` meta tags and JSON-LD so an agent can discover the live site and file tree from the HTML alone.

> [!TIP]
>
> Building the site from a folder is the CLI's job (`rip deploy ./dir`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.