← Blog

dif vs LaunchDarkly: repo or dashboard

dif vs LaunchDarkly comes down to where the flag lives: a Markdown file in your repo, or a row in a hosted dashboard. LaunchDarkly is the category leader, with sub-second kill switches and SDKs across dozens of languages. dif is the open-source, git-native option: every flag and experiment is one file, reviewed in a pull request, with nothing separate to host. This post weighs what each costs against what each offers, so you can pick for your stack.

Key Takeaways

  • dif keeps every flag as a Markdown file in your repo, reviewed in a pull request. LaunchDarkly keeps it as a row in a hosted dashboard.
  • LaunchDarkly wins on speed and reach: sub-second flag propagation over streaming, and SDKs in 30+ languages.
  • dif’s runtime SDK is about 5 kB with zero dependencies and makes no network call to assign a variant; LaunchDarkly’s client stays connected to a streaming service.
  • LaunchDarkly moved to usage-based pricing in 2026 (per service connection, per client-side MAU). dif Cloud is a flat $50/mo for 1 million events with unlimited seats, and the CLI and SDK are free and MIT licensed.
  • The real tradeoff is speed of rollback: dif’s is a commit and a deploy, LaunchDarkly’s is an instant dashboard toggle.

What LaunchDarkly does well

LaunchDarkly is the market leader, and the reasons are real. It streams a flag change to your app in under a second, so flipping a toggle in the dashboard takes effect everywhere with no new deploy. That instant kill switch matters on a payment path, or anywhere a bad release needs to stop now.

It also ships SDKs across a long list of languages (Go, Python, Ruby, Java, .NET, and more, on top of JavaScript). A polyglot backend is covered on day one. The platform covers the enterprise checklist too: role-based access, audit logs, approval flows, SSO, and a support SLA.

If sub-second propagation across a fleet, or an SDK in a language dif does not cover, is the requirement, LaunchDarkly meets it today and dif does not.

Where dif puts the flag: a file, not a dashboard row

dif starts from one opinion: a feature flag is part of your codebase, so it should live in your repo. Every flag and every experiment is a single Markdown file next to the code it changes.

---
id: one-click-checkout
status: active
owner: priya@acme.com
surface: checkout
audience:
  include:
    - plan: [pro, enterprise]
variants:
  - id: "off"
    weight: 80
  - id: "on"
    weight: 20
metrics:
  primary: completed_checkout
  guardrails:
    - refund_rate
---

You review that file in a pull request like any other change. Its history is the git history. dif validate checks that the weights total 100, the owner is a real email, and the referenced surface exists, then scans your app source for dif("...") call sites and warns on orphans. It runs in CI, so a broken flag fails the pull request like a broken build.

dif build compiles the active files into a typed client your app imports, plus a context.json that summarizes every active flag and each surface’s latest learning. A coding agent reads that file on session start, which a login-gated dashboard cannot hand it. The runtime SDK is about 5 kB with zero dependencies, and assignment is a pure function of the user ID: no network call, no flicker between variants across page loads. The same model underlies feature flags in your repo and feature flags in git.

dif vs LaunchDarkly, side by side

DimensiondifLaunchDarkly
Where flags liveMarkdown files in your repoA hosted dashboard
LicenseOpen source (MIT)Proprietary
PricingFree CLI and SDK; Cloud $50/mo for 1M events, unlimited seatsUsage-based: per service connection and per client-side MAU (2026)
Runtime SDK~5 kB, zero dependencies, no network call to assignSDK plus a persistent streaming connection
Change a flagCommit and deployInstant, from the dashboard
Sub-second kill switchNo (rollback is a deploy)Yes
Language SDKsJavaScript and TypeScript, with React and Svelte adapters30+ languages
Review and audit trailPull requests and git historyIn-app approvals and audit logs
Agent-readable stateYes (context.json)No
Self-hostable coreYes, the CLI and SDK run entirely in your repoNo, SaaS only

Two of those rows are LaunchDarkly’s outright: the instant kill switch and the breadth of language SDKs. The persistent streaming connection is what makes the first one possible, and it is infrastructure dif’s model is built to avoid, not to catch up to. The rest is where dif’s model pays off, because the repo is already the thing both a PM and an engineer trust.

The tradeoff: a commit vs a toggle

Rolling back a flag in dif means editing one number to 0 and merging. There is no separate rollback mechanism and no dashboard state that can disagree with the repo, so why you rolled back, and when, is in the git history rather than someone’s memory of a 2am toggle.

