rulestead
Runtime decisions, made clear.
Typed feature flags, variants, and remote config for Elixir and Phoenix apps — deterministic evaluation, explainable decisions, and fake-backed tests without Postgres on the hot path.
Install {:rulestead, "~> 0.1"} (currently 0.1.x on Hex).
Two version lines: GitHub repo milestones (e.g.
v1.0.0GA, May 2026) track project delivery. Hex packages use0.1.xsemver until a future1.0API freeze.
What you get (60 seconds)
- Pure
Rulestead.evaluate/3on flag payloads +%Rulestead.Context{} - Keyed snapshot runtime via
Rulestead.Runtime.*for Phoenix apps - Ordered rules, sticky bucketing, first-match-wins precedence
- Explain API for support and incident response
- Installer, migrations, and
Rulestead.Fakefor tests
Optional sibling package rulestead_admin
adds a mounted LiveView operator UI — only when your app needs it.
Install
Host apps need ecto_sql ~> 3.14.
defp deps do
[
{:rulestead, "~> 0.1"},
{:ecto_sql, "~> 3.14"}
]
end
mix deps.get
mix rulestead.install
mix ecto.migrate
Phoenix integrators: follow the
Phoenix Integration Spine
for supervision → Plug → Rulestead.Runtime → lifecycle-honest flag create.
Runtime entrypoints
Keyed lookup (typical Phoenix path):
Rulestead.Runtime.enabled?/3Rulestead.Runtime.evaluate/3Rulestead.Runtime.explain/3
Payload-first (tests and tools):
Rulestead.evaluate/3Rulestead.explain/2
See Evaluation.
Choose your path
| You are… | Start here |
|---|---|
| Evaluating before install | Adoption Lab demo — docker compose up --build |
| Integrating into Phoenix | Getting Started → Installation |
| Operating flags | Flag Lifecycle → Admin UI |
| Supporting users | Explainability |
| Testing | Testing recipes |
Monorepo and docs
Full guide index: hexdocs.pm/rulestead
GitHub monorepo (demo app, contributing, maintainer docs): github.com/szTheory/rulestead