Skip to main content
darkship docs
Open console

Documentation · v1

Ship it dark. Turn it on when you're sure.

Evaluate typed feature flags in-process, roll them out by stable percentage, and keep serving even when we're down. Pick the path that matches what you need to do right now.

TypeScriptcheckout.ts
const ds = init({ sdkKey });
await ds.waitForReady();

// local and in-memory: no network call
const on = ds.boolVariation(
  'new-checkout-flow',
  { key: user.id },
  false, // default
);
< 5sconsole click to SDK, p95 (how)
0network calls per server-side evaluation
6flag types: boolean to schema-validated JSON
0 Bof end-user context stored, ever (telemetry)

Choose your path#

I want to see it work

Quickstart#

Install an SDK, create a server key, evaluate a boolean, a string and a JSON flag, then watch the evaluations land in the console.

NodeBrowserPython
Start building I want the mental model

Concepts#

Hybrid evaluation, versioned snapshots, fail-static behaviour, and the exact order in which targeting rules run.

Read the concepts I'm integrating

SDK guides#

JavaScript and TypeScript for Node and the browser, Python, and the OpenFeature provider.

Pick an SDK I'm automating

REST API#

Manage flags, environments, segments and keys under /v1. Try every call from the page.

Open the reference I'm reacting to changes

Webhooks#

Signed, retried, replay-safe events when a flag or key changes. Verify them in a few lines.

Verify a signature

How the pieces fit#

Darkship has two data paths and one control plane. Understanding which one your code uses explains almost every behaviour in these docs.

Server SDK
Holds the environment's full ruleset in memory and evaluates locally. Authenticated with a ds_srv_ key that must never leave your backend.
Client SDK
Sends the context to the evaluation service and receives resolved values only, never rules. Authenticated with a public ds_cli_ key.
REST API
The control plane: create flags, change targeting, rotate keys. Authenticated with a scoped ds_pat_ token.
Webhooks
Outbound, signed notifications from the control plane when something changes.
Not sure which key?

If the code runs on a machine you control, use a server key. If it runs on a device you don't (a browser, a phone), use a client key. The decision table has the details.

Was this helpful?