clawd.htmlCLI · MCP · HTTP API

Docs

Publish HTML pages to clawd.html from your terminal, a script, CI, or an AI agent. Same visibility, workspace, and expiry options as the web app.

01Quickstart
shell
npm i -g @avr00/clawd-html
export CLAWD_TOKEN=clawd_live_…          # from Settings → API tokens
cat index.html | clawd publish --title "My page" --visibility unlisted

The shareable URL is printed to stdout, so it composes: URL=$(clawd publish page.html).

02Authentication

Create a token in Settings → API tokens. It's shown once. Tokens are tied to your account and grant the same access you have in the app. Revoke anytime from the same screen.

Resolution order, highest priority first:

  1. --token flag
  2. CLAWD_TOKEN env var
  3. ~/.config/clawd/config.json (written by clawd login)
shell
clawd login clawd_live_…     # verifies, then saves to config
# or, non-interactively:
export CLAWD_TOKEN=clawd_live_…
03CLI reference
CommandDescription
clawd publish [input]Create a page from a file, directory (multi-file bundle), or stdin
clawd update <slug> [input]Edit a page: replace content/bundle, change title/visibility/scope/expiry
clawd files <slug>List files in a bundle
clawd listList your pages (--json for structured)
clawd get <slug>Print a page's HTML (--json for metadata)
clawd rm <slug>Delete a page
clawd whoamiShow the account the token belongs to
clawd login [token]Save a token to the config file

publish options

-t, --title <title>Page title (defaults to <title> tag, then filename)
-v, --visibility <vis>private | workspace | unlisted | public (default: unlisted)
-w, --workspace <slug>Publish into a workspace
-f, --folder <slug>Publish into a folder (page adopts its scope)
-e, --expires <dur>"never", "12h", "7d", … (default: never)
--jsonEmit the full result as JSON
examples
# from a file
clawd publish index.html --title "Pitch" --visibility public

# straight from a model, into a workspace, expiring in 7 days
some-llm | clawd publish -t "Draft" -w ateam -e 7d

# round-trip
clawd get aj3p2k9q > saved.html
04Folders

