← All comparisons

dif vs Unleash

Checked Oct 7, 2026

Unleash is a flag server. You run it yourself with PostgreSQL or pay Unleash to host it, change a flag in its Admin UI, and backend SDKs pick the change up on their next refresh, 15 seconds by default, with no deploy. dif has no server: each flag is a Markdown file in your repo, dif build compiles it into a TypeScript client, and a change reaches users with your next deploy. Unleash is the better tool when a flag must change without a deploy, when your services are written in Go, Java, Python or another language, when you need per-environment rules, or when the people changing flags do not open pull requests. dif fits a TypeScript codebase that does not want a flag service and a database to operate, and where a flag change should be a reviewed pull request. Neither open-source core computes experiment statistics.

Side by side

RowdifUnleash
Where flags liveOne Markdown file per flag or experiment under dif/experiments/, in your git repo.In an Unleash server and its PostgreSQL database, hosted by you or by Unleash. You change flags in the Admin UI, through the Admin API or through the MCP server. [5][1][14]
How a change shipsEdit the file, merge the pull request, run dif build, deploy the app. There is no runtime toggle.Change the activation strategy in Unleash. Backend SDKs refresh their flag data every 15 seconds by default, so the change applies without a redeploy. [6][4]
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 connection to Unleash or Unleash Edge. Backend SDKs fetch flag data with a client token, cache it in memory and evaluate locally. Frontend SDKs do not evaluate locally: the Frontend API or Edge evaluates and returns the enabled flags, refreshed every 30 seconds by default in the JavaScript SDK. [4][13]
SDK languagesJavaScript and TypeScript only. Adapters for React, Svelte, the Vercel Flags SDK and an OpenFeature server provider.Backend SDKs: Go, Java, Node.js, PHP, Python, Ruby, Rust and .NET. Frontend SDKs: Android, Flutter, iOS, JavaScript, Next.js, React, React Native, Svelte and Vue. Community SDKs include Elixir and Clojure. [4][2]
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.Variants with weights, and no results view for them. The A/B testing guide has you send impression events to an analytics tool. Impact metrics, part of the Enterprise distribution, chart aggregate application metrics such as error rates during a rollout. [9][10][11][3]
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.Open Source is free and self-hosted with no seat limit, capped at 1 project, 2 environments and 5,000 flags per instance. Pay-As-You-Go is $75 per seat per month; on Unleash Cloud it includes 53M API requests per month, then $5 per million, and self-hosted has a 5 seat minimum. Enterprise is an annual custom quote. [1]
LicenceMIT for the CLI, the SDK and every adapter.AGPL-3.0 for the Unleash/unleash repository from v8.0.0, announced on 2026-06-02. Earlier releases were Apache-2.0. SSO, role-based access control and change requests are in the paid plans. [2][3][1]
Self-hostingNothing to host. There is no flag server; the flags run from your repo and your build. Dif Cloud is a hosted product.Yes. The server runs from Docker against PostgreSQL 15 or later. The paid plans can be self-hosted or run on Unleash Cloud. [5][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 runs locally with npx @unleash/mcp. Its tools judge whether a code change needs a flag, create the flag, set a rollout, toggle an environment and write cleanup instructions. A remote MCP server hosted by your instance is an Enterprise feature. [14]
Flag valuesString variant ids only. No typed values, no JSON payloads, no remote config.Each variant has a name, a weight and an optional payload typed string, json, csv or number. [7]
Targeting rulesEquality and list membership on attributes declared in dif/config.yaml. No ranges, regex, semver or nested groups.Constraints with IN and NOT_IN, numeric comparisons (NUM_GT, NUM_LTE), date (DATE_AFTER, DATE_BEFORE), string (STR_CONTAINS, STR_STARTS_WITH) and SemVer operators. Segments reuse a set of constraints across strategies. [6]
EnvironmentsNone. The schema has no environment field.Each flag has a separate configuration per environment. The defaults are development and production. Open Source allows 2; the paid plans list unlimited environments. [8][1]
Review before a change appliesThe pull request. Every change to a flag file has an author, a review and a commit, under the branch protection your repo already has.Change requests add an approval step before a change applies in an environment, with up to 10 required approvals. The docs label them Enterprise, and the pricing page lists them in both paid plans. [12][1]
Automatic safeguardsNone. metrics.guardrails is a list of names the core does not watch.A safeguard reacts when an impact metric crosses a threshold: it turns the flag off in that environment or pauses a release plan. Connected SDKs see the change on their next refresh. Unleash lists safeguards in its Enterprise distribution. [11][3]
What you operateA CLI step in the build. No service, no database, no tokens.Self-hosted: the Unleash server and PostgreSQL, plus Edge if many frontend clients connect. On Unleash Cloud, Unleash runs them. [5][13][1]

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

Which one to choose

Choose Unleash if

  • A flag has to change without a deploy. Backend SDKs refresh from Unleash every 15 seconds by default. In dif, turning a flag off is a merge, a dif build and a deploy.
  • Your services are written in Go, Java, PHP, Python, Ruby, Rust or .NET, or you ship Android, iOS or Flutter apps. dif has a JavaScript and TypeScript SDK and nothing else.
  • You need different flag settings in development and production. Unleash configures each flag per environment. dif has no environment field.
  • People who do not open pull requests need to change flags. Unleash has an Admin UI. dif has files.
  • You target on numeric ranges, dates, string prefixes or SemVer. dif audiences match by equality or list membership only.
  • A variant has to carry a JSON or number payload. dif variants are string ids.
  • You want a metric threshold to turn a flag off for you. Unleash safeguards do that in its Enterprise distribution. dif does not watch guardrail metrics.

Choose dif if

  • Your app is TypeScript and a flag change can wait for the next deploy.
  • You do not want to run a flag server and a PostgreSQL database, or pay per seat for someone else to run them. dif adds one build step and nothing to operate.
  • You want flag evaluation with no request to a flag API and no token, in the browser as well as on the server. @dif.sh/sdk reads the compiled client and hashes the user ID.
  • You want review on every flag change without a paid plan. In dif the review is the pull request.
  • You run experiments and want the hypothesis, owner, primary metric and decision 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.
  • You want an MIT licence on the whole toolchain, or hosted results at a flat $50 per month for 1,000,000 events with unlimited seats.

Moving from Unleash to dif

dif has no Unleash importer. Migration is by hand, one flag at a time, and the Unleash SDK and @dif.sh/sdk can run side by side while you move.

  1. List the flags your code still reads. Leave in Unleash anything that needs a no-deploy switch, a payload or a safeguard.
  2. For each flag you move, run dif new <id> --surface <name>. A gradual rollout at 25% becomes two variants, "off" with weight 75 and "on" with weight 25. Quote "off" and "on" in the YAML. Copy named variants and their weights as they are. Weights must sum to 100. Set status: active.
  3. Rewrite constraints and segments as audience.include and audience.exclude on attributes declared in dif/config.yaml. A constraint dif cannot express (NUM_GT, DATE_AFTER, a SemVer check) has to be computed in dif/audiences/<name>.ts and declared as a boolean or enum attribute.
  4. Collapse per-environment configuration into one definition. If development and production must differ, that difference has to live in your app config.
  5. Replace isEnabled() and getVariant() calls with dif("<id>", { ... }) and one branch per variant. Move variant payloads into the code of each branch.
  6. Expect assignments to change. dif buckets with its own SHA-256 hash of the user ID, so a user in the 25% under Unleash is not guaranteed to be in the 25% under dif.
  7. Forward exposures from dif/events/exposure.ts to the analytics tool that received your impression events, or connect Dif Cloud.
  8. Run dif validate, then dif build. Add "prebuild": "dif build" to package.json, because dif/generated/ is gitignored. When the last flag has moved, remove the Unleash SDK and shut down the server.
$ npm install -g @dif.sh/cli

Sources

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

  1. Unleash pricing page read Oct 7, 2026
  2. Unleash/unleash README and licence read Oct 7, 2026
  3. Unleash blog: Unleash is moving to AGPLv3 (2026-06-02) read Oct 7, 2026
  4. Unleash docs: SDK overview read Oct 7, 2026
  5. Unleash docs: Self-hosting, getting started read Oct 7, 2026
  6. Unleash docs: Activation strategies read Oct 7, 2026
  7. Unleash docs: Strategy variants read Oct 7, 2026
  8. Unleash docs: Environments read Oct 7, 2026
  9. Unleash docs: A/B testing guide read Oct 7, 2026
  10. Unleash docs: Impression data read Oct 7, 2026
  11. Unleash docs: Impact metrics and safeguards read Oct 7, 2026
  12. Unleash docs: Change requests read Oct 7, 2026
  13. Unleash docs: Unleash Edge read Oct 7, 2026
  14. Unleash docs: MCP server read Oct 7, 2026