Define rules in YAML or JSON. Evaluate them in your app. Store them wherever you want.
npm install showwhat Like OpenAPI for APIs, showwhat gives you a spec-first workflow for feature flags and config.
The definition file is the source of truth. No vendors required.
Definitions are plain YAML or JSON. Store them in Git, serve from an API, or embed inline. Same format everywhere.
Built-in primitives for strings, numbers, datetimes, and booleans.
Shorthand types for environments and time windows. Add your own with registerEvaluators().
PRs are your approval process. Commit history is your audit log. Definitions fit naturally into code review and CI. Scale up to a database when you need.
The definition is the contract between authors and runtime. Write it in YAML or JSON, then resolve it with one function call.
definitions:
checkout_v2:
variations:
- value: true
conditions:
- type: env
value: prod
- value: falseimport { showwhat, MemoryData } from "showwhat";
const data = await MemoryData.fromYaml(yaml);
const result = await showwhat({
key: "checkout_v2",
context: { env: "prod" },
options: { data },
});
result.value; // true Load definitions from memory, files, or your own API. The DefinitionReader interface stays the same.
Rules resolve top-to-bottom. Time windows, environment matching, and catch-all defaults compose in the same definition. No special syntax. No separate scheduling interface.
definitions:
maintenance_mode:
variations:
- value: "Deployment in progress"
conditions:
- type: env
value: prod
- type: startAt
value: "2026-03-03T02:00Z"
- type: endAt
value: "2026-03-03T07:00Z"
- value: nullThe core uses Web Standard APIs only. Zero Node.js-specific dependencies. Use showwhat directly or through OpenFeature. Same definitions, any runtime.
import { showwhat, MemoryData } from "showwhat";
import { readFile } from "node:fs/promises";
const yaml = await readFile("./flags.yaml", "utf-8");
const data = await MemoryData.fromYaml(yaml);
const result = await showwhat({
key: "checkout_v2",
context: { env: "prod" },
options: { data },
});npm install showwhat