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>
CommandDescription
listList 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>
OptionUsed byDescription
--name <name>create (required), updateSegment display name.
--key <key>createSegment key. Defaults to a slug of the name.
--description <text>create, updateSegment description.
--rules <json>create, updateSegment rules as inline JSON.
--rules-file <path>create, updatePath 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>
OptionUsed byDescription
--experience <key>attach (required), detachExperience key.
--segment <key>attach (required), detachSegment key.
--version <number|latest>attach (required)Version number, or latest.
--environment <key>attach, detachEnvironment key. Defaults to production.
--deployment <id>detach, pause (required), resume (required)Deployment id.
SubcommandDescription
listList active deployments for the current project.
attachBind or promote an experience version to a segment.
detachRemove a deployment (by id, or by experience + segment).
pausePause a deployment (enabled = false).
resumeResume 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>]
SubcommandDescription
showShow the active onboarding survey for the environment, if any.
setMake a deployed survey experience the active onboarding survey.
clearRemove the active onboarding survey so none is shown.
OptionUsed byDescription
--survey <key>set (required)Key of a deployed type: survey experience.
--environment <key>show, set, clearEnvironment 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...]
OptionDescription
--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-originsExclude localhost, 127.0.0.1, [::1], and .local origins.
--include-legacy-stepsInclude step keys that only exist in older selected versions.
--enrichAdd 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>]
OptionDescription
--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>
OptionUsed byDescription
--environment <key>connect, disconnect (required)Environment the connection serves. Connect defaults to production.
--host <url>connectProvider host. Defaults to https://us.posthog.com.
--posthog-project <id>connectThe PostHog project id (the number in the project URL).
--key-stdinconnectRead 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.

On this page