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. Public state is commonly used for application config, feature flags, settings, and catalog or inventory values. A version header is written to stderr when stderr is a TTY, so stdout remains clean for piping.

You can authenticate with a developer bearer session from sky login or a project API key from SKYSTATE_API_KEY / .env.local.

Options

OptionDescription
--project <slug>Required. Project slug.
--env <slug>Environment to fetch. Resolved from SKYSTATE_ENV or default_env when omitted.
--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.