Hosted state
Inspect and manage experiences, segments, routing, and analytics in your Sunboard project.
These commands read and mutate hosted state, so they require sunboard login.
Shared flags
All commands here accept --app / --framework / --project (to locate the
project) and --json. Mutating subcommands (segment create/update/delete, all
routing writes, survey set/clear, and integrations connect/disconnect) also accept --dry-run and --yes — and --yes is
required in --json mode.
sunboard state
Print the project, its experiences, segments, and routing in a single call — the fastest way to see everything that's deployed.
sunboard state [--app <path>] [--project <publicId>] [--json]sunboard experiences
Inspect the experiences in the current project.
sunboard experiences list
sunboard experiences get <key>| Command | Description |
|---|---|
list | List experiences in the current project. |
get <key> | Show details for a single experience, including its versions. |
sunboard segments
Segments decide who sees an experience. List and inspect them, or create, update, and delete them.
sunboard segments list
sunboard segments get <key>
sunboard segments create --name <name> [--key <key>] [--description <text>] [--rules <json>] [--rules-file <path>]
sunboard segments update <key> [--name <name>] [--description <text>] [--rules <json>] [--rules-file <path>]
sunboard segments delete <key>| Option | Used by | Description |
|---|---|---|
--name <name> | create (required), update | Segment display name. |
--key <key> | create | Segment key. Defaults to a slug of the name. |
--description <text> | create, update | Segment description. |
--rules <json> | create, update | Segment rules as inline JSON. |
--rules-file <path> | create, update | Path to a JSON file containing the rules. |
Delete is guarded
segments delete <key> fails if the segment still has deployments. Detach them
with routing detach first.
sunboard routing
Routing binds an experience version to a segment for an environment — this is what makes onboarding go live.
sunboard routing list
sunboard routing attach --experience <key> --segment <key> --version <number|latest> [--environment <key>]
sunboard routing detach (--deployment <id> | --experience <key> --segment <key> [--environment <key>])
sunboard routing pause --deployment <id>
sunboard routing resume --deployment <id>| Option | Used by | Description |
|---|---|---|
--experience <key> | attach (required), detach | Experience key. |
--segment <key> | attach (required), detach | Segment key. |
--version <number|latest> | attach (required) | Version number, or latest. |
--environment <key> | attach, detach | Environment key. Defaults to production. |
--deployment <id> | detach, pause (required), resume (required) | Deployment id. |
| Subcommand | Description |
|---|---|
list | List active deployments for the current project. |
attach | Bind or promote an experience version to a segment. |
detach | Remove a deployment (by id, or by experience + segment). |
pause | Pause a deployment (enabled = false). |
resume | Resume a paused deployment (enabled = true). |
sunboard survey
Manage the environment's active onboarding survey — the questionnaire shown to new users before any experience. There's one optional survey per environment.
sunboard survey show [--environment <key>]
sunboard survey set --survey <key> [--environment <key>]
sunboard survey clear [--environment <key>]| Subcommand | Description |
|---|---|
show | Show the active onboarding survey for the environment, if any. |
set | Make a deployed survey experience the active onboarding survey. |
clear | Remove the active onboarding survey so none is shown. |
| Option | Used by | Description |
|---|---|---|
--survey <key> | set (required) | Key of a deployed type: survey experience. |
--environment <key> | show, set, clear | Environment key. Defaults to production. |
Activate, don't bind
A survey is activated, not bound to a segment. Author and deploy it first
(/sunboard.survey or sunboard deploy), then survey set makes it live for
the environment.
sunboard analytics experience
Show the funnel, segment, and tour analytics for one experience.
sunboard analytics experience <key> [--window 7d|30d|90d|all] [filters...]| Option | Description |
|---|---|
--window <7d|30d|90d|all> | Time window. Defaults to 30d. |
--version <list> | Version filter: latest, active, a version number, or id. Repeat or comma-separate. |
--segment <list> | Filter by segment key or id. Repeat or comma-separate. |
--environment <list> | Filter by environment key. Repeat or comma-separate. |
--origin <list> | Include only these origins, e.g. https://app.example.com. |
--exclude-origin <list> | Exclude these origins, e.g. http://localhost:3000. |
--exclude-local-origins | Exclude localhost, 127.0.0.1, [::1], and .local origins. |
--include-legacy-steps | Include step keys that only exist in older selected versions. |
--enrich | Add what dropped users did instead, from the connected analytics provider. |
--step <key> | With --enrich: anchor enrichment on the edge into this funnel node (a step key, or __goal__) instead of the largest dropoff. |
sunboard analytics revenue
Show revenue and retention for the project — trial → paid conversion, expected trial value, revenue per activated user, retention, and a per-onboarding-path (and per-segment) breakdown. Needs the server SDK wired to report billing.
sunboard analytics revenue [--window 7d|30d|90d] [--environment <key>]| Option | Description |
|---|---|
--window <7d|30d|90d> | Time window. Defaults to 30d. |
--environment <key> | Environment to read. Defaults to production. |
sunboard integrations
Connect the product analytics you already use, so analytics experience --enrich and the Analyze skill can show what dropped
users did instead. See Analytics integrations for the
full setup guide.
sunboard integrations # list connections + health
sunboard integrations connect posthog [--environment <key>] [--host <url>] [--posthog-project <id>] [--key-stdin]
sunboard integrations disconnect posthog --environment <key>| Option | Used by | Description |
|---|---|---|
--environment <key> | connect, disconnect (required) | Environment the connection serves. Connect defaults to production. |
--host <url> | connect | Provider host. Defaults to https://us.posthog.com. |
--posthog-project <id> | connect | The PostHog project id (the number in the project URL). |
--key-stdin | connect | Read the API key from stdin (for scripts and agents). |
The key never rides argv
connect reads the credential from a hidden prompt, the
SUNBOARD_POSTHOG_KEY env var, or --key-stdin — never as a flag value, so
it can't leak into shell history. It's verified against the provider before
anything is saved and never displayed again.