The Statsig alternative for teams that want flags in git
The Statsig alternative for teams that want flags reviewed in a pull request instead of changed in a console is dif, an open-source, git-native tool: every flag and every experiment is a Markdown file in your repo. Statsig is a hosted feature-flagging and experimentation platform. Every flag, every experiment, and every metric lives in Statsig’s console, and your app talks to Statsig’s service to get them. dif deletes the console. A flag is one .md file next to the code it gates, checked into git, and the SDK evaluates it locally with no service to call.
Both handle flags and experiments well. The difference is where the definition of “on” lives: a row in Statsig’s hosted database, or a file your CI already validates. This post is about what changes when you make that move, and where Statsig still has the edge.
Key Takeaways
- dif keeps flags and experiments as Markdown files in your repo. Statsig stores them in a hosted console you reach with an account.
- Statsig Pro is $150/month for 5M events, then $0.05 per 1,000 events overage. dif Cloud is $50/month for 1M events, then $0.02 per 1,000, and both plans include unlimited seats.
- OpenAI acquired Statsig’s team in 2025. On May 5, 2026, Amplitude announced it will take on the Statsig brand and customers and maintain the current platform. Its post refers to the Statsig team at OpenAI.
- Statsig ships more than 30 SDKs across languages and platforms. dif’s SDK is JavaScript and TypeScript, with React and Svelte adapters.
- dif emits a
context.jsona coding agent reads on session start. Statsig’s console has no equivalent hand-off for an agent.
Why teams look for a Statsig alternative
Statsig works, and its free tier is generous: 2M events a month, unlimited flag and config checks, no credit card. Teams start looking elsewhere for a few concrete reasons.
The console is the source of truth. A flag, an experiment, and its rules live in Statsig’s hosted database, not in the repo. The code that reads the flag is one thing; the definition of what it does is another, behind a login, on Statsig’s infrastructure.
Usage-based pricing on events. The free Developer tier caps at 2M events a month. Pro is $150/month for 5M events, then $0.05 per 1,000 events in overage. Exposures, log events, and custom metrics all count, so the bill tracks product usage, not team size.
The closed core. Statsig’s SDKs are open source, but the console, the assignment service, and the stats engine run on Statsig’s infrastructure. None of that is something you can self-host.
The May 2026 ownership change. OpenAI acquired Statsig’s company and team in 2025. On May 5, 2026, Amplitude announced it would take over the Statsig brand, customer base, and platform maintenance across cloud and warehouse-native deployments, while the Statsig team that built the product stayed at OpenAI. If you are picking a tool to depend on for years, that split between who owns the roadmap and who wrote the code is worth weighing before you commit to it.
dif as the alternative in one paragraph
dif is an open-source, git-native feature-flag and experimentation tool. dif init scaffolds a dif/ directory in your repo. Each flag or experiment is a Markdown file with YAML frontmatter (id, owner, variants, weights, metrics) and prose below it (the brief, the decision, the learning). dif validate checks it in CI. dif build compiles the active files into a typed client your app imports, and the SDK assigns a variant locally with no network call. See feature flags in your repo for the full model.
Two models, side by side
Statsig’s model: your app calls the Statsig SDK, which syncs rulesets and metric definitions from Statsig’s service and evaluates them locally after that. The rules themselves are authored and changed in Statsig’s console. Exposures and events stream back to Statsig, where its stats engine computes results. That buys a real-time dashboard, sequential testing, and a metrics catalog you don’t have to build.
dif’s model: the rule lives in a file. Changing a rollout percentage is editing a number in dif/experiments/active/checkout-copy.md and opening a pull request. dif build compiles that file into client.ts, and the SDK’s assignment math (a hash of the user ID, mod 10,000) runs in your process. Nothing is synced from anywhere at runtime, because nothing is stored anywhere but the repo.
Statsig’s model suits a team that wants a shared console and a mature stats engine from day one. dif’s model suits a team that treats the flag as a code-review artifact, with the same audit trail as everything else in the repo.
Feature comparison
| Dimension | dif | Statsig |
|---|---|---|
| Where flags live | Markdown files in your repo | Statsig's hosted console and database |
| Account required | No | Yes |
| License | Open source (MIT), CLI and SDK | SDKs open source; console and backend closed |
| Free tier | CLI and SDK free forever, no events required | 2M events/month, unlimited flag checks, no credit card |
| Paid tier | $50/mo, 1M events, then $0.02/1,000, unlimited seats | $150/mo, 5M events, then $0.05/1,000, unlimited seats |
| SDK breadth | JavaScript and TypeScript, React and Svelte adapters | 30+ SDKs: client and server, including Java, Go, Python, .NET, Ruby, Swift, Rust |
| Change a rule | Edit the file, open a PR, merge | Change in the console; SDKs pick up the new ruleset |
| Stats engine | None in the CLI and SDK; frontmatter names a primary metric and guardrails | Sequential testing, CUPED, a full metrics catalog |
| Session replay | None | Included (50k/mo free, 100k/mo Pro) |
| Agent-readable state | Yes (context.json) | No |
| Current ownership | Independent, dif.sh | Amplitude announced in May 2026 it will take on the brand, customers and platform; Statsig team at OpenAI |
For a row-by-row table with a dated source for each Statsig claim, see dif vs Statsig.
Where Statsig wins
Statsig earns several of those rows outright.
The stats engine. Sequential testing, CUPED variance reduction, and a metrics catalog that a growth team can build on without writing their own analysis. dif’s experiments carry a primary metric and guardrails in frontmatter; the statistical machinery around them is not what dif does.
SDK breadth. More than 30 SDKs across client and server, covering Java, Go, Python, .NET, Ruby, Swift, and more. dif’s SDK is JavaScript and TypeScript, with React and Svelte adapters. For a polyglot backend, Statsig already has the language covered.
Session replay and a console UI. A non-engineering flag owner, a growth PM or a support engineer, gets a dashboard built for the job, plus session replay tied to the same events. dif has no dashboard; a rule change goes through code review.
A generous free tier. 2M events a month with no credit card is a real offer for a team that wants hosted analytics without committing to a paid plan first.
Where dif wins
The flag is the file. Opening dif/experiments/active/checkout-copy.md answers “why does this exist” without a login. Deleting the flag is a commit.
---
id: checkout-copy
status: active
owner: sam@acme.com
surface: checkout
hypothesis: >
"Get it today" on the checkout button lifts completed checkouts over the control copy.
variants:
- id: control
weight: 50
- id: "get-it-today"
weight: 50
metrics:
primary: completed_checkout
guardrails:
- refund_rate
created: 2026-09-20
---
## Brief
Testing "Get it today" against the control copy on the checkout button.
No account, no console. dif init writes the dif/ directory, and dif build writes the generated client. There is nothing to log into and nothing to sync at runtime.
Pull-request review as the approval flow. dif validate runs in CI, so a broken flag fails the pull request the same way a broken test does.
$ dif validate
error E005 dif/experiments/active/checkout-copy.md:1:1: variant weights sum to 90, expected 100
help: Distribute the variants so the weights total 100.
✗ 1 error(s), 0 warning(s)
Agent-readable state. dif build writes every active flag and each surface’s latest learning to context.json. A coding agent reads it on session start, so it does not re-run a test the team already concluded. See context.json explained for how an agent uses it.
Flat, predictable pricing. dif Cloud is $50/month for 1M events, with overage at $0.02 per 1,000. Statsig Pro is $150/month for 5M events, with overage at $0.05 per 1,000. Neither charges per seat.
No dependency on a mid-transition vendor. dif’s CLI and SDK run entirely from your repo. There is no console whose roadmap is now split between the company that owns the brand and the team that built the product.
Who should switch, and who should stay on Statsig
Stay on Statsig if any of these are true:
- You need sequential testing, CUPED, and a mature metrics catalog today, and building that analysis yourself is not worth it.
- Your backend spans several languages and you need a first-class SDK in each, not just JavaScript and TypeScript.
- A non-engineering flag owner needs a dashboard and session replay, and that is how your team already works.
Switch to dif if any of these are true:
- The flag is a code-review artifact to you, and a rule change belongs in the same pull request as the code it gates.
- You do not want an external console holding the definition of your flags, especially one whose product ownership just changed hands.
- A coding agent works with your flags, and you want it to read
context.jsoninstead of guessing what is live.
What migration looks like
Install the CLI and scaffold the workspace in the repo that already has your application code:
npm install -g @dif.sh/cli
dif init
Pick one active Statsig gate or experiment. Recreate it as a Markdown file in dif/experiments/active/. Map the fields:
- A Statsig gate’s name becomes dif’s
id - Pass/fail percentages become variants and weights
- Statsig’s targeting rules become dif’s
audience.includeandaudience.excludeblocks - A Statsig experiment’s primary metric becomes dif’s
metrics.primary
A Statsig call in TypeScript:
const showNewCheckout = Statsig.checkGate("new_checkout");
if (showNewCheckout) {
return <NewCheckout />;
}
return <LegacyCheckout />;
The dif equivalent:
import "./dif/generated/client";
import { dif } from "@dif.sh/sdk";
const checkout = dif("new-checkout", {
off: () => <LegacyCheckout />,
on: () => <NewCheckout />,
});
return checkout();
Run dif validate in CI, so a mistyped weight or a missing owner fails the pull request instead of shipping. Port one flag at a time, remove the Statsig call site as each one lands, and keep both SDKs running side by side until the last flag is ported. The feature flags in git post covers the day-to-day workflow once flags live in the repo. The Statsig migration guide maps gates, experiments and layers to dif files one step at a time.
FAQ
Is dif a Statsig alternative? Yes. Both handle feature flags and experiments. The difference is where the definition lives: dif stores each one as a Markdown file in your repo, and Statsig stores them in its hosted console.
Is Statsig still around after the Amplitude deal? Yes, the platform is still operating. OpenAI acquired Statsig’s company and team in 2025, and on May 5, 2026, Amplitude announced it will take on the Statsig brand and customers and maintain the platform across cloud and warehouse-native deployments. Its post refers to the Statsig team at OpenAI.
Can I self-host dif? There is nothing to host for the core workflow. The CLI and SDK are MIT licensed and run entirely from your repo. dif Cloud is an optional hosted analytics layer at cloud.dif.sh; skip it and dif still works.
How does dif’s pricing compare to Statsig’s? Both cores are free to start. dif’s CLI and SDK never require an account. Statsig’s free Developer tier includes 2M events a month with no credit card. For paid cloud analytics, dif Cloud is $50/month for 1M events, then $0.02 per 1,000; Statsig Pro is $150/month for 5M events, then $0.05 per 1,000. Both include unlimited seats.
Does dif support as many languages as Statsig? No. Statsig ships more than 30 SDKs across client and server languages. dif’s SDK is JavaScript and TypeScript, with React and Svelte adapters. For a polyglot backend, that gap is real.
What’s the tradeoff with dif? There is no console and no workflow for a non-engineering flag owner. A rule change goes through a pull request, which is slower than a dashboard toggle for someone who isn’t touching the repo. Rolling back is also a merge and a deploy, not an instant flip: if your build takes ten minutes, your worst-case kill is ten minutes.
Try dif as your Statsig alternative
The right Statsig alternative depends on what you need from the flag itself. If the flag is a code-review artifact and you would rather not hold its definition in an external console, especially one that just changed hands, dif is the shorter path. If you need a mature stats engine, session replay, or SDKs in a dozen backend languages today, stay on Statsig.
Install the CLI and see the model directly. No account, no API key, no console.
npm install -g @dif.sh/cli
dif init
dif init writes the dif/ directory and the managed agent guidance blocks. From there, dif new drafts a flag, dif validate runs in CI, and dif build compiles the active files. The docs cover the CLI and SDK, and best feature flag tools 2026 covers the wider comparison landscape.