CLI Command Reference
The drift command provides access to the verifier, plugin manager, and version control.
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 |
|---|---|---|
--server-url | -u | Required. The base URL of the server to test. |
--test-files | -f | Required. Paths to one or more yaml files. |
--operation | Validate a single operation (or comma-separated list) by ID. | |
--failed | Only re-run operations that failed in the previous execution. | |
--tags | -t | Filter operations by tags. Use ! to exclude (e.g., !slow). |
--output-dir | -o | Where to write results. Defaults to the test file directory. |
--generate-result | Generate a result bundle file after the run. | |
--generate-fix-prompt | 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 |
|---|---|
drift auth login | Authenticate interactively. Prompts for your workspace URL and API token, then caches a session token valid for 7 days. |
drift auth logout | 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.