> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usetusk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Get started with Tusk Drift today in three steps

<Tip>If you would like to avoid setting up Tusk Drift manually, use our [Setup Agent](/api-tests/setup-agent) to automatically perform the steps in this doc and the Initialization docs.</Tip>

## 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
  * [Node SDK](https://github.com/Use-Tusk/drift-node-sdk?tab=readme-ov-file#requirements)
  * [Python SDK](https://github.com/Use-Tusk/drift-python-sdk?tab=readme-ov-file#requirements)
* Dev/staging environment for initial rollout (recommended)

## Setup

### 1. Install the Tusk CLI

<Tabs>
  <Tab title="Linux/macOS">
    ```bash theme={null}
    curl -fsSL https://cli.usetusk.ai/install.sh | sh
    ```
  </Tab>

  <Tab title="Windows">
    Download the latest release from [GitHub Releases](https://github.com/Use-Tusk/tusk-cli/releases/latest):

    1. Download `tusk-cli_*_Windows_x86_64.zip`
    2. Extract the ZIP file
    3. Move `tusk.exe` to a directory in your PATH, or add the extracted directory to your PATH
  </Tab>
</Tabs>

### 2. Create the Tusk Drift config

Run `tusk drift init` in CLI to create your `.tusk/config.yaml` in the root of your service:

```bash theme={null}
cd <path/to/your/service>
tusk drift init
```

<Info>"Service" here usually refers to where your `package.json` lives.</Info>

You can also manually create the `.tusk` directory and config file if you'd prefer. See the [configuration doc](https://github.com/Use-Tusk/tusk-cli/blob/main/docs/drift/configuration.md) for details.

### 3. Install and initialize SDK

#### Node.js

<Tabs>
  <Tab title="npm">
    ```bash theme={null}
    npm install @use-tusk/drift-node-sdk
    ```
  </Tab>

  <Tab title="yarn">
    ```bash theme={null}
    yarn install @use-tusk/drift-node-sdk
    ```
  </Tab>
</Tabs>

#### Python

```bash theme={null}
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).

* [CommonJS Applications](/api-tests/initialization/commonjs)
  * If you use TypeScript, your application is likely compiled to CommonJS before running, follow these CommonJS instructions.
* [ESM Applications](/api-tests/initialization/esm)
  * If your application's compiled code uses `import` or you do not compile your code, follow these ESM instructions.
* [Next.js Applications](/api-tests/initialization/nextjs)
* [Python Applications](/api-tests/initialization/python)
