# How does Irene publish a website?

**The `site` toolkit publishes a folder of files as a live static website at its own public link on `sites.mycelen.com`. A folder with an `index.html` becomes a page; anything else becomes a file to download. Re-publishing the same name updates it. Irene asks before anything personal goes public, and won't publish keys, passwords or someone's personal data.**

---

## What makes it different

| what it does | the primitive behind it | what that buys you |
|---|---|---|
| **A real link, not a folder of code** | Files upload to Irene's own host, which serves them to anyone with the link | A chat agent hands you code; Irene hands you a URL a stranger can open |
| **Static by design** | Sites are plain files served as they are: no server, no running process | Nothing to keep alive, nothing to scale, nothing to break at 3 a.m. |
| **Private by default** | The vault keeps things private inside Irene; only publishing makes a public link | Nothing goes public by accident |
| **An agent can't take your site down** | An agent you give one site to can only publish to it; it has no tool that removes a site | Handing a site to an agent is safe |
| **You can find your links again** | Published vault items get their link stamped back on them | Ask "what did I publish?" and get the links back |

---

## How it works

### Publish

1. The agent builds what you asked for, usually a page from the Coding or Design agent, or a document from your vault.
2. It publishes the **built** folder. For an app that's the build output (`dist`, `build`), not the source code.
3. Every file in the folder is uploaded in one go, skipping hidden files (`.env`, `.git` and anything starting with a dot), `node_modules` and caches.
4. You get the live link back.

| folder contains | becomes |
|---|---|
| an `index.html` at the top | a **page** at `https://sites.mycelen.com/<name>/` |
| no `index.html` | a **file** to download (one file gets a link straight to it) |

Pages work like normal websites: links between pages, images, and single-page apps, where unknown paths fall back to `index.html`.

**Why static:** a site that's just files needs no server sized for traffic, so nothing runs or costs compute between visits. When a site needs a backend, it uses Irene's other hosted pieces: a [store, database](https://mycelen.com/manual/reference/toolkits/store) or a hosted [toolkit](https://mycelen.com/manual/reference/toolkits/build-your-own-toolkit).

### Update and take down

- **Publishing the same name again replaces the site.** It's the safe way to update.
- **Unpublish** removes it from the web. The original folder on your computer stays.
- **Unpublishing a vault item** also clears its stamped link, so search stops offering a dead link.

### From the vault

Ask to share a note or file from the vault and Irene publishes it as its own site. A note becomes a web page, and other files become downloads. Irene tells you which it handed over.

### Built agents

When you build an agent, you can give it **one site by name**. That agent can only publish to that site. It can't list your other sites, check them, or take any down.

---

## What never goes on a public URL

Search engines find public links, and link previews cache them. **A page taken down is not a page nobody saw.** So:

- If the content looks personal or internal, Irene asks once: *"This will be at a public URL that anyone with the link can open. Publish it?"*
- Irene won't publish **API keys, tokens, passwords or `.env` files**, **someone's personal data**, **a page imitating a real company or person**, or **a form collecting card or login details**. It names the file and stops.

---

## Its tool

| action | does |
|---|---|
| `publish` | upload a folder under a name (create or replace) and return the link |
| `list` | every site published from this computer (instant and offline, from `~/.irene/sites/index.json`) |
| `status` | how many files, how big, and the link |
| `unpublish` | take the site down |

**The link always comes from the host.** Irene never writes one itself, because a guessed link is a link that 404s.

**Added only when needed:** agents attach `site` (or you type `@site`) when there's something to publish.

---

## Approvals

- **Publishing counts as sending.** It asks first, and in auto mode it goes to the judge, which only allows it if you asked to publish this thing.
- **Unpublishing counts as deleting.**
- **Listing and checking status** send the agent's words to the host, so in auto mode those also go to the judge rather than running freely.

---

## Where you see it

- **In the chat:** "Publishing react-counter" → "Published react-counter", with the live link. A failure says "Couldn't publish", never "Published".
- **Vault items** you've published show their link and "anyone with the link can read it".
- **`list`** shows every site you've published from this computer.

---

## A real one

A small React counter app: the agent published its built `dist` folder (148 KB) rather than the 40 MB source with its dependencies. It's still live at `sites.mycelen.com/react-counter/`. Dreaming also saved two lessons from that run: wait a few seconds before checking a fresh link, and give the folder's full path.

Built-in skill: **publishing-a-site** (Capabilities → Skills).

---

## What it costs

- **Publishing uses no model and no usage.** Serving a site costs you nothing per visit.
- **Sites included with your plan:** Free 0 · Starter 1 · Pro 3 · Power 10 · Ultra 25; each one past that is $1 a month, up to Free 1 · Starter 5 · Pro 20 · Power 50 · Ultra 100 sites.
- **Each site beyond that is $1 a month.** If that payment fails, your site stays up.

---

## Limits

- **50 MB per site.**
- **Names:** lowercase letters, numbers and dashes, up to 40 characters, starting with a letter or number. A name taken by someone else is refused.
- **Static only:** no server code runs. Use a store, database or hosted toolkit for the dynamic parts.
- **Updating replaces files one by one,** so a site is briefly incomplete mid-update.
- **Pages are cached for 60 seconds,** so a fresh update can take a minute to show everywhere.
- **`list` only knows sites published from this computer.**
- **Give the full path** to the folder.

---

## Related

- [Coding](https://mycelen.com/manual/reference/agents/coding) · [Design & Media](https://mycelen.com/manual/reference/agents/design-and-media): what usually gets published
- [Store, database & agent memory](https://mycelen.com/manual/reference/toolkits/store): a backend for a site
- Chronicle: publishing from the vault

[Ask Irene about this]
