For most stacks (Python, Go, Rails, PHP, bash) the curl example is the
SDK: one HTTP call, done. See the Quickstart. SDKs
exist only where the runtime actively fights the simple path. There is one
per execution model, and each solves a specific way the naive
fire-and-forget fetch gets dropped.
| Package | Runtime | The problem it solves |
|---|---|---|
@datagauge/edge | Serverless & edge (Workers, Vercel, Deno, Lambda) | The runtime freezes the instant your response returns. |
@datagauge/convex | Convex | Mutations can't fetch(). |
@datagauge/client | Client & offline (Expo, Electron, PWAs) | Devices go offline and apps get killed mid-session. |
@datagauge/node | Short-lived CLIs, cron jobs, scripts | The process exits before any background batcher fires. |
Installing
npm install @datagauge/<runtime> # edge | convex | client | nodeOr skip the dependency entirely: every SDK is a single dependency-free TypeScript file, and vendoring it is a supported install, not a workaround.
# pick your runtime: edge | convex | client | node
curl -o lib/datagauge.ts \
https://raw.githubusercontent.com/raymond-UI/datagauge/main/sdks/edge/index.tsA note on keys
Server SDKs (edge, convex, node) send with an sk_live_ key and can
write payments and subscriptions. The client SDK is built to ship inside
binaries, so it uses a public pk_live_ key that can never write
money; see Keys & scoping. Every prefix has an
sk_test_ / pk_test_ twin that writes to an isolated test environment;
swap the prefix to rehearse before going live.