← All comparisons

dif vs GrowthBook

Checked Oct 7, 2026

GrowthBook is an app with its own database. You create features in its UI, its SDKs download the feature definitions and evaluate them where the SDK runs, and a change reaches the app without a deploy. Its experiment analysis queries your data warehouse directly and has a deeper statistics engine than anything in dif: Bayesian and frequentist engines, CUPED, sequential testing and sample ratio mismatch checks. dif is a file format and a compiler: each flag is a Markdown file in your repo, dif build compiles it into a TypeScript client, and a change ships with your next deploy. GrowthBook is the better tool when analysis is the centre of the work, when metrics already live in a warehouse, or when your services are not JavaScript. dif fits a TypeScript codebase that wants flags reviewed in pull requests and no app or database to run.

Side by side

RowdifGrowthBook
Where flags liveOne Markdown file per flag or experiment under dif/experiments/, in your git repo.In the GrowthBook app. Features are created in its UI and can also be managed through its REST API, CLI and MCP server. A self-hosted install stores its data in MongoDB. [3][11][8]
How a change shipsEdit the file, merge the pull request, run dif build, deploy the app. There is no runtime toggle.Change the feature in GrowthBook. SDKs download and cache the definitions; the JavaScript SDK treats its cache as stale after 60 seconds by default. With streaming: true it receives changes over Server-Sent Events, on GrowthBook Cloud or behind a GrowthBook Proxy. [6][7]
Runtime dependencyNone. dif build compiles the active files into dif/generated/client.ts and @dif.sh/sdk hashes the user ID with SHA-256 in-process. No request to evaluate a flag.A download of feature definitions from GrowthBook, then evaluation wherever the SDK runs. In the JavaScript SDK a flag returns null until features have loaded. Remote evaluation on a private server is opt-in. [5][6]
SDK languagesJavaScript and TypeScript only. Adapters for React, Svelte, the Vercel Flags SDK and an OpenFeature server provider.The README counts 24 SDKs. The docs list JavaScript, React, Next.js, Vue, Swift, Kotlin, Flutter, React Native, Node.js, Python, Ruby, PHP, Java, Go, C#, Elixir and Rust, plus edge SDKs for Cloudflare Workers, Fastly Compute and Lambda@Edge. [2][5]
Experiment analysisNot in the open-source core. Exposures and dif.track() calls go to two handler functions you own, or to Dif Cloud, which reports lift with a 95% confidence interval.Built in and warehouse-native. GrowthBook runs SELECT queries against sources such as BigQuery, Snowflake, Databricks, Redshift, ClickHouse and Postgres and keeps only aggregates. Bayesian is the default engine, frequentist is available, and it checks for sample ratio mismatch. Sequential testing and CUPED are on the Pro plan. [9][10][1]
Pricing modelThe CLI and SDK are free. Dif Cloud is optional: $50 per month per workspace with 1,000,000 events and unlimited seats, then $0.02 per 1,000 events. Cloud has no free tier.Per seat on Cloud. Starter is free for up to 3 users with 1M CDN requests per month. Pro is $40 per seat per month for up to 30 users with 2M CDN requests, then $10 per extra million. Enterprise is a custom quote. Self-hosted Open Source is free. [1]
LicenceMIT for the CLI, the SDK and every adapter.Open core. The README says the bulk of the code is MIT and several directories are under the GrowthBook Enterprise License. [2]
Self-hostingNothing to host. There is no flag server; the flags run from your repo and your build. Dif Cloud is a hosted product.Supported. docker compose up -d starts one image (Next.js front end, Express API, Python stats engine) next to a MongoDB instance you provide. Self-hosted plans are Open Source and Enterprise; there is no self-hosted Pro. [8][2][1]
Agent and context supportdif init writes guidance into CLAUDE.md, AGENTS.md, .cursor/rules/dif.mdc and .github/copilot-instructions.md and installs four skills. dif build writes dif/context.json, a summary of active experiments. Dif Cloud serves experiment verdicts to agents over a read-only MCP server at cloud.dif.sh/mcp.An MCP server, hosted at mcp.growthbook.io/mcp or run with npx @growthbook/mcp@latest. It ships bundled skills and two tools that read and write the GrowthBook REST API. [12]
Flag valuesString variant ids only. No typed values, no JSON payloads, no remote config.ON/OFF, string, number or JSON. JSON features can be validated against a JSON Schema, an Enterprise feature. [3]
Targeting rulesEquality and list membership on attributes declared in dif/config.yaml. No ranges, regex, semver or nested groups.MongoDB-style conditions: $lt, $gt, $regex, $in, semver operators such as $vgte, nested $and, $or and $not, plus saved groups defined by rules or ID lists. [4]
EnvironmentsNone. The schema has no environment field.Each environment has its own SDK connection and independent rules, for example on in dev and off in production. [3]
Typed clientdif build writes dif/generated/client.ts on every build, from the files in the repo.growthbook generate-types --output ./types writes an AppFeatures type from the features in your GrowthBook account. [11]
Statistics depthNone in the open-source core. Dif Cloud reports lift with a 95% confidence interval.CUPED, sequential testing, multi-armed bandits and a power calculator on Pro. Post-stratification, contextual bandits and holdouts on Enterprise. Multiple testing corrections in the frequentist engine. [1][10]

