Time to first flag: ~10 minutes
You ran make dev. Here is what is running and how to use it.
make dev starts 8 services via Docker Compose plus supporting infrastructure (PostgreSQL, Redis, Kafka). Each service has a dedicated role:
| Service | Port | What it does |
|---|---|---|
| flag-api | 8081 | REST CRUD for flags, environments, rollouts, approvals, audit log, tombstoning, kill switches, prerequisites, variations, and scheduled changes |
| gateway | 8080 | Streams real-time flag updates to SDKs via Server-Sent Events (SSE); backed by Redis Streams consumer groups |
| evaluator | 8082 | Computes blast radius (BLOCKED/HIGH/MEDIUM/LOW), enforces circuit breakers (auto-rollback at 5% error rate over 100 requests), and exposes SLO endpoint |
| intelligence | 8083 | Python anomaly detection (3-model ensemble), rollout recommendations (LinUCB contextual bandit), experiment analysis (CUPED + mSPRT), incident correlation, and hybrid NLP flag search |
| gitops-sync | 8084 | Syncs YAML-as-code flag definitions from a git repository into flag-api |
| ast-rewriter | 8085 | Scans codebases for dead flag references and rewrites them via jscodeshift |
| marketplace | 8086 | Integration registry for Slack, Datadog, PagerDuty, OpsGenie, Jira, Linear, and OpenTelemetry |
| dashboard | 3000 | React 19 management UI — the primary human interface for everything above |
PostgreSQL (5432), Redis (6379), and Kafka (9092) are also running as shared infrastructure.
Navigate to http://localhost:3000.
- Click New Flag (top-right button or use
Cmd+Kand type "new flag"). - Fill in the form:
- Key:
my-first-flag(lowercase, hyphens only — this is permanent) - Name:
My First Flag - Description:
Testing Tombstone for the first time - Type:
BOOLEAN
- Key:
- Click Create Flag.
- On the flag detail page, select the development environment tab.
- Toggle the flag to Enabled.
- Set Rollout Percentage to
100%. - Click Save Changes.
The change is immediately visible in the audit log and streamed to any connected SDKs.
All examples below use the local flag-api at http://localhost:8081 with the development SDK token.
Default dev token: sdk-dev-token-change-in-prod
import { TombstoneClient } from "@tombstone/core";
const client = new TombstoneClient({
apiUrl: "http://localhost:8081",
sdkToken: "sdk-dev-token-change-in-prod",
environment: "development",
});
await client.initialize();
const enabled = await client.getBooleanValue("my-first-flag", false);
console.log("my-first-flag:", enabled); // trueimport httpx
response = httpx.get(
"http://localhost:8081/api/v1/flags/my-first-flag/evaluate",
headers={"Authorization": "Bearer sdk-dev-token-change-in-prod"},
params={"environment": "development"},
)
result = response.json()
print("my-first-flag:", result["value"]) # Trueimport { TombstoneProvider, useFlag } from "@tombstone/react";
function App() {
return (
<TombstoneProvider
apiUrl="http://localhost:8081"
sdkToken="sdk-dev-token-change-in-prod"
environment="development"
>
<MyFeature />
</TombstoneProvider>
);
}
function MyFeature() {
const enabled = useFlag("my-first-flag", false);
return enabled ? <NewCheckout /> : <OldCheckout />;
}| View | Path | What it shows |
|---|---|---|
| Flags | /flags |
Full flag list with search, filters by environment/type/status, and bulk actions |
| Flag Detail | /flags/:key |
Per-environment rollout controls, variations, prerequisites, scheduled changes, and circuit breaker status |
| Audit Log | /audit |
Append-only Merkle-linked history of every flag change — who changed what, when, and from which value |
| Blast Radius | /blast-radius |
Real-time risk scores (BLOCKED/HIGH/MEDIUM/LOW) for all active flags, with dependency graph |
| Experiments | /experiments |
A/B test results with CUPED variance reduction and mSPRT sequential testing |
| Incidents | /incidents |
Causal incident correlation — shows which flags changed near production anomalies |
| Approvals | /approvals |
Change requests pending four-eyes sign-off |
| Tombstones | /tombstones |
Permanently archived flag keys (Knight Capital prevention) |
| Marketplace | /marketplace |
Configure integrations: Slack alerts, Datadog metrics, PagerDuty incidents |
| Settings | /settings |
Environments, SDK tokens, team members, OPA RBAC policies |
Use Cmd+K (or Ctrl+K on Windows/Linux) to open the command palette from any view.
- Create a flag (e.g.,
checkout-v2, type BOOLEAN). - Enable it in production with rollout at 0% — flag is live but serving no users.
- After deployment, raise rollout to 10%. Monitor your dashboards for 30 minutes.
- If metrics are clean, raise to 50%. Wait another monitoring window.
- Raise to 100% when confident.
- Once 100% has been stable for 7+ days, archive the flag via the Tombstone action to keep the codebase clean.
A kill switch is a flag you enable to disable a feature — the canonical "big red button."
- Create a flag (e.g.,
disable-new-payment-flow, type BOOLEAN). Leave it disabled by default. - In an incident, navigate to the flag detail page and toggle Enabled in production.
- Set rollout to 100%. The SDK streams the update within milliseconds.
- Monitor the incident. When resolved, toggle back to Disabled.
The evaluator's circuit breaker can also trigger this automatically: if error rate exceeds 5% over 100 requests, the flag is auto-rolled back and an incident signal is written.
For production changes that require a second human:
- On a flag's detail page, click Request Change instead of saving directly.
- Fill in the change description and expected impact.
- A change request appears in Approvals (
/approvals). - A second team member with the
approverrole opens the change request and clicks Approve. - The change is applied automatically after approval.
Approvals are enforced by OPA policy (services/flag-api/policies/flags.rego). The policy can be tuned without a service restart.
For on-call scenarios where the approval workflow would take too long:
- Navigate to Settings > SDK Tokens.
- Click Create Break-Glass Token.
- Set scope (environment + flag keys or
*), expiry (e.g., 4 hours), and an incident reference. - Copy the token — it is shown once.
- Use the token in any SDK or direct API call to bypass normal approval gates.
- The token and all actions taken with it are recorded in the audit log.
# Check which services are up and their ports
scripts/dev-local.sh status
# Tail logs for a specific service
scripts/dev-local.sh logs flag-api
scripts/dev-local.sh logs gateway
scripts/dev-local.sh logs intelligence
# Stop the full stack
make down
# Restart from scratch (clears volumes)
make down && make dev# List all flags
curl -H "Authorization: Bearer sdk-dev-token-change-in-prod" \
http://localhost:8081/api/v1/flags
# Evaluate a flag
curl -H "Authorization: Bearer sdk-dev-token-change-in-prod" \
"http://localhost:8081/api/v1/flags/my-first-flag/evaluate?environment=development"
# Check evaluator blast radius
curl http://localhost:8082/api/v1/blast-radius/my-first-flag| Shortcut | Action |
|---|---|
Cmd+K |
Open command palette |
Cmd+K then type flag key |
Jump to flag detail |
Cmd+K then "new flag" |
Open create flag form |
- GLOSSARY.md — definitions for every term used in Tombstone (Blast Radius, Circuit Breaker, Tombstoning, etc.)
- Architecture deep-dive — read
ARCHITECTURE.mdin the repo root for the full causal graph model and service interaction patterns - SDK reference —
packages/sdks/@tombstone/core/README.mdfor the full TypeScript SDK API includingTombstoneTestClientfor deterministic tests - Production setup —
infra/for Helm charts and Terraform modules when you are ready to deploy beyond local dev