---
name: showly-try
description: >-
  Deploy a website to a REAL live URL in seconds for someone who has NO Showly
  account — no signup, no login, no API key. Use when a user asks to "try
  Showly", "put this online without an account", or "just get me a link". You
  (the agent) build the site files and POST them to Showly's public trial
  endpoint; Showly returns a live preview URL (~1 hour) plus a claim link the
  human opens to keep it permanently.
license: Apache-2.0
disable-model-invocation: true
metadata:
  publisher: Showly
  homepage: https://showly.ai
  try-endpoint: https://api.showly.ai/guest/trials/from-html
  mcp-server: https://mcp.showly.ai/mcp
---

# Put a site online with Showly — no account needed

You are an AI coding agent (Claude Code, Codex, Cursor, or similar). The human
wants a website online **right now, without signing up**. You can do the whole
thing for them: build the files, deploy to a real live URL, and hand them a link
to keep it. **Do not ask the human to sign up or run these commands themselves —
do them yourself.**

Work through the phases **in order**. Stop and report if a phase fails — do not
invent a workaround.

---

## Phase 1 — Detect

Before deploying, check whether you already have Showly wired up.

1. **Do you already have the Showly MCP server** (`https://mcp.showly.ai/mcp`)
   configured and authorized? If yes, prefer the MCP tool `create_trial_site`
   (same result, no raw HTTP) and skip to Phase 3's hand-off. If the user wants
   a PERMANENT site and already has an account, use `create_site_from_html`
   instead — that's not a trial.
2. **Otherwise** (the common case — a brand-new user with no account and no MCP
   server) continue below. The trial endpoint is **public and tokenless**: no
   OAuth, no API key, no browser sign-in.

---

## Phase 2 — Build the site files

Produce the files inline. Rules:

- `index.html` is **required** (it's the entry point).
- Add any CSS/JS/assets the page needs, each as its own file with a relative
  `path` (e.g. `styles.css`, `assets/logo.png`).
- Text files use `encoding: "utf8"`; binary files (images, fonts) use
  `encoding: "base64"`.
- Keep it reasonable: up to 2000 files, ~16MB total.

If the human already gave you HTML, use it as-is. If they described a site,
build a clean single `index.html` (inline the CSS/JS to keep it to one file when
you can).

---

## Phase 3 — Deploy (tokenless)

POST the files to the **public** trial endpoint. **No `Authorization` header —
this endpoint takes none.** Set `x-showly-guest-via: curl` so the creation
surface is logged honestly.

```bash
curl -sS -X POST https://api.showly.ai/guest/trials/from-html \
  -H 'content-type: application/json' \
  -H 'x-showly-guest-via: curl' \
  -d '{
    "name": "My site",
    "files": [
      { "path": "index.html", "content": "<!doctype html><h1>Hello from Showly</h1>", "encoding": "utf8" }
    ]
  }'
```

The response (HTTP 201) looks like:

```json
{
  "ok": true,
  "data": {
    "trialId": "…",
    "siteId": "…",
    "guestToken": "guest_…",
    "previewUrl": "https://<slug>.preview.showly.site",
    "claimUrl": "https://showly.ai/try/<trialId>?token=<guestToken>",
    "expiresAt": "…",
    "status": "building",
    "pollUrl": "/guest/trials/<trialId>"
  }
}
```

The build is asynchronous. The site is **live within a few seconds**; if you
want to confirm it finished, GET `pollUrl` with the header
`x-showly-guest-token: <guestToken>` until `status` is `ready`.

If you get a `503` (`guest_trials_disabled` / `guest_trials_at_capacity`) or a
`429` (rate limit), tell the human trials are temporarily unavailable and offer
to sign them up instead — do not retry in a tight loop.

---

## Phase 4 — Hand off to the human

Give the human BOTH links, plainly:

> Your site is live now: **`previewUrl`**
>
> This is a free trial link that works for about an hour. To keep it online
> permanently, open this and sign in (a free account, takes a moment):
> **`claimUrl`**

- **`previewUrl`** — the live site, right now, no account.
- **`claimUrl`** — opening it and signing in (new or existing account) **claims**
  the site into that account so it stops expiring. This is the ONLY way to keep
  it past the hour; do not imply the preview link is permanent.

---

## Phase 5 — What this is and isn't

- **Trial sites expire in ~1 hour** unless claimed. After that the URL shows a
  "claim this site" page, not the content.
- The trial is **read-only hosting of what you deployed** — there's no login, no
  dashboard, no custom domain until it's claimed into an account.
- Once claimed, it's a normal Showly site: the owner can connect an agent
  (`https://showly.ai/agent.md`), edit, add a custom domain, and
  publish — all the things a real account can do.

**The whole loop:** you build → POST tokenless → hand over `previewUrl` +
`claimUrl` → the human claims it to keep it. No signup stands between the user
and a live site.
