Interactive CLI wizard to set up feature flags for any JavaScript or TypeScript project.
- Detects your framework — Next.js, Nuxt, React, Vue, Angular, NestJS, Express, React Native, Expo, Flutter
- Lets you pick a provider — PostHog, LaunchDarkly, Flagsmith, GrowthBook, Unleash, ConfigCat — or a custom in-memory solution
- Generates production-ready files — client wrapper, React hooks / Vue composables / Angular services / NestJS modules depending on your stack
- Defines your initial flags — interactively, with env-variable overrides built in
# Run directly with npx
npx flagwiz
# Or install globally
npm install -g flagwiz
flagwiz| Provider | Free tier | Self-host | Best for |
|---|---|---|---|
| 🦔 PostHog | 1M req/mo | ✅ | Flags + analytics bundle |
| 🚀 LaunchDarkly | Developer plan | ❌ | Enterprise governance |
| 🏴 Flagsmith | 50k req/mo | ✅ | Open-source + remote config |
| 📊 GrowthBook | Unlimited (OSS) | ✅ | A/B testing + warehouse-native |
| ⚡ Unleash | Unlimited (OSS) | ✅ | Data sovereignty |
| 🐱 ConfigCat | 10 flags, unlimited seats | ❌ | Simple + team-friendly |
| 🔧 Custom | ∞ | n/a | No deps, env-driven, zero cost |
Generates framework-specific adapters for:
- Next.js — server/client aware, App Router compatible
- React (Vite/CRA) —
<FeatureFlagsProvider>+useFlag()hook - Vue.js — composable
useFeatureFlags()+ plugin - Nuxt.js — composable ready
- Angular —
@Injectableservice +InjectionToken - NestJS —
@Injectableservice +@Module - Express / Node — plain module
- React Native / Expo — hooks
- Flutter — Dart singleton service
The custom option generates zero-dependency feature flags:
import { featureFlags } from './lib/feature-flags'
// Check at runtime
featureFlags.isEnabled('new-checkout-flow') // → boolean
// Override via env (no restart needed in dev)
// FEATURE_NEW_CHECKOUT_FLOW=trueFlags are defined in a simple config file and can be overridden with env vars — great for local dev, staging, and CI environments without any external service.
lib/feature-flags/
├── flags.ts # Flag definitions + runtime resolver
├── adapter.tsx # Framework adapter (hooks / composable / service)
├── index.ts # Barrel export
└── README.md
lib/flags/
├── client.ts # SDK wrapper with typed API
├── useFeatureFlag.ts # React/Vue hook
├── index.ts # Barrel export
├── .env.example # Env var template
└── README.md
- Node.js >= 18
Contributions are welcome! Here's how to submit a pull request:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/<your-username>/flagwiz.git cd flagwiz
- Install dependencies:
npm install
- Create a branch for your change:
git checkout -b feat/my-improvement
- Make your changes and test them locally:
node src/index.js
- Commit with a clear message:
git commit -m "feat: add support for XYZ" - Push your branch and open a pull request:
Then go to github.com/thanatosartcoder/flagwiz and click "Compare & pull request".
git push origin feat/my-improvement
- Add support for a new provider (see
src/providers/index.js) - Add support for a new framework (see
src/utils/detector.jsandsrc/utils/generator.js) - Improve error messages or CLI output