For agents

host0 — publish a folder, get a live URL.

Base URL: https://host0.ai

Supported today: static sites — HTML, CSS, JS, images/fonts/assets; ≤1000 files, ≤10 MB/file, ≤250 MB total; index.html required (or deploy a single file that opens in a browser — HTML, PDF, image, video, audio, Markdown, CSV, text — on its own; it serves at /; archives aren't unpacked). Shared data: declare record collections in h0.json and read/write them from the page at /.h0/data/… (docs: /docs#shared-data). HTML pages during a trial get a small "Hosted on host0" badge (a paid plan removes it): it sits bottom-right and moves by itself to a free corner if it would cover a button or link (or choose: <meta name="host0-badge-position" content="bottom-left">); a PDF/image/video/audio/text file opened directly in a browser tab opens in a host0 file viewer with a slim bar under it (raw file for <img>, fetch, curl; ?download for the original). A same-origin analytics script is added to HTML pages (allow 'self' scripts and connect if you set a CSP). Server code is on the roadmap.

Human here? The visual landing page has the pitch and the demo, and you can sign up — a 7-day free trial, then from $9/month (pricing). This page is the plain-text version, written for agents.

Install the skill

Two files: an instruction file and one Bash script. Requires curl, jq, and shasum/sha256sum. The paths below are where Claude Code keeps skills — other agents keep them elsewhere, so use whichever directory yours reads.

mkdir -p ~/.claude/skills/host0/scripts
curl -sS https://host0.ai/skill.md -o ~/.claude/skills/host0/SKILL.md
curl -sS https://host0.ai/publish.sh -o ~/.claude/skills/host0/scripts/publish.sh
chmod +x ~/.claude/skills/host0/scripts/publish.sh

Paste this into your agent

It installs the skill from skills.sh, signs in with a link you approve in your browser, and asks you what to publish. Nothing to type into the chat.

Set me up with host0 — hosting for whatever your agent creates, where a file or folder becomes a live URL.

1. Run `npx skills use "https://github.com/host0-ai/skills" --skill "host0"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides. If npx isn't available, save https://host0.ai/skill.md as SKILL.md and https://host0.ai/publish.sh as scripts/publish.sh beside it (chmod +x) instead.
2. Sign me in with a device login — don't ask for my email or password: run scripts/publish.sh --login, show me the link and code it prints, and once I've approved in my browser run scripts/publish.sh --login-wait — it saves the key to ~/.host0/credentials with chmod 600.

Then ask me what I want to publish.

Get an API key

Device login: the agent sends nothing personal. It prints a link and a short code, the human approves it on host0 in their own browser, and the script saves the key. With no key, a publish starts this on its own — exit code 3 means “show the link and code, then run again”. The key starts h0_, is returned exactly once, and travels as Authorization: Bearer h0_… on every authenticated request.

# 1. start a sign-in — no email, nothing personal leaves this machine
#    prints a link + code and exits 3: show both to the user
~/.claude/skills/host0/scripts/publish.sh --login

# 2. wait for the approval — saves the key to ~/.host0/credentials (chmod 600)
~/.claude/skills/host0/scripts/publish.sh --login-wait

The same over plain REST:

# 1. start — returns device_code, user_code and verification_uri_complete
curl -sS -X POST https://host0.ai/api/v1/auth/device

# 2. show the user verification_uri_complete + user_code, then poll every
#    "interval" seconds until they approve (authorization_pending until then)
curl -sS --retry 3 --retry-all-errors https://host0.ai/api/v1/auth/device/token \
  -H "content-type: application/json" \
  -d '{"device_code": "…"}'

# 3. save the returned api_key yourself — don't make the human run this
mkdir -p ~/.host0 && printf '%s' "h0_your_key_here" > ~/.host0/credentials && chmod 600 ~/.host0/credentials

Email code (fallback) — only for an agent on the human's own machine, never from a cloud sandbox:

# fallback — only for an agent on your own machine, never from a cloud sandbox
# 1. request a 6-digit code — host0 emails it
curl -sS https://host0.ai/api/v1/auth/request-code \
  -H "content-type: application/json" \
  -d '{"email": "you@example.com"}'

# 2. exchange the code for an api key (returned exactly once)
curl -sS https://host0.ai/api/v1/auth/verify-code \
  -H "content-type: application/json" \
  -d '{"email": "you@example.com", "code": "123456"}'

# 3. save it yourself — don't make the human run this
mkdir -p ~/.host0 && printf '%s' "h0_your_key_here" > ~/.host0/credentials && chmod 600 ~/.host0/credentials

Publish

Publish a built static site with index.html at the root of the directory — its contents become the site root. The script handles hashing, the manifest, uploads, and finalize.

# first publish — creates the app
~/.claude/skills/host0/scripts/publish.sh ./my-site --name "my site"

# every publish after that — same folder, same app, unchanged files skipped
~/.claude/skills/host0/scripts/publish.sh ./my-site

With Node 18.18 or newer, the host0 CLI does the same with nothing to install — npx -y @host0/cli@latest deploy ./my-site — plus commands to manage apps (ls, versions, rollback, share…). Same flags, files, output lines and exit codes as publish.sh; use the script when there's no Node or npm can't be reached. See the CLI docs.

Or drive the REST API directly — four steps:

  1. 01POST https://host0.ai/api/v1/apps — body {"name": "my site"} → app_id, slug (random; rename later with PATCH {"slug"}), url
  2. 02POST https://host0.ai/api/v1/apps/{app}/deployments — body {"files": [{path, size, sha256}], "message": "what changed" (optional)} → upload.targets (unchanged files come back in upload.skipped)
  3. 03PUT each target url — raw bytes, size and sha256 must match the manifest
  4. 04POST https://host0.ai/api/v1/deployments/{id}/finalize — flips the deployment live, atomically → version (every live publish is a numbered version you can restore), previous_version

Nothing is live until finalize succeeds — a half-finished upload never serves, and the previous deployment keeps serving until the flip.

During a trial, host0 adds a small “Hosted on host0” badge to every HTML page. It sits bottom-right and moves by itself when one of the page's own buttons or links would be under it: to the first free corner (bottom-left, top-right, top-left), or to a small icon bottom-right if all four are taken. To choose its corner yourself, add <meta name="host0-badge-position" content="bottom-left"> to the page (bottom-right, bottom-left, top-right or top-left; it then stays there). Don't try to hide it. The moving is done by a same-origin script (/.h0/b.js): a Content-Security-Policy that blocks 'self' scripts leaves the badge bottom-right. A PDF, image, video, audio or text file opened directly in a browser tab opens in a host0 file viewer: the file fills the window, with a slim bar under it (file name, Download, “Hosted on host0”) that never covers it. The raw file is still served to <img> and <video> tags, embeds, fetch() and curl, and ?download on any file URL downloads the original. Starter ($9/month) and Pro ($19/month) remove the badge and the viewer once the first payment goes through: files are served as they are.

host0 counts visits to every app without cookies: a tiny same-origin script (/.h0/a.js) is added to each HTML page, and opened PDFs are counted on the server. The owner sees visitors, pages, referrers, countries and devices in the dashboard's Analytics tab, with GET /api/v1/apps/{app}/analytics?period=7d (period: 24h, 7d, 30d, 90d, 365d), or the MCP get_analytics tool. Don't remove the script. If you set a Content-Security-Policy, allow 'self' in script-src and connect-src. Full analytics are on Starter (up to 30 days) and Pro (up to 365 days).

Every publish that goes live is a numbered version. Add a note with publish.sh --message "…". List them with GET /api/v1/apps/{app}/versions and restore one with POST /api/v1/apps/{app}/versions/{n}/restore (or the MCP restore_version tool): it goes live again as a new version, and shared records are never changed. How long earlier versions are kept depends on the plan — 30 days on Pro, 7 days on Starter (limits.account.version_retention_days).

Shared data

An app is not limited to static content. Put an h0.json at the root of the deploy declaring record collections, and the page reads and writes them at /.h0/data/{collection} on its own origin — a team todo, a ticket board, an RSVP list, with no server code and no connection string.

{
  "records": {
    "tickets": {
      "fields": {
        "title":    { "type": "string", "required": true, "maxLength": 200 },
        "done":     { "type": "boolean", "default": false },
        "status":   { "type": "string", "enum": ["todo", "doing", "done"], "default": "todo" },
        "assignee": { "type": "string" },
        "notes":    { "type": "string", "maxLength": 5000 }
      },
      "access": {
        "read":   "viewers",
        "create": "viewers",
        "update": "members",
        "delete": "members"
      }
    }
  }
}

Audiences are viewers (anyone who can open the app, including anonymous visitors of a link or public one), members (the owner plus invited emails), owner (the app's owner only), creator (each signed-in person, their own records only), or an explicit list of emails. By default everyone the app admits can read and create, while update and delete need an invite (`members`). The owner always passes every rule.

Decide whose data it is before writing `h0.json` — and if the user hasn't said, ask them. Shared: everyone the app admits works on the same records (a team board, a poll, a guestbook) — leave `read` on `viewers` or `members`. Per-person: each visitor signs in and gets their own private records (a habit tracker, a journal, a reading list anyone can use from the same URL) — set `read`, `create`, `update` and `delete` all to `creator`, and when `/.h0/me` says `{anonymous: true}` show a sign-in screen with its `signin_url` instead of loading data. `owner` is neither: it means only you, the app's owner — every other visitor is shut out.

On a link or public app, call `/.h0/me` when the page loads and, if it answers `{anonymous: true}`, render its `signin_url` as a visible sign-in link — a link the visitor chooses to follow, never an automatic redirect on page load. Members are not recognised automatically — reading is open, so nothing sends them through the gate on their own. Handle 401 on writes too: the body carries `signin_url` and a `message` written for the visitor ("Sign in to add tickets.").

A publish without `h0.json` keeps the app's current collections, so you can redeploy just the changed files. To change them, publish an `h0.json` with all the collections the app should have. To turn records off, publish `{"records": {}}`: the collections stop being served and their data is kept, still exportable. Restoring a version brings back the collections that version ran with.

A form that retries after a network error should send an `Idempotency-Key` header on `POST /.h0/data/{collection}`, one value per submit (e.g. `crypto.randomUUID()`, up to 255 characters): the same key with the same fields returns the original record, for 24 hours, so a retry can't duplicate it. The key is scoped to the app, the collection and the caller; the same key with other fields is `422 idempotency_key_reused`, and a deleted record frees its key.

The owner can dump a collection with GET /api/v1/apps/{app}/records/{collection}?format=export and fix or remove one record outside the app with PATCH or DELETE on /api/v1/apps/{app}/records/{collection}/{id}, the MCP update_record and delete_record tools, or the dashboard's Data tab. The collection's access rules don't apply, and created_by stays.

The full shape, with a worked team-todo example, is in the docs.

Visibility

Every app goes live private — only its owner can open it — unless you ask for something else. An app uses one visibility at a time:

Set it on publish with --visibility private|link|public, or any time with PATCH /api/v1/apps/{app}. Shared data works the same on link and public.

Limits

Upload (REST + skill)   1000 files · 10 MB (10485760)/file · 250 MB (262144000) total
Account                 10 apps · 3 public on the web · 200 deploys/hour · 2 GB (2147483648) stored
Upload on Pro           1000 files · 50 MB (52428800)/file · 1 GB (1073741824) total
Account on Pro          100 apps · 25 public on the web · 200 deploys/hour · 10 GB (10737418240) stored
Versions kept           7 days (Starter) · 30 days (Pro)
API rate                120 requests/minute per API key

Parenthesised figures are exact byte counts. These are rendered from the same constants the server enforces — GET /api/v1 returns them as JSON under limits — without a key, Starter's; with one, your plan's. Over a cap you get file_too_large or deploy_too_large (a manifest over the upload caps), app_limit_reached, public_app_limit_reached, deploy_rate_limited, storage_quota_exceeded or rate_limited, each with a message saying what to change. When a bigger plan lifts the limit, the error also carries upgrade_url: tell the user which limit was hit, offer the free fix first (compress, link instead of public, delete old apps), then give them the link. Never retry in a loop, and never buy anything for them. A new account has no plan until it starts one: creating or deploying an app answers 402 plan_required with upgrade_url. Tell the user to open it and start the 7-day free trial in their own browser, then run the publish again.

MCP

Deploying is the skill's job. To manage apps you've deployed from Claude and other MCP clients, add host0 as a remote server:

claude mcp add --transport http host0 https://mcp.host0.ai/mcp

Sign in when prompted; the tools list and inspect apps, read their analytics, list and restore versions, change visibility, rename an app's URL, share and unshare by email, edit an app's shared records, put an app on the owner's own domain, and delete an app (live or not). They don't deploy — to put new files live, always use the skill. Setup for every client and the full tool list.

Machine surfaces