Feature flags and config you own. Platform-agnostic.
Define flags and config as variations with conditions in YAML or JSON. At runtime, showwhat evaluates those definitions against a context object and resolves the first matching value: booleans, strings, numbers, or full objects. Store definitions in files, serve them from an API, or manage them in version control. Like OpenAPI for APIs, showwhat gives you a spec-first workflow with tooling built around it.
| Package | Description |
|---|---|
showwhat |
Main API for resolving feature flags and config values |
@showwhat/core |
Rule engine, schemas, parsers, and in-memory data source |
@showwhat/configurator |
React UI library for visual rule editing |
@showwhat/openfeature |
OpenFeature bridge for showwhat definitions |
| webapp | Browser app for authoring and testing definitions |
| docs | Documentation site |
npm install showwhat
pnpm add showwhat
yarn add showwhat
# Other runtimes
bun add showwhat
deno install npm:showwhatimport { showwhat, MemoryData } from "showwhat";
const data = await MemoryData.fromYaml(`
definitions:
checkout_v2:
variations:
- value: true
conditions:
- type: env
value: prod
- value: false
`);
const result = await showwhat({
keys: ["checkout_v2"],
context: { env: "prod" },
options: { data },
});
const entry = result["checkout_v2"];
if (entry.success) {
console.log(entry.value); // true
}Definitions are YAML or JSON documents with a definitions root key. Each definition has one or more variations evaluated in order. The first matching variation wins. Use definitions for boolean flags, config values, or structured objects.
definitions:
my_flag:
variations:
- value: "on"
conditions:
- type: env
value: [prod, staging]
- value: "off" # default (no conditions = always matches)- Primitives:
string|number|bool|datetime - Shorthands:
env|startAt|endAt - Composites:
and|or|matchAnnotations
See the Conditions guide for full details.
showwhat assumes definition authors are trusted. See the Security guide for considerations when accepting definitions from untrusted sources.
The codebase, tests, and documentation was created with AI assistance, with outputs reviewed by humans. See CONTRIBUTING.md for guidelines.