The dif column is checked against the dif repository at v0.7.0. The GrowthBook column comes from the pages listed under Sources. If a row is out of date, open an issue.

Which one to choose

Choose GrowthBook if

  • Experiment analysis is the main job. GrowthBook has Bayesian and frequentist engines, CUPED, sequential testing and sample ratio mismatch checks. The dif open-source core computes no statistics.
  • Your metrics already live in BigQuery, Snowflake, Databricks or another warehouse and you want results computed there. dif does not read a warehouse.
  • A flag has to change without a deploy. GrowthBook SDKs pick up a change from the app. In dif, turning a flag off is a merge, a dif build and a deploy.
  • Your services are written in Python, Go, Ruby, Java, PHP, C#, Elixir or Rust, or you ship native mobile apps. dif has a JavaScript and TypeScript SDK and nothing else.
  • You need number or JSON flag values, per-environment rules, or targeting with ranges, regex and semver. dif has string variants, no environment field, and equality or list-membership audiences.
  • People who do not open pull requests need to run experiments. GrowthBook has a UI for that. dif has files.
  • You are a team of three or fewer and want a hosted product for $0. GrowthBook Cloud Starter is free for up to 3 users. Dif Cloud has no free tier.

Choose dif if

  • Your app is TypeScript and a flag change can wait for the next deploy.
  • You do not want to run an app and a MongoDB instance, or depend on a hosted one, to serve flags. dif has no server; dif build writes the flags into the app.
  • You want every flag change reviewed in the same pull request as the code it gates, with git history as the record.
  • You want flag evaluation with no download at startup. @dif.sh/sdk reads the compiled client and hashes the user ID, so no flag returns null while definitions load.
  • You want the hypothesis, owner, metrics and decision stored in the flag file, and dif conclude to append the learning to dif/surfaces/<name>.md.
  • You want CI to fail when two active experiments target one surface without a shared exclusion_group. dif validate exits 1 with error E007.
  • Your team is large and your traffic is modest. Dif Cloud is $50 per month for 1,000,000 events with unlimited seats; GrowthBook Cloud Pro is $40 per seat per month.

Moving from GrowthBook to dif

dif has no GrowthBook importer. Migration is by hand, one feature at a time, and the two can run side by side while you move.

  1. List the features your code still reads. Features that need a no-deploy off switch, a JSON value or warehouse analysis should stay in GrowthBook.
  2. For each feature you move, run dif new <id> --surface <name>. Copy each variation into variants and the rollout or experiment split into weight. Weights must sum to 100. Set status: active.
  3. Rewrite targeting conditions as audience.include and audience.exclude on attributes declared in dif/config.yaml. A condition dif cannot express ($gt, $regex, $vgte, a nested $or) has to be computed in dif/audiences/<name>.ts and declared as a boolean or enum attribute.
  4. Move number and JSON values into code. Each variant id maps to one branch in dif("<id>", { ... }).
  5. Collapse per-environment rules into one definition. If dev and production must differ, that difference has to live in your app config.
  6. Decide where exposures go. dif init --events custom scaffolds dif/events/exposure.ts and dif/events/track.ts, two functions you own, so you can keep writing exposure events to the pipeline that feeds your warehouse. Or connect Dif Cloud.
  7. Replace the SDK calls with dif(). Run dif validate and dif build, add "prebuild": "dif build" to package.json, then remove the GrowthBook SDK init and its client key.
$ npm install -g @dif.sh/cli

Sources

Every GrowthBook claim on this page comes from one of these pages. Pricing and features change; the date is when we read each one.

  1. GrowthBook pricing page read Oct 7, 2026
  2. growthbook/growthbook README read Oct 7, 2026
  3. GrowthBook docs: Feature flag basics read Oct 7, 2026
  4. GrowthBook docs: Targeting read Oct 7, 2026
  5. GrowthBook docs: SDKs read Oct 7, 2026
  6. GrowthBook docs: JavaScript SDK read Oct 7, 2026
  7. GrowthBook docs: GrowthBook Proxy read Oct 7, 2026
  8. GrowthBook docs: Self-hosting read Oct 7, 2026
  9. GrowthBook docs: Data sources read Oct 7, 2026
  10. GrowthBook docs: Statistics overview read Oct 7, 2026
  11. GrowthBook docs: CLI read Oct 7, 2026
  12. GrowthBook docs: MCP server read Oct 7, 2026