Skip to main content

Prerequisites

  • Node.js backend service where the SDK will be installed
  • All packages used are present in the “Supported technologies” list below
  • Dev/staging environment for initial rollout (recommended)

Supported technologies

View the complete list of supported packages and versions in our public repo.

Setup

1. Install the Tusk CLI

curl -fsSL https://cli.usetusk.ai/install.sh | sh

2. Create the Tusk Drift config

Run tusk init in CLI to create your .tusk/config.yaml in the root of your service:
cd <path/to/your/service>
tusk init
“Service” here usually refers to where your package.json lives.
You can also manually create the .tusk directory and config file if you’d prefer. See the configuration doc for details.

3. Install and initialize SDK

npm install @use-tusk/drift-node-sdk
Then, follow the below instructions for your type of application to complete initialization.
  • CommonJS Applications
    • If you use TypeScript, your application is likely compiled to CommonJS before running, follow these CommonJS instructions.
  • ESM Applications
    • If your application’s compiled code uses import or you do not compile your code, follow these ESM instructions.
  • Next.js Applications