CLI Command Reference
The drift command provides access to the verifier, plugin manager, and version-checking commands.
Core Commands
drift init
An interactive terminal UI (TUI) that guides you through first-time setup and produces a single running contract test. Run drift init in your project root to get started.
drift init
drift init does not accept command-line options. All configuration is handled interactively within the TUI. When the session ends, it writes a test case YAML file and one or more AI prompt files to your project directory. For a full walkthrough of each step, see the Interactive Onboarding tutorial.
drift verify
The primary command for verifying a provider against your test cases.
Usage:
drift verify --server-url <URL> --test-files <FILES> [OPTIONS]
Key Options
Option | Shortcut | Description |
|---|---|---|
|
| Required. The base URL of the server to test. |
|
| Required. Paths to one or more |
| Validate a single operation (or comma-separated list) by ID. | |
| Only re-run operations that failed in the previous execution. | |
|
| Filter operations by tags. Use |
|
| Where to write results. Defaults to the test file directory. |
| Generate a result bundle file after the run. | |
| Generate an AI prompt file when tests fail to help with debugging. |
drift plugins
Manage and inspect Drift plugins.
drift plugins installed-plugins: List all plugins currently available in your environment.drift plugins default-plugins: List the plugins bundled out-of-the-box.drift plugins info: Display detailed metadata for a specific plugin file.
drift auth
Manages authentication with PactFlow.
Subcommand | Description |
|---|---|
| Authenticate interactively. Prompts for your workspace URL and API token, then caches a session token valid for 7 days. |
| Clear the cached session for the current workspace. |
drift auth status | Show the currently authenticated user and session expiry. |
See Authentication for full details.
drift check-version
Checks the internet for a newer version of the Drift binary.