Skip to main content

Overview

Validates at runtime, normalizes for the CLI, and preserves key / variant unions in the return type. CLI loads this file with jiti (shipd.config.ts by default).

Flag types

Boolean

Variant

Number

JSON

Normalized output

defineFlags returns { version: 1, flags: { ... } } with key, tags: string[], and lifecycle: "active" | "deprecated" on each flag (deprecated: truelifecycle: "deprecated").

Typegen

shipd push, shipd pull, and shipd types gen write src/generated/flags.ts unless .shipd/config.json sets typesOut:
.shipd/config.json
Pass that interface to createClient<FlagDefinitions> and createShipdReact<FlagDefinitions>().

Scope reminder

Guides: Define flags in code.