JavaScript SDK
Typed JavaScript interface for the public Karybase API.
Use the SDK when you want a typed JavaScript interface instead of direct HTTP calls.
npm install @karybase/sdkimport { createKarybaseClient } from "@karybase/sdk";
const karybase = createKarybaseClient({
apiKey: process.env.KARYBASE_API_KEY!,
baseUrl: "https://api.karybase.com",
});The API key provides the organization scope. Do not pass organizationId when creating the client for new integrations.
Module Tabs
Feature flag: inventory
Status: available
SDK model: karybase.inventory
Methods:
karybase.inventory.list(params)karybase.inventory.get(params)
Feature flag: services
Status: planned
SDK model: karybase.services
Feature flag: projects
Status: planned
SDK model: karybase.projects
Feature flag: crm
Status: planned
SDK model: karybase.crm
Feature flag: retail
Status: planned
SDK model: karybase.retail
Feature flag: reservations
Status: planned
SDK model: karybase.reservations
Module Metadata
The SDK exports module metadata using the same feature flag IDs as Karybase access control:
const modules = karybase.modules.list();
const inventory = karybase.inventory.info();
const services = karybase.services.model;Available modules have status: "available". Planned modules have status: "planned" and no callable resource methods yet.
Field Selection
Available methods accept a fields array when the API supports partial model reads.
const item = await karybase.inventory.get({
itemId: "item_123",
fields: ["_id", "name", "quantity"] as const,
});Use as const so TypeScript narrows the result to the selected model fields.
// item is Pick<InventoryItem, "_id" | "name" | "quantity">Sidebar Reference
Each SDK module has separate sidebar pages for:
| Page | Purpose |
|---|---|
| Overview | Module status, feature flag, and available methods |
| Options | Accepted method options and selectors |
| Results | Response shapes, examples, and errors |
| Types | Public TypeScript model contracts |