dif.sh
A Git-native feature flagging and A/B testing platform that uses Markdown files and a CLI to manage experiments directly within the codebase.
A Git-native feature flagging and A/B testing platform that uses Markdown files and a CLI to manage experiments directly within the codebase.
What the product does and how it is positioned
dif.sh is a developer-focused experimentation platform that stores feature flags, A/B tests, and rollouts as Markdown files within a project's repository. This approach allows teams to manage the entire lifecycle of a feature flag using standard version control tools.
The system integrates with existing Git workflows, enabling the use of pull requests for experiment approvals and maintaining a permanent, versioned history of all changes. It includes a CLI that automates the creation, validation, and conclusion of tests while generating a typed client for production use.
By utilizing a local build process, the tool detects potential experiment collisions before they reach production. It also generates context files specifically designed to help AI coding agents understand the current experimental state of the codebase.
Source-supported ways to use the product
Teams can define variants, hypotheses, and metrics in Markdown files to run and track experiments alongside their code.
Providing coding agents with a generated context file so they understand active experiments and prior learnings during development.
The documented workflow, where available
Run the init command to set up the local folder structure, including experiment and surface directories within the repository.
Use the CLI to draft a new test, which automatically pulls historical context from the relevant surface log to inform the new hypothesis.
Execute validation checks to ensure configurations are correct and use the QA command to preview specific variants locally.
Run the build command to generate a typed client and resolve exclusion group conflicts before shipping the code to production.
Wrap up a test by archiving the file, drafting a decision block, and updating the surface's learning log for future reference.
The platform treats feature flags and experiments as code artifacts, utilizing Markdown files for configuration and Git for version control. This approach is designed so that the audit log and approval process remain within existing developer workflows like pull requests, eliminating the need for a separate database or external dashboard for configuration management.
During the build process, the tool resolves the exclusion graph to ensure that no user is bucketed into two conflicting experiments simultaneously. If a conflict is detected, the build fails in the continuous integration environment, helping reduce logic clashes from reaching the production application.
Checks to run with your own material and workflow
What was checked and when
Answers based on the source-checked product record
The system uses exclusion groups defined in the file frontmatter and checks for collisions during the build step, failing the build if a user would be bucketed into two conflicting tests.
Customer data is not stored or committed to the repository; instead, audience attributes are declared in configuration and values are provided at runtime from the application's user context.
Surfaces act as a repository of institutional memory, containing markdown files that log prior learnings and landmines for specific screens or features to inform future experiments.
Every build regenerates a context file containing active flags and recent learnings, which coding agents can read at the start of a session to understand the current experimental state.
No, the core functionality operates via the CLI and local files, though an optional cloud layer is available for teams wanting centralized analytics and confidence interval visualizations.