Control Path logo

Control Path: Type-Safe Feature Flags, Git-Native

Feature flags that catch typos at compile-time, not runtime. Open-source, self-hosted, and built by developers, for developers.

In active development. CLI and SDKs available now.

The Problem with Traditional Feature Flags

Most feature flag solutions force you to choose between convenience and reliability. Here's what developers face:

  • Network latency: SaaS platforms add 50-200ms to every flag check, impacting performance in hot paths
  • Runtime errors: String-based APIs like getFlag('new_dashbord') only fail in production
  • Configuration drift: Flag definitions live separately from code, creating sync issues
  • No type safety: Typos and incorrect flag names aren't caught until runtime
  • Flag rot: Unused flags accumulate over time, cluttering codebases and increasing maintenance burden

Control Path solves these problems with a Git-native, type-safe, open-source approach that keeps flags in your repository and catches errors at compile-time. No SaaS dependencies—you control your own infrastructure.

Why Control Path is Different

Type-Safe Flags

Catch typos at compile-time, not runtime. Full TypeScript support with IDE autocomplete.

// TypeScript catches this typo at compile-time
const enabled = evaluator.newDashbord(user, context);
// ❌ Property 'newDashbord' does not exist

Git-Native & Self-Hosted

Flags live in your repository alongside your code. Open-source and self-hosted—you manage your own S3 buckets for overrides. No vendor lock-in, no SaaS dependencies.

flags.definitions.yaml
.controlpath/production.deployment.yaml
.controlpath/production.ast

Zero Network Calls

Local evaluation with < 1ms latency. Works offline, no external services required.

AST artifacts are compact (< 12KB for 500 flags) and evaluated in-memory.

OpenFeature Compatible

Industry-standard SDK interface. Works with existing OpenFeature integrations.

Two-layer architecture: OpenFeature Provider + generated type-safe wrappers.

Prevents Flag Rot

Unused flag methods show up as unused code in your IDE. Git history provides a complete audit trail to track flag usage and identify stale flags.

Cleanup becomes a natural part of code maintenance, not a separate process.

Complete Audit Trail

Every flag change is version-controlled in Git. See exactly which flags were enabled at any point in time, making debugging production issues straightforward.

No more guessing which flag configuration was active when an incident occurred.

How It Works

1. Define Flags in YAML

Define your flags in flags.definitions.yaml in your repository:

flags:
  - name: new_dashboard
    type: boolean
    default: OFF
    description: "New dashboard UI experiment"
  
  - name: checkout_experiment
    type: multivariate
    default: control
    description: "Checkout flow experiment"
    variations:
      - name: CONTROL
        value: "control"
      - name: VARIANT_A
        value: "variant_a"
      - name: VARIANT_B
        value: "variant_b"

2. Compile to AST Artifacts

The CLI compiles deployment configurations into compact MessagePack AST artifacts:

$ controlpath compile --env production
✓ Compiled .controlpath/production.ast (8.2KB)

3. Use Type-Safe SDKs

Generated SDKs provide type-safe methods with full IDE autocomplete:

import { Evaluator } from './flags';

const evaluator = new Evaluator();
await evaluator.init({ artifact: './production.ast' });

// Type-safe flag evaluation
const showNewDashboard = await evaluator.newDashboard(user, context);
// ✅ TypeScript knows this returns boolean

// Batch evaluation with type safety
const flags = await evaluator.evaluateBatch(
  ['newDashboard', 'checkoutExperiment'] as const,
  user,
  context
);
// ✅ flags.newDashboard: boolean
// ✅ flags.checkoutExperiment: 'control' | 'variant_a' | 'variant_b'

Result: Feature flags that are fast (< 1ms), reliable (no network calls), and type-safe (compile-time validation). All version-controlled with your code in Git.

In Development

Development Status

Control Path is currently in active development and not yet ready for production use. The core CLI, AST compiler, and TypeScript SDK are available now, but we're continuing to build additional features in the open.

What's available: CLI tool for compiling flags, TypeScript SDK with type-safe evaluation, Git-native workflow, and local evaluation with zero network calls.

What's coming: File-based kill switches (S3 overrides), GitHub Actions integration, and additional SDKs. This is an open-source project—no SaaS, no vendor lock-in.

We're building this in the open and welcome early adopters, contributors, and feedback.

Ready to Try Type-Safe Feature Flags?

Control Path is in active development. Follow our progress, try the CLI and SDKs, contribute to the project, or join our early adopter program. No SaaS signup required—just Git and your code.