Developers
Agent quickstart
How coding agents should use the Frontpage CLI safely: staging on the subdomain, no autonomous publish, and a paste-ready brief.
Using MCP instead of the CLI
MCP connects through OAuth and has a smaller operation set. It needs no extracted CLI key or shell access. Keep source content untrusted, preserve revisions/retry keys, and check the exact preview. People/email access needs separate consent; never send or activate without explicit direction. See the MCP setup and tool guide for availability, scope and disconnect.
Paste-ready brief
Copy this into Claude Code, Cursor, Grok Build, or any coding agent. The same text is available in the editor under profile → Developers.
Use the Frontpage CLI to work on my site. Install npm package frontpage-host (binary: frontpage; do not install the unrelated package named frontpage). Login with my API key, then frontpage sites and frontpage use <subdomain>. Read AGENTS.md from the package and run frontpage help site-building (Astro contract: pages map, BaseLayout, tokens, no backends/fake forms; never put HTML or a backslash-quote inside a quoted JSX attribute. Pass markup as {auditBody}). Use frontpage fonts to pick installed font values and frontpage tokens set for surgical token edits; frontpage modules docs / extensions docs for how-tos. At session start (and whenever tipDrift may be true), frontpage pull, then edit under src/, public/, or content/, frontpage diff --json, then push --wait. Prefer --json. Staging is https://<subdomain>.frontpage.host. Push/prompt/edit update staging; there is no separate staging deploy step. Never run frontpage publish or unpublish unless I explicitly ask (or a workflow I defined requires it). Do not unpublish or revert unless I ask. After changes, have me review the subdomain before production. What good agent behavior looks like
- Install
frontpage-hostand authenticate non-interactively. - Resolve the site with
frontpage sites --jsonanduse <subdomain>. -
Read
AGENTS.mdandfrontpage help site-building(or Site building on the docs site). -
Pull (session start / when
tipDrift) → edit allowlisted files →diff --json→push --waitwith a clear message. -
Point the human at
https://<subdomain>.frontpage.hostfor review when that subdomain is publicly shareable. With a custom domain connected, the subdomain may be owner-private (login wall ≠ failed push); anonymous review is then on the published custom domain. - Stop. Do not publish unless asked.
Store, Offerings and invoices
Use Store for cart products and fulfillment. For a standalone pay button, first reuse/create its saved Payments Offering, save price and customer questions there, then bind the returned markup in the same change. Never charge from page attributes or call Stripe directly. Use existing invoice/recurring commands for customer-addressed billing. Financial sends require the owner's explicit request; customer consent cannot come from the agent.
Using the in-product agent vs the CLI
| Path | Command | Notes |
|---|---|---|
| Editor-style build | frontpage prompt "…" [--attach …] |
Enqueues the same gated agent pipeline as the toolbar. Prints a runId.
Attach images/PDFs/video/text with --attach (local file via media upload caps, /__media/…, or https Blob URL).
|
| Wait for completion | frontpage runs wait [runId] | Poll until succeeded / failed / canceled. Mid-task continuation is automatic (no runs continue). |
| Local file editing | pull / edit / push | Best for coding agents with a working tree. CAS-protected. |
| Exact text swap | frontpage edit --path / --old "…" --new "…" | Click-edit semantics (single occurrence). Updates staging. |
Example: local edit loop with JSON
export FRONTPAGE_API_KEY=fp_live_…
cd ~/work/my-site
frontpage use acme
frontpage pull
# …edit src/pages/index.astro…
frontpage diff --json
# data.dirty / data.tipDrift; comparedWith === "blobSha"
frontpage push --message "Tighten hero copy on the homepage" --json
# tell the user to review https://acme.frontpage.host
# do NOT run: frontpage publish Example: prompt the Frontpage agent
frontpage prompt "Make the hero shorter and increase contrast on the CTA" --json
frontpage prompt "Use this logo in the header" --attach ./logo.png --json
# data.runId; data.attached when files were attached
frontpage runs wait --json
# review https://<subdomain>.frontpage.host Hard no’s for agents
frontpage publish/unpublishwithout an explicit user requestfrontpage revertwithout an explicit user request- Faking a permanent redirect with
Astro.redirect,location.replace, or a meta refresh. Usefrontpage redirects set - Inventing People CRM verbs, a
data-fp-peoplewidget, or treatinghideas a legal delete. See People CRM - Treating a routine as a module, guessing UTC, or splitting several hours into several routines. See Routines
- Sending dollar prices or inventing Store verbs. Integer cents only (
$49.99is4999). See Store - Inventing commands: domains, billing, members,
runs continue, MCP, git remotes - Using a custom domain as
--site - Editing files outside
src/,public/,content/and expecting them to sync - Treating
deploy waitas “ship to production”
Ship the package docs with the agent
After npm i -g frontpage-host, open the files next to the package (or from the npm tarball):
AGENTS.md: full operating manualllms.txt: compressed pointer fileREADME.md: human landing page
Recovery cheat sheet
| Symptom | Next step |
|---|---|
| Push exit 3 | status --json → pull or runs wait → retry push |
| Exit 4 / mysterious 404 | Verify key, membership, and subdomain slug (not FQDN) |
| Exit 2 | Check rate limits vs frontpage usage plan meters |
| Unsure what commands exist | frontpage help --json. Do not invent APIs |
Canonical introspection
frontpage help --json
frontpage help sync
frontpage help agent
frontpage help content
frontpage help exit-codes
frontpage doctor --json Also see
- Rate limits: RL-AGENT / RL-READ budgets
- Analytics & usage: plan meters when prompts fail
- People CRM: person graph, not inbox
- Routines: one alarm, several hours and days, IANA timezone
- Store: items, cents, signed stock. use Frontpage Store
Payments tools
Payments owns the shared currency saved during Stripe setup. For answer-based confirmations, read the Offering’s returned receiptVariables, create or update an existing Email template with those exact names, then attach receiptTemplateId. Private answers stay out of emails. Forms keep input-name tokens and confirmTemplateId. See the workflow.
Read frontpage help payments and the Payments guide. In the website agent, read get_module_docs({module:"payments"}) before manage_payments. Trusted run/site membership supplies authority; payload fields cannot grant it. Review exact recipient, terms and tax before a confirmed send, preserve operation keys on retries, and never treat owner approval or a saved card as customer autopay consent. Email private billing access with send_billing_link; do not request raw links through the website agent.
People, groups, stages and email
Use frontpage-host 0.3.0 or later and read the People guide. Groups and stages replace global status/tag commands. MCP exposes separate People and Email read/write tools through explicit crm:read / crm:write consent; source-only grants do not share contacts. Use the documented scopes and operations rather than inventing a CLI MCP command. Existing site-file tools remain unchanged.