SDK Overview
ShipOS ships two packages. Both evaluate at the edge, both take a default on every call, and both hand it back on any failure, so a flag check never throws and never blocks your request path.
The two packages
@shipos/sdk
JavaScript / TypeScript for Node and the browser. Zero dependencies, never throws, works offline. Use it in backends, route handlers, and vanilla clients.
JS / TS docs@shipos/react
Hooks built on @shipos/sdk. SSR-safe, live-updating, no hydration mismatch. Use it in React components.
React docsKeys and evaluation
Both packages use SDK keys (sos_sdk_*), which are publishable. Create them in the dashboard under Keys - the full key is shown once and cannot be retrieved again over the API. Evaluation happens at the edge (edge.shipos.app), and every call takes a default that's returned on any failure.
Which one do I want?
One line, always safe
Whichever package you use, the flag check is a single expression with a default baked in:
import { createClient } from "@shipos/sdk";
const shipos = createClient({ key: "sos_sdk_..." });
const newCheckout = await shipos.flag("checkout-v2", {
userId: "u_42",
default: false,
});