Skip to main content

Overview

Flags (toggles) live in shipd.config.ts. You review the file in a PR, then shipd push applies it. There is no lockfile — the server is the remote, CAS versions prevent clobbering. This guide follows Maya adding Fieldkit’s checkout and search flags.

The file

shipd.config.ts
packages/flags/shipd.config.ts

Types of flags

Variant default must be a member of variants — TypeScript rejects "search-variant": { default: "v3" }. Optional on every flag: description, tags, deprecated: true (lifecycle deprecated).

Sync

Confirm unless you pass --yes or --ci (CI=1 / SHIPD_CI=1). Then typegen writes src/generated/flags.ts (override with .shipd/config.jsontypesOut, or shipd types gen -o).

Pull vs push

shipd pull is a full rewrite. Commit first.

What is global vs per environment

Definition creates/updates/archives require flag.production.toggle. Default-only edits on non-production use flag.state.update. managedBy (code or dashboard) is last-touch attribution, not a lock. --adopt is a deprecated no-op.

Remotes you did not list

shipd push leaves remote-only flags alone. --prune archives them (never hard-deletes).
Stale versions return 409 (exit 3). shipd pull then push, or --force (audited).

Next