Philosophy
FlagKit treats feature flags as first-class TypeScript constructs rather than runtime configuration. This means your flags are:- Type-checked at compile time
- Version-controlled with Git
- Reviewed through pull requests
- Deployed with your application code
Traditional vs. FlagKit Approach
Defining Flags
Flags are defined inflags.config.ts using the FlagKit schema:
flags.config.ts
Code Generation
Runningflagkit generate produces:
Benefits
Type Safety
Catch errors at compile time, not runtime
Autocomplete
IDE knows all available flags and their types
Refactoring
Rename flags safely across your codebase
Documentation
Flags self-document with descriptions and types
Git Workflow
Because flags are code, they follow your normal Git workflow:Version Control
Flag definitions are committed to Git, but generated code typically is not:.gitignore
Schema Validation
FlagKit validates your flag definitions at generation time:flags.config.ts
Next Steps
Local Evaluation
Learn how FlagKit evaluates flags without API calls

