---
name: scoobah
description: Publish standalone HTML write-ups, specs, reports, and UI mocks to scoobah.dev, or read scoobah.dev/d/ URLs.
---

# Scoobah

Publish standalone HTML documents (plans, specs, benchmarks, UI mocks) to `https://scoobah.dev`, or fetch and read `https://scoobah.dev/d/...` URLs.

## Setup check

If `scoobah` is not installed yet, follow `https://scoobah.dev/llms.txt` to install `~/.scoobah/cli.mjs` and symlink `~/.local/bin/scoobah`.

Check readiness before building a large or interactive document:

```sh
scoobah whoami --json
```

If authentication fails, ask the user to run `scoobah auth login --api-url https://scoobah.dev` in their terminal.

## Publishing workflow

1. Write a self-contained HTML file (or a folder of `.html` files with `index.html`).
2. Validate before uploading:
   ```sh
   scoobah check ./plan.html
   ```
   Fix all errors and review warnings.
3. Upload and inspect the JSON receipt:
   ```sh
   scoobah upload ./plan.html --json
   ```
   A document is published only when the receipt has `"ok": true`. Report the local file path, `url`, and `versionUrl`.
4. To update later, run `scoobah upload ./plan.html` (local path bindings automatically update the same draft) or pass `--draft <id>`.

## Service & sandbox rules

- **Size:** 8 MiB total HTML per upload, max 50 `.html` pages per folder.
- **JavaScript:** inline `<script>` and inline event handlers are allowed and run inside an opaque-origin CSP sandbox (no cookies, localStorage, fetch/XHR, WebSockets, workers, or `alert`/`confirm`/`prompt`). Keep state in memory or `location.hash`.
- **Assets:** `https:` and `data:` images, audio, video, and fonts load; `https:` stylesheets load. Local relative asset files (`./chart.png`) will not load because Scoobah hosts HTML only.
- **Blocked:** external `<script src>`, `<iframe>`, `<object>`, `<embed>`, `<base>`, `<meta name="referrer">`, `<meta http-equiv="refresh">`, and `javascript:` URLs.
- **Privacy:** drafts are public to anyone with the URL. Never publish secrets, tokens, or private internal URLs.

## Retention & garbage collection

- Unstarred drafts without a custom `--slug` expire 30 days after their last update (daily 04:00 UTC GC).
- Star (`scoobah star <id-or-url>`) or pass `--slug <name>` to keep a draft permanently.
- Active drafts keep the latest 3 versions; older versions are pruned automatically.
- Soft-deleted drafts (`scoobah delete <id-or-url>`) stop serving immediately, free their slug immediately, and are permanently purged after 7 days.

## Reading a scoobah.dev URL

Every `https://scoobah.dev/d/...` URL serves raw HTML byte-for-byte. Fetch it directly with `curl` into a temp file:

```sh
out=$(mktemp -t scoobah.XXXXXX) && curl --fail --silent --show-error --location --max-time 30 --dump-header "$out.headers" --output "$out" --write-out '%{url_effective}\n' '<url>' && echo "$out"
```

Drop any `#fragment` before fetching. Check `X-Scoobah-Draft-Version` in `$out.headers` if you plan to cite or update the version later.

## Default document style

Unless the user asks for something else:
- True black (`#000`) background, white (`#fff`) primary text, dark gray accents only.
- Information-dense and scannable, mobile-readable (`viewport` meta tag, fluid widths).
- No decorative hero banners, pill chrome, marketing copy, or em dashes.
- External links use `target="_blank" rel="noopener noreferrer"`.
