---
name: heyadhi-share
description: Publish an HTML page to a live URL on share.heyadhi.com from a machine the owner has registered, optionally behind a viewer password. Use when the owner asks you to publish, share, host or put online an HTML page, report, prototype or mockup and get a link back.
---

# Publishing a page to share.heyadhi.com

This is the live file at https://share.heyadhi.com/SKILL.md. Do not save a
full copy of it as a skill — a copy goes stale. Install the stub below instead:
it fetches this file each time.

share.heyadhi.com turns one HTML file (plus its assets) into a live page at
`https://{site_id}.share.heyadhi.com/`. Each page is its own browser origin, so
scripts, storage, cookies and same-origin requests all work normally.

**Publish only when the owner has asked you to publish.** Writing an HTML file
is not permission to put it online.

## One-time setup on this machine

Needs Node 24 or newer.

```bash
mkdir -p ~/.local/share/heyadhi-share && cd ~/.local/share/heyadhi-share
curl -fsSLO https://share.heyadhi.com/share.mjs
node share.mjs keygen
```

`keygen` writes this machine's private key to `~/.config/heyadhi-share/ed25519.pem`
(mode 600) and prints a **public** key like `ed25519:AbC…=`. Give the owner
**only that public key** and ask them to register it. Never send, paste or
print the private key. Until the key is registered, every publish fails with
"this public key is not registered".

The key alone authorizes publishing — there is no second password. Anyone
holding this machine's private key can publish until the owner revokes it.

Then install this skill as a stub, so the instructions are always current.
Save the following as `heyadhi-share/SKILL.md` in your skills folder (for
Claude Code: `~/.claude/skills/heyadhi-share/SKILL.md`), replacing any older
full copy:

```markdown
---
name: heyadhi-share
description: Publish an HTML page to a live URL on share.heyadhi.com from a machine the owner has registered, optionally behind a viewer password. Use when the owner asks you to publish, share, host or put online an HTML page, report, prototype or mockup and get a link back.
---

Run `curl -fsS https://share.heyadhi.com/SKILL.md` and follow what it prints:
that is the current version of these instructions. The CLI is
`~/.local/share/heyadhi-share/share.mjs`.
```

`share.mjs` keeps itself current: before every command it checks that it is
the version the server serves, and if not it replaces itself and runs the
command again (you will see `updated share.mjs` on stderr). Nothing to do.

## Publish

Write a self-contained HTML file first. Put any local assets (CSS, JS, images,
fonts) beside it using relative paths. Choose the page's **name**: it becomes
its address, `https://<name>.share.heyadhi.com/`. A name is 3–60 lowercase letters, digits and single hyphens
(e.g. `q4-launch-plan`); `all`, `www`, `api`, `share`, `admin`, `mail`,
`status`, `static`, `assets` and `cdn` are reserved. Then:

```bash
node share.mjs publish q4-launch-plan path/to/page.html
```

If the name is already in use the publish fails (409): pick another name, or
`update` that page if it is the one you mean to change.

It prints JSON:

```json
{
  "site_id": "q4-launch-plan",
  "url": "https://q4-launch-plan.share.heyadhi.com/",
  "status": "created",
  "assets_uploaded": ["style.css", "img/logo.png"],
  "assets_missing": []
}
```

- Give the owner **the exact `url` from the output.** Never build or guess a URL.
- Web assets (styles, scripts, images, fonts, media) referenced by the HTML
  and present beside it are uploaded automatically. Hidden files, other file
  types and anything outside the HTML's folder never are: they come back in
  `assets_refused`, and you upload one deliberately with `asset` only if it
  truly belongs on the page. Anything in `assets_missing` was referenced but not found:
  create it and upload it (below), or fix the reference.
- A publish retries safely on network errors; it will not create a duplicate page.

## Assets

```bash
node share.mjs asset <site_id> ./fonts/Inter.woff2 --path fonts/Inter.woff2
node share.mjs inspect <site_id>        # each referenced asset: present or missing
```

`--path` is where the file lives on the page (defaults to the file name). Safe
relative paths only: no `..`, no leading `/`, no backslashes, not `__share/…`
or `index.html`. Files a CSS or JS file loads (fonts, sprites) may be uploaded
even though the HTML does not mention them.

## Update and delete

```bash
node share.mjs update <site_id> path/to/page.html
node share.mjs delete <site_id>
```

`update` replaces the HTML at the same URL. `delete` unpublishes the page; its
name is then free for a new page.

## Viewer password (only when the owner asks for one)

Pages are public by default.

- `--generate-password` makes a strong password and prints it once as
  `viewer_password`. Give it to the owner; it is not shown again.
- `--password` asks for one on the terminal without echoing it.
- On `update`: no flag keeps the current password, either flag rotates it,
  `--remove-password` makes the page public again.

Never put a viewer password on the command line, in a URL, or in a file you
commit. A viewer password controls who can open the URL; it does not stop
third-party scripts the page itself loads from seeing page data, so inspect
the HTML for external scripts before publishing something private.

## Limits and errors

- HTML: 10 MB. Each asset: 50 MB.
- 401 — the machine key is missing, unregistered or revoked.
- 403 — unsafe asset path. 404 — no such page (or a protected page you are not
  authenticated for). 409 — the name is already in use, or a conflicting
  update landed first; inspect and retry. 413 — over a size limit. 422 —
  invalid input (including a malformed name). 429 — too many requests.
  503 — storage briefly unavailable; retry. 503 `budget_exhausted` — the
  service's monthly storage budget is used up; do not retry, tell the owner.

## How this differs from ht-ml.app

The routes match ht-ml.app's (`/v1/sites`, assets, help), but there is no
`update_key`: every write is signed by a registered machine key, creates need
an `Idempotency-Key`, and pages can be deleted. There is no public signup.
Full reference: https://share.heyadhi.com/llms.txt and
https://share.heyadhi.com/v1/help.
