Show HN:Tusk Drift – 將生產流量轉化為 API 測試
Tusk Drift 是一個在 Hacker News 上發布的新 CLI 工具,它能讓開發者記錄生產環境的即時流量軌跡,並將其重播為真實的 API 測試。該工具旨在透過利用實際使用者互動來改善測試。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
Record traces from your live traffic and replay them as API tests
License
Uh oh!
There was an error while loading. Please reload this page.
Use-Tusk/tusk-drift-cli
Folders and files
Latest commit
History
Repository files navigation

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 Drift SDK and Tusk Drift Cloud.
SDKs:
Features

Try it on a demo repo →
Install
Quick install (recommended)
Linux/macOS:
Install the latest version:
To install a specific version:
Linux additional dependencies (for replay sandboxing):
Without these, sandboxing is disabled and replays run without network isolation. See Architecture - Sandboxing.
Homebrew:
Coming soon.
Windows:
We recommend using WSL for the best experience on Windows. With WSL, you can use the Linux/macOS installation steps above and avoid Windows-specific configuration. For native Windows installation without WSL, expand below to see the steps.
Download tusk-drift-cli_*_Windows_x86_64.zip (or arm64 for ARM-based Windows)
Extract the ZIP file
Move tusk.exe to a directory in your PATH (e.g., C:\tools), or add the extracted directory to your PATH:
Option A: Add to PATH via PowerShell (run as Administrator):
Option B: Add to PATH via System Settings:
Restart your terminal and verify:
Note: Windows requires additional configuration for running tests. See Windows Support for details on TCP communication mode setup.
Manual Download
Download pre-built binaries from GitHub Releases.
Build from source
Quick start
AI-powered setup (recommended)
Use our AI agent to automatically set up Tusk Drift for your service:
The agent will analyze your codebase, instrument the SDK, create configuration files, and test the setup with recording and replay. Supported languages: Python and Node.js.
Manual setup
Alternatively, use the interactive wizard:
This will guide you to create your .tusk/config.yaml config file. You can also create the .tusk directory and config file manually. See configuration docs.
You will need to record traces for your service. See your respective SDK's guide for more details. Once you have traces recorded, you can replay them with the tusk run command.
Local traces (default):
✨ Tusk Drift Cloud


You can use Tusk Drift as API tests in your CI/CD pipeline by running your test suite against commits in your pull requests. Tusk Drift Cloud offers storage of these tests alongside an additional layer of intelligence on deviations detected:
If you used tusk setup, cloud configuration is included. Otherwise, run the cloud onboarding wizard:
For more details, dive into Tusk Drift Cloud docs.
Usage
List traces:
Interactive TUI (default when attached to a terminal):
The TUI is best viewed in a window size of at least 150 x 40.
Run headless mode with JSON output for a single test:
How this program uses your .tusk directory:
We recommend adding to your .gitignore:
Resources
Community
Join our open source community on Slack.
Development
See CONTRIBUTING.md.
License
See LICENSE.
About
Record traces from your live traffic and replay them as API tests
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
41
Uh oh!
There was an error while loading. Please reload this page.
Contributors
6
Languages
Footer
Footer navigation
相關文章