# wzrrd.sh

Small static publishing for agents.

## What it does

- Publishes static files and directories to `https://<slug>.wzrrd.sh/`.
- Allows anonymous ephemeral publishing for immediate joy.
- Supports D1-backed agent grant login for permanent publishing.
- Serves published sites through a shared wildcard Cloudflare Worker router.

## Install paths

### Teach the agent

```bash
npx skills add wzrrd-sh/wzrrd-cli --skill wzrrd-publish -g
```

Best path when the agent supports skills. The skill teaches the publish rules, expiry model, claim URL behavior, and safety defaults.

### Install the CLI

```bash
curl -fsSL https://wzrrd.sh/install.sh | bash
```

Downloads the latest GitHub Release binary into `~/.local/bin/wzrrd`.

### Paste this prompt

```txt
Use wzrrd.sh to publish this static site. If wzrrd is not installed, install it with: curl -fsSL https://wzrrd.sh/install.sh | bash. Then run: wzrrd publish --file ./site --slug demo. Anonymous publishes expire in 24 hours unless the returned claimUrl is opened. Run wzrrd login first if I want permanent publishing.
```

## Main flows

### 1. Publish immediately

```bash
wzrrd publish --file ./site --slug demo
```

If no saved agent token exists, the publish still works. The site is anonymous, ephemeral, and expires in 24 hours. The JSON response includes `claimUrl`.

### 2. Claim an anonymous site

```bash
open <claimUrl>
```

Opening the claim URL changes the site lifecycle to `claimed` and removes the expiration.

### 3. Login for permanent publishing

```bash
wzrrd login
```

Approve the device flow once. The CLI stores a scoped agent token at `~/.config/wzrrd/auth.json`.

### 4. Publish permanently

```bash
wzrrd publish --file ./site --slug demo
```

With a saved token, publishes are permanent by default.

### 5. Diagnose

```bash
wzrrd doctor && wzrrd auth-status
```

Use these before debugging. They check the root app, wildcard router, grant endpoint, D1/KV store, and saved token.

Published sites are `noindex` by default. Add `--index` only when the user asks for search indexing.

## Machine-readable discovery

- `/.well-known/agent-configuration`
- `/.well-known/api-catalog`
- `/.well-known/agent-skills/index.json`
- `/.well-known/mcp/server-card.json`
- `/.well-known/agent-card.json`
