Skip to main content
If you would like to avoid setting up Tusk Drift manually, use our Setup Agent to automatically perform the steps in this doc and the Initialization docs.

Prerequisites

  • Node.js or Python backend service (using Python 3.12+) where the SDK will be installed
  • All packages used are present in our list of instrumentations
  • Dev/staging environment for initial rollout (recommended)

Setup

1. Install the Tusk CLI

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

2. Create the Tusk Drift config

Run tusk drift init in CLI to create your .tusk/config.yaml in the root of your service:
cd <path/to/your/service>
tusk drift 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

Node.js

npm install @use-tusk/drift-node-sdk

Python

pip install tusk-drift-python-sdk
Then, follow the below instructions for your type of application to complete initialization. The init file is the same for both CommonJS and ESM — the only difference is how you import it (first import for CJS vs --import flag for ESM).