That is slower than LaunchDarkly’s dashboard. If your build takes ten minutes, your worst-case kill is ten minutes. For a payment path that needs a sub-second kill, dif is the wrong tool for that flag, and LaunchDarkly is the right one. For most flags, where the failure mode is “some users see the new thing,” a merge and a deploy is fine, and every failure mode in dif resolves to the control variant and records nothing.

Pricing: flat vs usage-based

LaunchDarkly moved to usage-based pricing in 2026: Foundation meters on service connections and client-side MAU, so the bill grows with your app’s footprint, not just your headcount. LaunchDarkly’s pricing page has the current rate card.

dif’s CLI and SDK are free and MIT licensed, with nothing to meter because nothing calls home for assignment. dif Cloud, the optional hosted layer, is a flat $50 per month for 1 million events with unlimited seats, then $0.02 per 1,000 events past that. See dif Cloud pricing for the full plan, and the LaunchDarkly pricing breakdown for the exact math on a sample team’s bill under each model.

Who should choose which

Choose LaunchDarkly if you need a sub-second kill switch on a critical path, SDKs across many backend languages today, or a mature enterprise governance suite (SSO, approval flows, audit logs), and usage-based pricing fits your budget.

Choose dif if you want flags and experiments reviewed in pull requests instead of toggled in a dashboard, your stack is JavaScript or TypeScript, and you want a coding agent to read what is gated and what has already been tried.

Moving a flag off LaunchDarkly

There is no one-click import, because the two store flags in different places. Recreate the flag as a .md file with the same variants and weights, gate the code path with a dif("flag-id") call, and run dif validate. Because the flag is now a file, the migration goes through a normal pull request, reviewed like any other change. Start with a handful of active flags, not the whole back catalog, and keep LaunchDarkly live on anything that needs its instant kill switch until you are sure you do not.

Try dif

Install the CLI and scaffold a project. No account or API key required.

npm install -g @dif.sh/cli
dif init

dif init writes a dif/ directory, a generated TypeScript client, and the agent guidance files. From there, dif new drafts a flag, dif validate checks it, and dif build compiles it. The docs cover the rest, and the code is on GitHub.

FAQ

Is dif a LaunchDarkly alternative? Yes, for teams that want flags reviewed in a pull request instead of toggled in a dashboard. dif is open source (MIT); LaunchDarkly is proprietary. dif keeps each flag as a Markdown file in the repo; LaunchDarkly keeps it in a hosted dashboard with a streaming connection to your app.

Does dif have an instant kill switch like LaunchDarkly? No. Rolling back a dif flag is editing its weight to 0 and merging, a commit and a deploy. LaunchDarkly pushes a change in under a second from the dashboard. For a payment path or any flag that needs a sub-second kill, use LaunchDarkly for that flag.

What languages does dif support compared to LaunchDarkly? dif’s SDK is JavaScript and TypeScript, with React and Svelte adapters. LaunchDarkly ships SDKs across 30+ languages, including Go, Python, Ruby, Java, and .NET. Broader backend-language coverage is where LaunchDarkly is still ahead.

How does pricing compare between dif and LaunchDarkly? LaunchDarkly is usage-based as of 2026, metered on service connections and client-side MAU. dif’s CLI and SDK are free; dif Cloud is a flat $50/mo for 1 million events with unlimited seats. The gap widens as service count and MAU grow; see the full breakdown in the LaunchDarkly pricing alternative post.

Can I migrate from LaunchDarkly to dif? Yes, flag by flag. Recreate each one as a .md file with the same variants and weights, gate the code with dif("flag-id"), and run dif validate. There is no automated importer, so migrate active flags first and leave anything needing a sub-second kill switch on LaunchDarkly.

Is dif open source and self-hostable? Yes. The CLI and SDK are MIT licensed and run entirely from your repo, with nothing separate to host. dif Cloud is an optional hosted analytics layer at cloud.dif.sh; LaunchDarkly has no open-source or self-hosted option.

Conclusion

dif vs LaunchDarkly is a choice between two models, not two feature lists. LaunchDarkly wins on speed: a sub-second kill switch, streaming propagation, and SDKs across 30+ languages. dif wins on where the flag lives: a Markdown file in your repo, reviewed in a pull request, with a context.json a coding agent can read and nothing separate to host. The honest cost is rollback speed, a commit and a deploy instead of a toggle, and that cost is worth naming before you pick either one.

For most flags, where the worst case is “some users see the new thing a few minutes longer,” dif’s model is the simpler one to run. For a payment path or anything that needs to stop in under a second, keep that flag on LaunchDarkly. Install the dif CLI (npm install -g @dif.sh/cli, then dif init) and try it on one flag before deciding which model fits the rest.