Clivly docs that match the product you ship today
Install the CLI, scaffold your routes, and connect your database to Clivly. Every step below is its own page, so you can deep-link straight to the one you need.
Lead with `clivly@next`, not the older stable line.
Added `create-clivly`, `connect()`, `doctor()`, and `cursorStore` guidance.
Separated framework recipes from widget and auth setup.
Kept better-auth, remote sync, and serverless guidance current.
01
Scaffold and pair
`npx clivly init` scaffolds the config and routes; `npx clivly login` pairs the app with your org.
02
Set the two keys
Keep `CLIVLY_SECRET_KEY` server-side. `CLIVLY_PUBLISHABLE_KEY` is the only one safe in the browser.
03
Pick the right entry point
Define the SDK once, then choose `connect()`, `start()`, or `runScheduled()` based on the runtime.
04
Verify and harden
Validate with `npx clivly status` or `doctor`, then persist cursors if the host is serverless.
Clivly never connects to your database. The SDK runs inside your app, and it is the only thing that touches your data.
Data only ever moves outward: the SDK reads your tables and pushes rows to Clivly. That direction needs no route at all.
Control moves inward, so it needs an address. Clivly Cloud posts to your tick route to start a sync — on serverless there is no long-lived process to hold a timer, so the cloud is the clock.
The chat widget adds a second inbound route, because a browser needs a short-lived session token minted by something that trusts your app.
Browse by task
Each section now has its own route so support, onboarding, and deep links can point to the exact step a developer needs.
- `npm install clivly`
- `connect()`
- `start()` vs `runScheduled()`
- `init`
- `status`
- `doctor`
- `CLIVLY_SECRET_KEY`
- `CLIVLY_PUBLISHABLE_KEY`
- Trigger secret
- Next.js
- TanStack Start
- Remix + Nuxt
- Session bootstrap
- React embed
- Script tag
- Clerk
- WorkOS
- better-auth
- `create-clivly`
- `clivly/sdk`
- `@clivly/chat-widget`
- Stable
- Beta
- Internal
- Version drift
- Serverless runtime
- Cursor persistence
Current public package surface
This table now reflects the packages and responsibilities visible in the repository today.