# Put it on Shed: a guide for coding agents

You're a coding agent, and the person you're working with wants what you built (or are about to build) online, with a link they can share. Follow this page from top to bottom. It takes about two minutes, and the person only has to do one thing: click a sign-in link in their email.

**What Shed is.** Shed hosts small web apps. A folder with an `index.html` gets its own address, sign-in, a shared JSON database, live updates and Google-Docs-style sharing (viewer, editor, owner). There is no backend to write and none to run.

**What it costs.** Nothing. Cloud Free is $0 with no card: 3 apps, unlimited viewers and editors, 5 MB per deploy, 10 MB of data per app. Don't ask the person about pricing unless they hit a limit.

**Server:** https://shedcloud.dev

## 1. Check whether this computer is already signed in

```sh
npx -y shedcloud@latest whoami
```

If it prints an email address, skip to step 3. If it also lists a `team:`, the person is on a Cloud Team: ask whether this app is for that team. If it is, add `--team <team>` to the deploy below, so everyone on the team can open it and it doesn't use up the person's own apps.

## 2. Sign in (the person clicks one link)

Ask the person which email address to use. You can suggest the one in `git config user.email`, but confirm it: the link goes to that inbox. Then run:

```sh
npx -y shedcloud@latest login --email THEIR_EMAIL --no-wait
```

`--no-wait` returns straight away instead of waiting for the click, so your command can't time out. It prints a code such as `WQKL-U9UN`. Tell the person, in these words or close to them:

> I've sent a sign-in link to **their@email**. Open the email "Sign in to Shed", click the link, check the page shows **WQKL-U9UN**, and choose **Approve terminal**. Tell me when that's done.

When they say it's done, run `npx -y shedcloud@latest whoami`. It finishes the sign-in and prints their address. If it says sign-in is still waiting, they haven't approved yet: ask again. If the email doesn't arrive in a minute, ask them to check spam, then run the login command again with `--resend`.

Never try to open their inbox or click the link yourself. The sign-in is saved in `~/.shed/config.json`, so this happens once per computer.

## 3. Make sure the app fits Shed

Shed serves static files. Check the project against these rules before deploying:

- **One folder with an `index.html` at its top.** Plain HTML, CSS and JS work as they are. For React, Vue, Svelte, Vite or similar, build first and deploy the output folder (usually `dist/` or `build/`). Root-relative paths work: each app is served at the root of its own subdomain, and unknown paths fall back to `index.html`, so client-side routing works too.
- **No server code.** No Express, Flask, Next.js API routes or server actions. If the app needs to save or share data, use Shed's SDK instead of a backend or a database service. Use it instead of `localStorage` too whenever other people should see the data, or it should follow the person to another device.
- **No secrets.** Everything in the folder is downloadable by whoever can open the app. Don't deploy API keys, `.env` files or private data. Dotfiles and `node_modules` are skipped automatically.

The SDK, if the app needs sign-in or shared data:

```html
<script src="/_shed/sdk.js"></script>
<script type="module">
  const me = await shed.me();          // { user: { email } | null, role: 'viewer'|'editor'|'owner', app }
  const todos = shed.db('todos');      // a shared collection; make up any name
  await todos.add({ text: 'Ship it' }); // also: list(), get(id), put(id, obj), update(id, patch), remove(id)
  todos.subscribe((records) => render(records)); // runs now and whenever anyone changes it
  if (await shed.can('edit')) showEditControls(); // viewers can read but not write
</script>
```

Records are JSON objects shared by everyone who can open the app; each comes back with an `id` and `_meta` (`created_by`, `updated_by`, `created_at`, `updated_at`). Viewers can read, editors and owners can write.

If people should only change their own records (posts, votes, standup updates), say so in the app's `shed.json` (the file deploy writes: in the app folder, or the project folder when you deploy a build folder like `dist/`). Shed enforces it on the server:

```json
{ "rules": { "posts": "author" } }
```

