Docsllms.txt
Everything a failure can tell you.
Every page here is also served as plain markdown at the same URL with a .md suffix, and /llms.txt indexes all of them. Building with an agent? Run claude mcp add --transport http splitch https://mcp.splitch.dev and it gets this material plus the tools to act on it.
Flags
- FlagsPer-Environment Configuration: enabled, rollout, availableVariantNames, and Targeting Rules.
CLI
- CLIInstall, authenticate, automatically select project scope with splitch.json, and read every command: --json on any command, --confirm on Policy-gated changes, and stable exit codes.
Code agents
- Implement with a code agentHow to turn a Control Panel Flag, Metric, Experiment Run, or integration handoff into verified consumer code without corrupting Exposure or Metric Event data.
Integrations
One guide per runtime, each from npm install to a first resolving Flag.
- Node.jsEvaluate on the request path from a Node server, with one client for the process.
- Browser clientFetch once, read Flags synchronously, and fire Exposures on first use.
- React bindingsProvide one initialized browser client and subscribe each hook to one Flag.
- ConvexLocal Flag evaluation inside Queries and Mutations, with transactional Exposures.
- Cloudflare WorkersDeploy an integration Worker into your own account and evaluate over a service binding.
- SentryFeed both halves of Sentry's suspect-flag detection: change tracking and evaluations.
SDK
The contract every integration shares.
- InstallAdd @splitch/sdk, read the export surface, and get one Flag resolving.
- CredentialsClient Key evaluates, API Key peeks. Pass exactly one.
- The six methodsWhich calls fire an Exposure, and which credential each needs.
- evaluateAll and bootstrapResolve every Flag once, then hydrate a browser client without another fetch.
- idempotencyKeyThe SDK generates a key per call. Supply one when your application manages retries.
- Failure behaviorServer evaluation never throws on a platform failure and never hides one. Empty or non-string explicit idempotency keys throw, as does UUID generation when the runtime cannot provide it. Peek throws, and so does a browser read before init().
- Exposure dedupRepeat evaluations replay locally. Run boundaries do not.
- Optionsendpoint, timeoutMs, retries, logger, transport, onResolution.
Errors
- Error codesAll 104 codes the API, SDK, and CLI can emit, each with its cause and a page carrying its fix.
splitch