MCPcopy Index your code
hub / github.com/Use-Tusk/drift-node-sdk

github.com/Use-Tusk/drift-node-sdk @v0.1.45

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.45 ↗ · + Follow
1,562 symbols 5,152 edges 295 files 253 documented · 16% updated 2mo agov0.1.45 · 2026-05-07★ 172
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Tusk Drift Banner

npm version License: Apache 2.0 GitHub last commit Tusk X account Tusk Community Slack

The Node.js Tusk Drift SDK enables fast and deterministic API testing by capturing and replaying API calls made to/from your service. Automatically record real-world API calls, then replay them as tests using the Tusk CLI to find regressions. During replay, all outbound requests are intercepted with recorded data to ensure consistent behavior without side-effects.

Demo

Try it on a demo repo →

Documentation

For comprehensive guides and API reference, visit our full documentation.

SDK Guides

Tusk Drift Animated Diagram Tusk Drift Animated Diagram

Requirements

Tusk Drift currently supports the following packages and versions:

  • HTTP/HTTPS: All versions (Node.js built-in)
  • GRPC: @grpc/grpc-js@1.x (Outbound requests only)
  • PG: pg@8.x, pg-pool@2.x-3.x
  • Firestore: @google-cloud/firestore@7.x-8.x
  • Postgres: postgres@3.x
  • MySQL: mysql2@3.x, mysql@2.x
  • MongoDB: mongodb@4.x-7.x
  • Redis: redis@4.x-5.x (@redis/client@1.x,5.x)
  • IORedis: ioredis@4.x-5.x
  • Upstash Redis: @upstash/redis@1.x
  • GraphQL: graphql@15.x-16.x
  • Prisma: prisma@5.x-6.x
  • JSON Web Tokens: jsonwebtoken@5.x-9.x
  • JWKS RSA: jwks-rsa@1.x-3.x

If you're using packages or versions not listed above, please create an issue with the package + version you'd like an instrumentation for.

Installation

Step 1: Install the CLI

First, install and configure the Tusk Drift CLI by following our CLI installation guide. The CLI helps set up your Tusk configuration file and replays tests.

The wizard will eventually direct you back here when it's time to set up the SDK.

Step 2: Install the SDK

After completing the CLI wizard, install the SDK:

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

Step 3: Initialize the SDK for your service

Refer to our initialization guide to set up the SDK for your service.

Step 4: Run Your First Test

Follow along our quick start guide to record and replay your first test!

Troubleshooting

Having issues?

Community

Join our open source community on Slack.

Contributing

We appreciate feedback and contributions. See CONTRIBUTING.md.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 877
Function 350
Interface 176
Class 152
Enum 7

Languages

TypeScript100%

Modules by API surface

src/instrumentation/libraries/mongodb/mocks/FakeCursor.ts62 symbols
src/instrumentation/libraries/mongodb/Instrumentation.ts61 symbols
src/core/TuskDrift.ts53 symbols
src/instrumentation/libraries/postgres/Instrumentation.ts51 symbols
src/instrumentation/libraries/mysql2/Instrumentation.ts51 symbols
src/instrumentation/libraries/mysql/Instrumentation.ts44 symbols
src/instrumentation/libraries/redis/Instrumentation.ts29 symbols
src/instrumentation/libraries/http/mocks/TdMockClientRequest.ts25 symbols
src/instrumentation/libraries/http/HttpTransformEngine.ts25 symbols
src/instrumentation/libraries/prisma/Instrumentation.ts24 symbols
src/instrumentation/libraries/mongodb/utils/bsonConversion.ts24 symbols
src/instrumentation/libraries/grpc/Instrumentation.ts24 symbols

Datastores touched

AuthorCollection · 1 repos
PostCollection · 1 repos
(mysql)Database · 1 repos
(mongodb)Database · 1 repos
testdbDatabase · 1 repos
dbDatabase · 1 repos
test_dbDatabase · 1 repos

For agents

$ claude mcp add drift-node-sdk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page