Editors can still add records to `posts`, but only the person who added one (or an owner) can change or delete it. In the page, show edit buttons only where `record._meta.created_by === me.user.email`. For a quick start, `npx -y shedcloud@latest init my-app` writes a complete one-file example (a shared notes list). Full reference: https://shedcloud.dev/docs/sdk.md

Optional look: `<link rel="stylesheet" href="/_shed/kit.css">` gives clean paper-and-ink styling with no classes needed.

## 4. Deploy

```sh
npx -y shedcloud@latest deploy ./dist --name my-app
```

Use the app's folder (`.` for the current one). `--name` becomes the address, `https://my-app.shedcloud.app`: 1 to 40 lowercase letters, digits or dashes. Without it, the folder's name is used. The deploy writes `shed.json` with the name (into the project root when you deploy a build folder like `dist/`, so rebuilds don't erase it). Keep it and commit it: deploying again updates the same app as a new version. Data is never touched by a deploy.

If it fails:

| Message | What to do |
|---|---|
| "…" is taken | Someone else has that name. Pick another `--name`. |
| No index.html in … | Deploy the folder that has `index.html` at its top (the build output). |
| Deploy is too large | Deploy only the built output, without source maps, videos or data files. |
| Cloud Free includes 3 apps | Tell the person. They can delete an app they don't need (`npx -y shedcloud@latest rm <app> --yes`, ask first: it deletes its data) or redeploy over an existing one. |
| Not signed in | Go back to step 2. |

## 5. Share it

A new app opens only for its owner. Ask the person who should have it, then:

```sh
npx -y shedcloud@latest share my-app --add sam@example.com --invite           # can view; Shed emails them a link
npx -y shedcloud@latest share my-app --add sam@example.com:editor --invite    # can view and change data
npx -y shedcloud@latest share my-app --org editor                             # everyone at the person's company email domain
npx -y shedcloud@latest share my-app --signed-in editor                       # anyone who signs in with the link
npx -y shedcloud@latest share my-app --public viewer                          # anyone with the link, no sign-in
```

`--invite` emails each person a link that signs them in and opens the app, so they don't have to type anything. Use it unless the person wants to send the link themselves; without it, the command prints a message for them to send.

For "my team should be able to post" when you don't have everyone's email, use `--org editor`: anyone who signs in with an address at the person's own company domain can post. It needs a company address; for a personal one such as gmail.com, use `--signed-in editor`, which lets in anyone with the link who signs in (add `--domain theircompany.com` to keep it to one company). Every record shows who wrote it. These print a message for the person to post to their team; pass it on.

Don't use `--public editor` unless they ask for it: it lets anyone with the link change the data without signing in.

## 6. Tell the person

End with the link and what happens next, for example:

> **It's live: https://my-app.shedcloud.app**
> Only you can open it right now. I can share it with people (view or edit), or make it public. To change it, ask me; I'll redeploy to the same address, and every version is kept so we can roll back with `shedcloud rollback my-app v1`.

## Optional: remember Shed for next time

So future sessions can deploy without this page:

- **Claude Code:** save https://shedcloud.dev/skill.md as `~/.claude/skills/shed/SKILL.md`, and add the MCP server: `claude mcp add shed -- npx -y shedcloud@latest mcp`
- **Cursor, Windsurf and other MCP clients:** add an MCP server with command `npx` and arguments `-y shedcloud@latest mcp`.
- **Any other agent:** add a line to the project's `AGENTS.md` or `CLAUDE.md`: "Deploy with `npx -y shedcloud@latest deploy <folder>`; Shed guide: https://shedcloud.dev/start.md".

Ask the person before changing their agent's settings.

## More

- All the docs, for agents: https://shedcloud.dev/docs/llms.txt
- SDK reference: https://shedcloud.dev/docs/sdk.md
- CLI reference: https://shedcloud.dev/docs/cli.md
- Limits and every error message: https://shedcloud.dev/docs/limits.md
