linkgo
dif.sh

dif.sh

AI

Feature flags and A/B tests defined as markdown files in your repo, with a generated context file coding agents read on session start.

-(0 Reviews)
Free Available
Starting from Free
Premium plans available

About dif.sh

Dif keeps feature flags and experiments in the repository instead of a separate dashboard: each flag, A/B test, holdout or staged rollout is one markdown file with YAML frontmatter under a dif/ folder, versioned in git and reviewed in a pull request like any other code. The CLI compiles those files into a tiny typed client plus a dif/context.json that coding agents such as Claude Code, Codex and Cursor read on session start, so prior experiment learnings travel with the work the way a CLAUDE.md does. Because everything is a file, git becomes the audit log and PR review becomes the approval flow, with no separate change history to reconcile against the code. The build resolves an exclusion graph and refuses to compile when two live tests would bucket the same user, so conflicts break in CI rather than in production. Audience targeting declares which attributes you segment on while the actual values arrive at runtime from your app, so no customer list is ever committed. The CLI and SDK are free; Dif Cloud is an optional hosted layer for live pulse and team metrics billed on a single event meter.

Key Features

Markdown-Defined Experiments: One .md file per flag or test holds id, status, owner, surface, hypothesis, audience, variants, metrics and guardrails in frontmatter, with the brief and rationale written below it.
Agent Context File: Every dif build regenerates dif/context.json listing active flags, experiments, variants and recent learnings, which coding agents pick up on session start.
Build-Time Conflict Detection: The build resolves an exclusion graph and refuses to compile when two live tests would bucket one user into both, so clashes break in CI instead of production.
One Shape for Four Concepts: Feature flags, A/B tests, holdouts and staged rollouts are the same file format with different frontmatter, reducing the number of concepts and failure modes.
Generated Typed Client: dif build emits a small typed client you import once at boot, then call per flag with control and variant branches — supported for web server, React and Svelte.
Privacy-Preserving Targeting: Audience attributes such as country, plan or returning_visitor are declared in config.yaml while values arrive at runtime from your app's user context, so no customer data is committed.
Structured Conclusion Workflow: dif conclude archives a finished experiment, drafts its Decision block and appends a line to the surface log so the next test on that screen starts informed.
Flexible Result Routing: Add a Dif Cloud key and dif.track() computes lift with no join code, or run dif init --events custom to own the handlers that forward events to Segment, Amplitude or your warehouse.

Use Cases

Keeping Experiments in Code Review: Ship flag and experiment changes through the same pull request flow as the code they gate, using git history as the audit trail.
Giving Coding Agents Experiment Context: Let an AI coding agent see which experiments are live on a surface and what prior tests taught before it edits that screen.
Preventing Overlapping Tests: Use exclusion groups to guarantee no user is bucketed into two conflicting experiments, caught at build time rather than discovered in the results.
Running Staged Rollouts: Ramp a new feature to a growing share of traffic using the same file format as an A/B test, without learning a separate rollout tool.
Instrumenting Without a Vendor Lock-In: Forward exposure and result events to an existing analytics warehouse instead of adopting a hosted experimentation database.
Small-Team Experimentation on a Budget: Use the free CLI and SDK with self-owned event handlers before deciding whether the hosted metrics layer is worth paying for.

Frequently asked questions about dif.sh

What is dif.sh?

Feature flags and A/B tests defined as markdown files in your repo, with a generated context file coding agents read on session start.

How does dif.sh work?

dif.sh works by combining Markdown-Defined Experiments: One .md file per flag or test holds id, status, owner, surface, hypothesis, audience, variants, metrics and guardrails in frontmatter, with the brief and rationale written below it., Agent Context File: Every dif build regenerates dif/context.json listing active flags, experiments, variants and recent learnings, which coding agents pick up on session start., Build-Time Conflict Detection: The build resolves an exclusion graph and refuses to compile when two live tests would bucket one user into both, so clashes break in CI instead of production., One Shape for Four Concepts: Feature flags, A/B tests, holdouts and staged rollouts are the same file format with different frontmatter, reducing the number of concepts and failure modes., Generated Typed Client: dif build emits a small typed client you import once at boot, then call per flag with control and variant branches — supported for web server, React and Svelte. to help users with Keeping Experiments in Code Review: Ship flag and experiment changes through the same pull request flow as the code they gate, using git history as the audit trail., Giving Coding Agents Experiment Context: Let an AI coding agent see which experiments are live on a surface and what prior tests taught before it edits that screen., Preventing Overlapping Tests: Use exclusion groups to guarantee no user is bucketed into two conflicting experiments, caught at build time rather than discovered in the results., Running Staged Rollouts: Ramp a new feature to a growing share of traffic using the same file format as an A/B test, without learning a separate rollout tool., Instrumenting Without a Vendor Lock-In: Forward exposure and result events to an existing analytics warehouse instead of adopting a hosted experimentation database..

What are the main features of dif.sh?

Key features include Markdown-Defined Experiments: One .md file per flag or test holds id, status, owner, surface, hypothesis, audience, variants, metrics and guardrails in frontmatter, with the brief and rationale written below it., Agent Context File: Every dif build regenerates dif/context.json listing active flags, experiments, variants and recent learnings, which coding agents pick up on session start., Build-Time Conflict Detection: The build resolves an exclusion graph and refuses to compile when two live tests would bucket one user into both, so clashes break in CI instead of production., One Shape for Four Concepts: Feature flags, A/B tests, holdouts and staged rollouts are the same file format with different frontmatter, reducing the number of concepts and failure modes., Generated Typed Client: dif build emits a small typed client you import once at boot, then call per flag with control and variant branches — supported for web server, React and Svelte..

Who is dif.sh for?

dif.sh is useful for anyone interested in Keeping Experiments in Code Review: Ship flag and experiment changes through the same pull request flow as the code they gate, using git history as the audit trail., Giving Coding Agents Experiment Context: Let an AI coding agent see which experiments are live on a surface and what prior tests taught before it edits that screen., Preventing Overlapping Tests: Use exclusion groups to guarantee no user is bucketed into two conflicting experiments, caught at build time rather than discovered in the results., Running Staged Rollouts: Ramp a new feature to a growing share of traffic using the same file format as an A/B test, without learning a separate rollout tool., Instrumenting Without a Vendor Lock-In: Forward exposure and result events to an existing analytics warehouse instead of adopting a hosted experimentation database..

How much does dif.sh cost?

dif.sh offers a free tier with paid plans for advanced features.

How do I get started with dif.sh?

Visit https://www.dif.sh/ to sign up and explore dif.sh.

Explore more AI Ai Tools tools

Browse all Ai Tools tools →

Compare dif.sh: vs Ponytail · vs GitWarren · vs Chalked · vs Causal