JavaScript / TypeScript packages
There is no published @nebutra/sdk — the packages you import are the ones already in your scaffolded project.
There is no @nebutra/sdk
Nebutra-Sailor is not a hosted API with a client SDK — create-sailor gives you the whole backend
as code in your own repo. There's nothing to install that isn't already there, and no API key to
initialize a client with.
What you import instead are the @nebutra/* workspace packages the scaffold ships, directly, from
your own app code:
| Package | For |
|---|---|
@nebutra/auth | Better Auth server instance, signServiceToken / verifyServiceToken for internal calls |
better-auth/react (createAuthClient) | Session state on the client — see the React Quickstart |
@nebutra/permissions / @nebutra/permissions/react | Can, usePermission, requirePermission — RBAC/ABAC |
@nebutra/tenant | getCurrentTenant, withRls — tenant context and row-level security |
@nebutra/billing | Checkout, entitlements (checkEntitlement, FEATURES), usage metering |
@nebutra/db | getSystemDb() / getTenantDb(tenantId) — the Prisma client |
@nebutra/logger | Structured logging |
import { getTenantDb } from "@nebutra/db";
import { getCurrentTenant } from "@nebutra/tenant";
import { checkEntitlement } from "@nebutra/billing";
const tenant = getCurrentTenant();
const db = getTenantDb(tenant.id);Calling the gateway from outside the monorepo
If a separate service needs to call your project's backends/gateway REST API over HTTP, there is
no client library for that either — call it directly and authenticate with the shared
SERVICE_SECRET (see Node.js Quickstart) or forward the caller's Better Auth
session. The gateway documents itself via OpenAPI at /docs and /openapi.json.
Related
How is this guide?
Last updated on