Skip to main content

Overview

Three commands keep the local flag config (shipd.config.ts or shipd.config.go) and the server in sync. shipd diff shows what differs, shipd push makes the server match the file, and shipd pull makes the file match the server. There is no lockfile: the server is the source you compare against, and version checks stop you from overwriting someone else’s change. Each command works on one project and one environment: the ones your credential is bound to, or the ones you pass with --project and --env.

Go definitions

The CLI reads shipd.config.go directly. Push and pull generate Go accessors by default for Go input, unless typesLanguage overrides the output language. Pull writes the current server definitions back to the Go file.

The everyday loop

1

Edit the file

2

Diff

Output
Every line should be a change you made. A default: line you did not expect usually means someone changed that environment’s fallthrough in the dashboard. Pull before you push, or your push reverts it.
3

Push

Confirm the plan. Push applies it and regenerates types.
4

Commit

Commit definitions and generated output together. For Go, include the Go definitions and generated accessors.
default belongs to the environment you push to. Descriptions, tags, types, and variants are shared by every environment. See Field scope.

Pull

Use shipd pull to start from what is live, for example after a teammate edited flags in the dashboard or to resolve a conflict.
shipd pull rewrites the selected TypeScript, Go, or JSON config from scratch. Comments, formatting, and helper code are lost. Commit or stash the file first, then re-apply anything you need from git diff.
Each flag’s default comes from the fallthrough of the environment you pull from, so pulling from staging and production can give different files.

Flags missing from the file

A flag that is on the server but not in shipd.config.ts is left alone. shipd push warns about it, and shipd diff lists it as - archive flag. To archive those flags, pass --prune on purpose:
--prune archives every server flag missing from the file, including flags created in the dashboard and demo flags in a new project. Never add --prune to a script you have not diffed.

Next steps