TL;DR
Tusk Drift is an open-source CLI and SDK system that records production API traffic and replays it as deterministic tests locally or via Tusk Drift Cloud. It supports Node.js and Python SDKs, provides sandboxed replay with mock outbound I/O, and integrates with CI/CD for regression classification.
What happened
A project called Tusk Drift provides a record-and-replay framework for API testing that uses real production traffic to produce realistic test suites. The offering includes a command-line interface that coordinates local test runs, CI workflows, and communication with an accompanying Cloud service. SDKs are available for Node.js and Python, with additional languages planned. Key features include deterministic outbound I/O through a local mock server, JSON response comparison with dynamic rules for common changing fields (UUIDs, timestamps, dates), and sandboxing for safe replays on Linux systems (bubblewrap and socat required). The CLI offers an AI-powered setup option that uses an agent (requiring an ANTHROPIC_API_KEY) to instrument a codebase automatically, plus an interactive init flow for manual configuration. Traces and results are stored under a .tusk directory by default, and the tool supports running tests from local traces or from Tusk Drift Cloud storage.
Why it matters
- Uses real production traffic to create tests, increasing the fidelity of API regression checks compared with hand-written cases.
- Deterministic outbound I/O and field-aware JSON comparisons reduce flakiness from external calls and transient data like timestamps.
- Integration points for CI/CD and a cloud-backed test store aim to surface and classify regressions across pull requests, which can speed debugging.
- Sandboxing options for replay help limit risk when running recorded traffic against services during testing.
Key facts
- Tusk Drift is distributed as a CLI that works with a Tusk Drift SDK and an optional Tusk Drift Cloud backend.
- SDK support currently listed for Node.js and Python; repository notes additional SDKs are planned.
- Replay features include deterministic outbound I/O via a local mock server and JSON response comparison with dynamic rules for UUIDs, timestamps, dates, etc.
- Linux/macOS installers are available via a curl install script; the project also provides pre-built binaries and instructions to build from source (Go 1.25+ required).
- Linux sandboxing prerequisites: bubblewrap and socat; without them, sandboxing is disabled and replays run without network isolation.
- Windows users are advised to use WSL for the best experience; native Windows installation steps are referenced but not detailed in the source.
- The CLI supports an AI-powered setup that requires an ANTHROPIC_API_KEY to analyze and instrument a codebase automatically.
- Default local storage locations: .tusk/traces for recordings, .tusk/results for results, and .tusk/logs for service logs when enabled; these directories are recommended for .gitignore.
- Tusk Drift Cloud can automatically record live traffic, store traces as test suites, and analyze deviations with classification and suggested fixes.
What to watch next
- Expansion of SDK language support beyond Node.js and Python — the repo indicates more SDKs are planned but does not list specifics.
- Homebrew distribution is marked 'coming soon' in the project documentation and could simplify macOS installs.
- Windows native installation details exist but are not fully described; current recommendation is to use WSL for the best experience.
- Broader adoption, enterprise integrations, and performance at scale: not confirmed in the source
Quick glossary
- Record-and-replay testing: A testing approach that captures real traffic or interactions and replays them against a system to reproduce behavior and detect regressions.
- Trace: A recorded sequence of requests and responses representing actual service traffic, used as input for replay-based tests.
- Sandboxing: Isolation techniques that restrict a process's access to system resources or the network to reduce risk when running untrusted code or reproductions.
- Deterministic outbound I/O: Controlling or mocking external network calls so replayed tests produce consistent, repeatable results independently of outside services.
- CI/CD: Continuous integration and continuous delivery/deployment practices that automate building, testing, and releasing software changes.
Reader FAQ
Which programming languages does Tusk Drift support?
The source lists SDKs for Node.js and Python; additional SDKs are indicated as planned.
How do I install Tusk Drift?
For Linux/macOS the project provides a curl-based install script; pre-built binaries and build-from-source instructions (Go 1.25+) are also available. Bubblewrap and socat are required for sandboxing on Linux.
Is the cloud service required to use Tusk Drift?
No. The CLI can run replays from local traces by default; Tusk Drift Cloud is an optional backend for storing traces and adding deviation analysis.
What is the license for Tusk Drift?
The repository contains a LICENSE file, but the specific license type is not confirmed in the source.
Tusk Drift is an API test record/replay system that lets you run realistic tests generated from real traffic. This CLI orchestrates local and CI test runs, coordinating with a Tusk…
Sources
- Show HN: Tusk Drift – Turn production traffic into API tests
- Tusk Drift – Automated API Testing From Live Traffic
- Tusk Drift – Open-source tool for automating API tests
- Tusk Drift Cloud
Related posts
- Paper and code show Hessian inversion for tall‑skinny neural nets
- Aviator (YC S21) hires in San Francisco to expand AI-driven dev tools
- Tabstack: Mozilla-backed browser infrastructure API for AI agents