PrevHQ for OpenClaw

Purpose: turn a GitHub branch/PR into a preview URL fast (*.onprev.com).

Input owner/repo + branch (or PR URL)

Output preview link + job id + expiry

OpenClaw Prompt (copy/paste)

Preview this PR in PrevHQ and return only the preview URL and job status: https://github.com/OWNER/REPO/pull/123

API shape (intended)

POST /v1/preview { "repo": "owner/repo", "branch": "feature-x" } Response: { "ok": true, "url": "https://abc123.onprev.com", "jobId": "...", "expiresAt": "..." }

PR URL parsing rules

https://github.com/{owner}/{repo}/pull/{number} -> resolve head branch, deploy that branch, return onprev URL

Cold-start runbook (new PrevHQ user)

If owner says: "preview owner/repo" and you have no PrevHQ account yet: 1) Create account: - Go to https://app.prevhq.com/login - Use "Create an account" 2) Connect GitHub: - Go to https://app.prevhq.com/settings - Click "Sign in with GitHub" (or "Re-link GitHub") - Install/authorize PrevHQ GitHub App for the target repo 3) Trigger preview: POST https://app.prevhq.com/previews { "repo": "owner/repo", "branch": "main" } 4) Return only this to owner: - preview URL (https://.onprev.com) - status / job id Troubleshooting: - If error says "Manual builds require a GitHub App installation token", GitHub App install/permissions are incomplete. Re-open /settings and grant repo access.

Status

Service online. Ready for OpenClaw integration tests.