← All comparisons

dif vs Flagsmith

Checked Oct 7, 2026

Flagsmith is an open-source flag server. Flags live in its database, you change them in its dashboard or through its API, and SDKs fetch the result, so a change reaches a running app without a deploy. You can use Flagsmith cloud or run the same server yourself with Docker and PostgreSQL. dif has no server: each flag is a Markdown file in your repo, dif build compiles it into a TypeScript client, and a change ships with the next deploy. Flagsmith is the better tool when a flag must change without a deploy, when your services are not JavaScript, when a flag has to carry a typed value, or when rules differ per environment. dif fits a TypeScript codebase that wants flag changes reviewed as pull requests and no service between the app and its flags.

Side by side

RowdifFlagsmith
Where flags liveOne Markdown file per flag or experiment under dif/experiments/, in your git repo.In a Flagsmith server, either Flagsmith cloud or one you run. You create a feature once per project and edit it per environment in the dashboard, through the API or through the MCP server. [6][12]
How a change shipsEdit the file, merge the pull request, run dif build, deploy the app. There is no runtime toggle.Change the flag in Flagsmith. No deploy. Server-side SDKs in local evaluation mode pick the change up on their next poll, every 60 seconds by default. Real-time updates over server-sent events need an Enterprise subscription. [2][3][5]
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.The Flagsmith API. In remote evaluation, the default, the SDK requests flags from the API; client-side SDKs fetch once at start and again when the identity changes. Server-side SDKs can use local evaluation: they download the environment document and evaluate in-process between polls. [3][4]
SDK languagesJavaScript and TypeScript only. Adapters for React, Svelte, the Vercel Flags SDK and an OpenFeature server provider.Client-side: JavaScript, React, Next.js and SSR, Android, iOS and Flutter. Server-side: Python, Java, .NET, Node.js, Ruby, PHP, Go, Rust and Elixir. OpenFeature providers are listed in the README. [3][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.Two routes. Multivariate flags bucket users and you read results in a tool such as Amplitude or Mixpanel. Native experimentation, with a managed warehouse and a Bayesian engine that reports lift, credible intervals and win probability, is in beta on Enterprise plans. [8][9]
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.By API requests and team members. Free is $0 with 50,000 requests per month, 1 team member and 1 project. Start-Up is $45 per month ($40 billed yearly) with 1,000,000 requests and 3 members. Scale-Up is $300 per month ($250 billed yearly) with 5,000,000 requests. Extra API calls are listed as starting at $50 per million and falling with volume. Enterprise is a quote. [1]
LicenceMIT for the CLI, the SDK and every adapter.BSD-3-Clause for most of the platform, MIT for a few repositories. Enterprise governance and management features need a Flagsmith Enterprise licence. [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.Yes. The open-source build runs with Docker Compose as two containers: the Django API with the React dashboard, and PostgreSQL. Helm charts and an OpenShift operator are documented. A supported Enterprise edition and a managed private cloud are sold separately. [11][10][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.A hosted MCP server at mcp.flagsmith.com gives an agent the Management API: it can create flags and manage segments, multivariate options and feature states. Release pipelines and change requests through MCP need a paid plan or self-hosted Enterprise. [12]
Flag valuesString variant ids only. No typed values, no JSON payloads, no remote config.Each feature has an on/off state and an optional typed value: string, number, boolean or JSON. [6]
Targeting rulesEquality and list membership on attributes declared in dif/config.yaml. No ranges, regex, semver or nested groups.Segment rules have 14 operators, including >, >=, <, <=, In, Contains, Matches regex, SemVer and % Split. [7]
EnvironmentsNone. The schema has no environment field.A feature is created once per project and its state and value are edited per environment. Multivariate bucketing is independent per environment. [6]
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, roles, permissions and audit logs are listed from the Scale-Up plan. Scheduled flags are listed from Start-Up. [1]

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

Which one to choose

Choose Flagsmith if

  • A flag has to change without a deploy. Flagsmith serves the new state from its API. In dif, turning a flag off is a merge, a dif build and a deploy.
  • Your services are written in Python, Java, .NET, Ruby, PHP, Go, Rust or Elixir, or you ship Android, iOS or Flutter apps. dif has a JavaScript and TypeScript SDK and nothing else.
  • A flag has to carry a number, a string or a JSON value you can edit remotely. dif variants are string ids and each one maps to a branch in code.
  • Staging and production need different flag states from one definition. dif has no environment field.
  • People who do not open pull requests need to change a flag, or you want scheduled flags and change requests in a dashboard.
  • You need targeting by range, regex or semver, or a percentage split inside a segment.
  • You want an open-source flag server on your own infrastructure. Flagsmith gives you one. dif gives you no server at all, which is a different thing.

Choose dif if

  • Your app is TypeScript and a flag change can wait for the next deploy.
  • You do not want to run or pay for a flag server. With dif there is no API to call, no PostgreSQL to back up and no environment key in the app.
  • You want flag evaluation with no request and no polling. @dif.sh/sdk has no dependencies and assigns by hashing the user ID.
  • You want every flag change reviewed in the same pull request as the code it gates, with git history as the record.
  • You run experiments and want the hypothesis, owner, primary metric and decision in the 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 hosted results priced by events with unlimited seats: Dif Cloud is $50 per month for 1,000,000 events. It has no free tier.

Moving from Flagsmith to dif

dif has no Flagsmith importer. Migration is by hand, one feature at a time, and both 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 remote value or per-environment state should stay in Flagsmith.
  2. For each feature you move, run dif new <id> --surface <name>. The file lands in dif/experiments/active/. A boolean feature becomes two variants, "off" and "on", quoted so YAML does not read them as booleans. Multivariate options become one variant each, with the percentage as weight. Weights must sum to 100. Set status: active.
  3. Rewrite segments as audience.include and audience.exclude on attributes declared in dif/config.yaml, with a resolver at dif/audiences/<name>.ts for each. A rule dif cannot express (>, <, Contains, regex, SemVer) has to be computed in the resolver and declared as a boolean or enum attribute. A % Split rule becomes variant weights.
  4. Move feature values into code. A string, number or JSON value becomes the body of the branch for that variant.
  5. Collapse per-environment state into one definition. If staging and production must differ, that difference has to live in your app config. Identity overrides have no equivalent beyond audience attributes and QA forces with ?_dif=.
  6. Replace hasFeature() and getValue() calls with dif("<id>", { ... }) and one branch per variant. Run dif validate, then dif build, and add "prebuild": "dif build" to package.json, because dif/generated/ is gitignored.
  7. If you already evaluate through the OpenFeature server SDK, @dif.sh/openfeature is a server provider you can swap in for string and boolean flags.
$ npm install -g @dif.sh/cli

Sources

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

  1. Flagsmith pricing page read Oct 7, 2026
  2. Flagsmith/flagsmith README read Oct 7, 2026
  3. Flagsmith docs: SDKs, remote and local evaluation read Oct 7, 2026
  4. Flagsmith docs: server-side SDKs read Oct 7, 2026
  5. Flagsmith docs: real-time flag updates read Oct 7, 2026
  6. Flagsmith docs: managing features read Oct 7, 2026
  7. Flagsmith docs: segment rule operators read Oct 7, 2026
  8. Flagsmith docs: A/B testing with multivariate flags read Oct 7, 2026
  9. Flagsmith docs: Experimentation overview read Oct 7, 2026
  10. Flagsmith docs: deployment and self-hosting read Oct 7, 2026
  11. Flagsmith docs: Docker hosting guide read Oct 7, 2026
  12. Flagsmith docs: MCP server read Oct 7, 2026