CLI Command Reference
The drift command provides access to the verifier, component manager, authentication, 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 (deprecated)
Use drift component instead. drift plugins still works but prints a deprecation notice and will be removed in a future release
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.
drift component
Lists, installs, updates, and removes the components in your Drift installation.
Subcommand | Description |
|---|---|
| List installed components. Add |
| Show details for one component. Add |
| Install one or more optional components from the current release. |
| Install a component from a URL. Use |
| Update the installation to the latest release. |
| Remove a component. Core components require |
Option | Applies to | Description |
|---|---|---|
| list | Include components that are not installed. |
| list | Filter by |
| list | Filter by |
| list | Print output as JSON. |
| list, info | Do not contact the release server. |
| install, update | Use a specific release instead of the latest. |
| update | Show what would change without making changes. |
| install | Expected checksum for |
| install, update, remove | Answer yes to all prompts. |
| install, update, remove | Skip safety checks, such as removing a core component or installing without a checksum. |
| All | Plugin directory. Overrides |
| All | Drift installation directory. Also set by |