Skip to content

sky state public show ​

Display the latest public state for an environment as JSON.

Synopsis ​

bash
sky state public show --project <slug> [--env <slug>] [--format <json|plain>]

Description ​

Fetches the latest public-state version for the specified project and environment and writes the state JSON to stdout. A version header is written to stderr when stderr is a TTY, so stdout remains clean for piping.

Authentication follows the CLI auth resolution rules.

Options ​

OptionDescription
--project <slug>Required. Project slug.
--env <slug>Environment to fetch. See Environments.
--format <format>json (default, pretty-printed) or plain (compact single-line JSON).

Examples ​

bash
sky state public show --project my-app --env development
sky state public show --project my-app --env production | jq '.featureFlags.darkMode'
sky state public show --project my-app --env staging > staging-state.json
sky state public show --project my-app --env development --format plain

Output ​

When stderr is a TTY, metadata is written to stderr:

text
Environment  development
Version      v4
Created      2026-04-25 12:34
Comment      Release flags

State JSON is written to stdout:

json
{
  "featureFlags": {
    "darkMode": true
  }
}

If no state exists yet, the command prints No state found for <env>. to stderr and exits successfully.