@lucenthq/sdk.
It ships both ESM and CommonJS builds and has a single runtime dependency on
rrweb. React bindings are exposed under
@lucenthq/sdk/react and are only loaded if you import them.
Recommended: the CLI installer
The fastest way to install Lucent is the framework‑aware CLI. It picks the right provider shape, env var name, and entry file for your framework and wires everything up in one shot.Requirements
- A modern browser environment (evergreen Chrome, Safari, Firefox, Edge).
- A Lucent public key — see the Quickstart for how to create one.
- React 18 or 19 if you plan to use the React bindings (optional peer dependency).
Manual install
Entry points
The package exposes two entry points:| Import | Use when |
|---|---|
@lucenthq/sdk | You’re using vanilla JavaScript/TypeScript, or you want direct access to LucentTracker. |
@lucenthq/sdk/react | You’re building with React or Next.js and want the provider/hook API. |
Both entry points resolve to the same underlying tracker. Importing the React
entry does not pull in React unless React is already in your bundle — it
declares React as an optional peer dependency.
Minimal example
- Vanilla JS
- React
Next steps
- CLI installer —
npx @lucenthq/cli initfor every supported framework. - Framework pages — step‑by‑step manual setup per framework.
- React integration — provider, identify, and hook APIs.
- Configuration — full options reference.