A folder groups pages and is shared at its own URL. Opening a folder you're allowed to see grants access to every page inside it — even individually private pages — so one link shares the whole set. A personal folder holds your personal pages; a workspace folder holds that workspace's pages (a page adopts its folder's scope).

CommandDescription
clawd folder create <name>Create a folder (-v, -w, -e options)
clawd folder listList your folders
clawd folder get <slug>List the pages in a folder
clawd folder rm <slug>Delete a folder (pages are kept)
clawd publish --folder <slug>Publish a page straight into a folder
example
clawd folder create "Weekly analyses" --visibility unlisted
cat week-1.html | clawd publish --title "Week 1" --folder weekly-analyses
# share the printed /f/<slug> link — recipients can open every page in it
05HTTP API

Base URL https://clawd-html-puce.vercel.app. Authenticate with Authorization: Bearer clawd_live_…. All responses are JSON.

Method & pathDescription
GET /api/v1/meVerify the token, return the owner
GET /api/v1/pagesList your pages
POST /api/v1/pagesCreate a page (content string or files array)
GET /api/v1/pages/:slugFetch a page (incl. content)
GET /api/v1/pages/:slug/filesList files in a bundle
PATCH /api/v1/pages/:slugEdit a page (any subset of the POST body, plus null to clear scope)
DELETE /api/v1/pages/:slugDelete a page
GET /api/v1/foldersList your folders
POST /api/v1/foldersCreate a folder
GET /api/v1/folders/:slugFetch a folder + its pages
DELETE /api/v1/folders/:slugDelete a folder
curl
curl -X POST https://clawd-html-puce.vercel.app/api/v1/pages \
  -H "Authorization: Bearer clawd_live_…" \
  -H "Content-Type: application/json" \
  -d '{"title":"Hello","content":"<h1>hi</h1>","visibility":"unlisted"}'

# → { "id": "...", "slug": "aj3p2k9q",
#     "url": "https://clawd-html-puce.vercel.app/v/aj3p2k9q",
#     "visibility": "unlisted" }

POST body fields: content (required HTML string), title, visibility, workspaceSlug, expiresInHours.

06Visibility & expiry
VisibilityWho can openIndexed
privateOnly youNo
workspaceYou + members of the workspaceNo
unlistedAnyone with the linkNo
publicAnyone with the linkYes

private and a workspace are mutually exclusive. Expiry is optional; an expired link returns a friendly "expired" screen and stops being viewable.

07Audience

Every page and folder gets a live "watching now" pill in its header. Anyone viewing — signed in or not — shows up in the count. Only the page owner (and workspace members on workspace pages) can see other viewers' names; everyone else just sees the number.

The manage page for a page or folder also shows Audience: a list of signed-in viewers with timestamps, plus a single muted line totaling anonymous viewers from the last 7 days. We don't store IPs, user agents, or any fingerprint for anonymous traffic — just a count.

08Notes for agents
  • Human messages go to stderr; the shareable URL (or --json payload) goes to stdout.
  • --json on every read command for structured parsing.
  • Non-zero exit code on any error, message on stderr.
  • File or stdin input — composes in any pipeline.
09Agent skill

We publish a skill for the skills.sh ecosystem at our /.well-known/agent-skills/ endpoint. One command installs it into Claude Code, Cursor, Codex, and 50+ other agents.

shell
npx skills add https://clawd-html-puce.vercel.app

Installs the use-skills skill, an opinionated, pitfall-focused guide to the npx skills CLI itself — source formats, scope (-g vs project), cross-agent installs, common errors. Your agent activates it automatically when you mention skills.

10MCP server

We expose a Streamable HTTP Model Context Protocol server at https://clawd-html-puce.vercel.app/mcp. Auth is the same API token as the CLI — pass it as a Bearer header.

Claude Code
claude mcp add clawd https://clawd-html-puce.vercel.app/mcp \
  --header "Authorization: Bearer clawd_live_…"
Cursor / Cline / Windsurf (mcp.json)
{
  "mcpServers": {
    "clawd": {
      "url": "https://clawd-html-puce.vercel.app/mcp",
      "headers": { "Authorization": "Bearer clawd_live_…" }
    }
  }
}

Tools exposed:

ToolWraps
clawd_meVerify token, return the owner
clawd_list_pagesList your pages
clawd_create_pagePublish an HTML page
clawd_get_pageFetch a page by slug
clawd_delete_pageDelete a page
clawd_list_foldersList your folders
clawd_create_folderCreate a folder
clawd_get_folderFetch a folder + its pages
clawd_delete_folderDelete a folder (pages kept)
11Multi-file bundles

A clawd page can be a single HTML string or a multi-file bundle: a directory of HTML/CSS/JS files that link to each other with relative paths. The bundle is served at /v/<slug>/ and sub-paths so <a href="page-two.html"> just works. Entry point is index.html when present, otherwise the first .html file.

CLI
# A directory of linked HTML files
clawd publish ./design-system/
# → https://clawd-html-puce.vercel.app/v/aj3p2k9q

# Sub-paths resolve to siblings
# https://clawd-html-puce.vercel.app/v/aj3p2k9q/page-two.html

clawd files aj3p2k9q             # list what's in the bundle
clawd update aj3p2k9q ./design-system/   # replace the whole bundle
HTTP
curl -X POST https://clawd-html-puce.vercel.app/api/v1/pages \
  -H "Authorization: Bearer clawd_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Design system",
    "visibility": "unlisted",
    "files": [
      { "path": "index.html",    "content": "<a href=\"button.html\">Button</a>" },
      { "path": "button.html",   "content": "<h1>Button</h1>" },
      { "path": "styles.css",    "content": "body{font-family:system-ui}" }
    ]
  }'

Limits: 64 files max, 400 KB per file, 1 MB total. Allowed extensions: .html .htm .css .js .mjs .svg .json .txt. Binary assets (images, fonts) aren't supported yet — reference them by external URL.