Overview
The flagctl CLI — same operations as the dashboard.
The CLI talks to the flagctl API at /v1/... over HTTPS using a Bearer token plus an X-Flagctl-Project header. Source lives at flagctl/flagctl; distributed through Homebrew and the install script.
Install
brew install flagctl # or curl -fsSL https://flagctl.dev/install.sh | sh
Global flags
| Flag | Effect |
|---|---|
--json | Print the raw API payload. Designed for piping. |
--project <slug> | Override the linked project for one invocation. |
--env <name> | Target a specific environment. |
Command groups
| Group | Covers |
|---|---|
link | Bind a directory to a flagctl project. |
sync | Pull from control plane to YAML. Apply YAML to control plane. |
preview | PR-scoped overrides for preview deployments. |
generate | Generate TypeScript types and JSON schemas from YAML. |
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | API returned an error. --json prints the body. |
2 | Local validation failed. |