Skip to main content
The preview subtree manages preview environments — the ephemeral envs created by grounds push --target=staging. For the developer workflow, see Share staging previews.

Synopsis

All preview commands are scoped to the current project (use --project or GROUNDS_PROJECT to switch).

preview list

preview show

Add --json for the raw API response — useful for scripting or debugging.

preview pin / unpin

Pinned envs stay alive past their original expiresAt. They don’t get a new TTL — they just don’t have one. Unpin to put it back on the cleanup schedule (the TTL is recomputed from now() + 7d).
Pinning is intentionally manual. The platform doesn’t auto-pin “interesting” envs, so a forgotten demo doesn’t quietly burn cluster resources for weeks.

What you can’t do here (yet)

  • Force-delete a non-pinned env (the janitor will get to it within 30 min of expiry, and you can always push a new one).
  • Rename a preview env or change its hostname.
  • Promote a preview to production (that’s a separate grounds promote flow, currently in beta).

Equivalents in the portal

The portal’s Previews tab on a project page has the same operations:
  • One row per env with status badge, expiry, public URL, pin indicator.
  • Per-row dropdown: Pin (skip auto-cleanup) / Unpin (re-enable cleanup).
  • Click the URL to open the env in a new tab.
Use whichever surface fits your flow — they hit the same forge endpoints.