Summary
Hi OpenFeature & flagd maintainers,
I have built and released flagctl, an open-source CLI tool designed to simplify managing flagd feature flag configurations (flags.json / flags.yaml) for GitOps workflows.
Motivation
CNCF OpenFeature and flagd provide a vendor-neutral specification and high-performance in-process evaluation engine. However, manually authoring and maintaining flags.json or flags.yaml in Git repositories—especially managing complex JsonLogic targeting rules, progressive percentage rollouts, and multi-language code cleanup—can be error-prone for development teams.
flagctl provides an ergonomic CLI interface to safely create, update, target, ramp, deprecate, audit, and generate code accessors for flagd configurations.
Key Capabilities
- Progressive Feature Launches (
flagctl launch): Ramp feature percentages up/down (flagctl launch ramp --percent 50), configure multi-variant splits, or run cohort-specific progressive launches with spec-compliant Bucket ID support ({ "var": "<bucketId>" }).
- Ordered Rule Targeting (
flagctl target): Configure allowlists, denylists, and SemVer version gates with automatic tier-based priority ordering and overlap analysis hints.
- Immutable Flag Keys: Enforces flag key immutability to prevent telemetry fragmentation and broken runtime references.
- Safe 2-Stage Deprecation:
flagctl deprecate tags flags as deprecated while preserving state: ENABLED to prevent runtime FLAG_NOT_FOUND errors while freezing further edits.
- Code-Aware Deletion Guard:
flagctl delete scans source code (TypeScript, Go, Python, Java, C#, PHP, Rust) and blocks flag removal if active code references exist.
- Codebase Auditor:
flagctl audit scans source code for missing flags, orphaned flags, and uncleaned deprecated flags (includes --strict mode for CI/CD pipelines).
- Type-Safe Accessors:
flagctl generate produces strongly-typed wrapper accessors for TypeScript and Go for compile-time flag safety.
- Offline Schema Registry: Embedded versioned JSON schemas (
v0) enable validation without internet access.
Usage Example
# 1. Initialize flagctl workspace
flagctl init --language typescript
# 2. Create typed feature flag
flagctl create --key new-checkout-flow --type boolean --default on
# 3. Add Rule Targeting (Allowlist & Denylist)
flagctl target add --key new-checkout-flow --attribute email --operator endsWith --value '@company.com' --variant on
flagctl target add --key new-checkout-flow --attribute email --operator endsWith --value '@competitor.com' --variant off --top
# 4. Progressive Feature Launch
flagctl launch add --key new-checkout-flow --percent 20 --variant on
flagctl launch ramp --key new-checkout-flow --percent 50
# 5. Inspect ordered rule chain & validate schema
flagctl target list --key new-checkout-flow
flagctl validate && flagctl audit
Feedback
I would love to hear your thoughts about this and if this makes sense.
Summary
Hi OpenFeature & flagd maintainers,
I have built and released
flagctl, an open-source CLI tool designed to simplify managingflagdfeature flag configurations (flags.json/flags.yaml) for GitOps workflows.Motivation
CNCF OpenFeature and flagd provide a vendor-neutral specification and high-performance in-process evaluation engine. However, manually authoring and maintaining
flags.jsonorflags.yamlin Git repositories—especially managing complex JsonLogic targeting rules, progressive percentage rollouts, and multi-language code cleanup—can be error-prone for development teams.flagctlprovides an ergonomic CLI interface to safely create, update, target, ramp, deprecate, audit, and generate code accessors for flagd configurations.Key Capabilities
flagctl launch): Ramp feature percentages up/down (flagctl launch ramp --percent 50), configure multi-variant splits, or run cohort-specific progressive launches with spec-compliant Bucket ID support ({ "var": "<bucketId>" }).flagctl target): Configure allowlists, denylists, and SemVer version gates with automatic tier-based priority ordering and overlap analysis hints.flagctl deprecatetags flags as deprecated while preservingstate: ENABLEDto prevent runtimeFLAG_NOT_FOUNDerrors while freezing further edits.flagctl deletescans source code (TypeScript, Go, Python, Java, C#, PHP, Rust) and blocks flag removal if active code references exist.flagctl auditscans source code for missing flags, orphaned flags, and uncleaned deprecated flags (includes--strictmode for CI/CD pipelines).flagctl generateproduces strongly-typed wrapper accessors for TypeScript and Go for compile-time flag safety.v0) enable validation without internet access.Usage Example
Feedback
I would love to hear your thoughts about this and if this makes sense.