flagctl
CLI

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

FlagEffect
--jsonPrint the raw API payload. Designed for piping.
--project <slug>Override the linked project for one invocation.
--env <name>Target a specific environment.

Command groups

GroupCovers
linkBind a directory to a flagctl project.
syncPull from control plane to YAML. Apply YAML to control plane.
previewPR-scoped overrides for preview deployments.
generateGenerate TypeScript types and JSON schemas from YAML.

Exit codes

CodeMeaning
0Success.
1API returned an error. --json prints the body.
2Local validation failed.