Developers Quickstart

Developers

Quickstart

Install the Frontpage CLI, authenticate, link a site by subdomain, pull files, make a change, and review it on staging.

1. Create an API key

  1. Sign in at app.frontpage.host.
  2. Open the profile menu → Developers.
  3. Click Create key. Copy the secret once (fp_live_…). It is not shown again.

Keys are account-wide. Anyone with the key acts as you on every site you can access. Treat keys like passwords. Only site owners can create keys.

2. Install the CLI

npm i -g frontpage-host
frontpage help

Or one-shot: npx frontpage-host help. The binary is always frontpage. Do not install the unrelated npm package named frontpage.

3. Log in and pick a site

frontpage login
# or non-interactive:
frontpage login "$FRONTPAGE_API_KEY"

frontpage sites
frontpage use <subdomain>

Use the subdomain column from sites (example: asimov-press), not a custom domain and not asimov-press.frontpage.host.

use writes .frontpage/state.json in the current folder with { slug }. You can also pass --site <subdomain> on most commands.

4. Pull files

mkdir my-site && cd my-site
frontpage use <subdomain>
frontpage pull

Pull downloads allowlisted files into the current directory: src/, public/, and content/. It also stores baseCommitSha for compare-and-swap on push. If you leave and come back — or someone used the UI agent meanwhile — run status --json / pull again before editing so you are not working on a stale tree.

5. Edit and push

# edit files under src/, public/, or content/
frontpage diff --json
# data.dirty / data.tipDrift; comparedWith is blobSha (one list request)
frontpage push --message "Clarify the hero headline"

If push returns exit code 3, the remote tip moved or an agent run is active. Run frontpage status --json, pull or wait, then retry.

6. Review staging (not production)

# After the build finishes, open:
# https://<subdomain>.frontpage.host

frontpage open

There is no separate “deploy to staging” step for agents. Staging is the subdomain. Do not run frontpage publish unless you intend to promote to the custom-domain production site.

CI / non-interactive auth

export FRONTPAGE_API_KEY=fp_live_…
# optional override of API origin:
export FRONTPAGE_API_BASE=https://app.frontpage.host

frontpage doctor --json
frontpage pull --site <subdomain>

Verify connectivity

frontpage doctor --json
frontpage whoami --json
frontpage status --json