Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Pact CLI

Test and Release

A consolidated cli consisting of all Pact command line tools

Installation

Supported Platforms

Pre-built binaries are published for the following targets on every release. The install scripts, the GitHub Action and the Docker images all download these same binaries.

OS Architecture Target triple Supported
macOS x86_64 x86_64-apple-darwin ✅
macOS arm64 aarch64-apple-darwin ✅
Linux (glibc) x86_64 x86_64-unknown-linux-gnu ✅
Linux (glibc) arm64 aarch64-unknown-linux-gnu ✅
Linux (musl) x86_64 x86_64-unknown-linux-musl ✅
Linux (musl) arm64 aarch64-unknown-linux-musl ✅
Windows x86_64 x86_64-pc-windows-msvc ✅
Windows arm64 aarch64-pc-windows-msvc 🚧
BSD (via musl) x86_64 x86_64-unknown-linux-musl ✅
BSD (via musl) arm64 aarch64-unknown-linux-musl ✅

🚧 Windows on arm64 is not yet published while upstream ring arm64 Windows support lands.

The pact-python-cli wheel and the @pact-foundation/pact-cli npm package for Windows on arm64 carry the x86_64 binary, which runs under Windows' x64 emulation. Linux with glibc older than 2.34 has no matching wheel, so pip falls back to the Ruby-based pact-python-cli 2.6.4.0; use the shell installer or the musl binary instead.

FreeBSD, OpenBSD and NetBSD have no native target; download the Linux musl binary for your architecture and run it under the host's Linux compatibility layer.

Install

We recommend the installer for your platform — it downloads the pre-built binary for the latest release and adds it to your PATH. These installers are generated and distributed by cargo-dist.

Shell (Unix)

curl --proto '=https' --tlsv1.2 -LsSf \
  https://d.pactflow.io/pact/install.sh | sh

To install a specific version, swap latest/download for download/<VERSION>:

curl --proto '=https' --tlsv1.2 -LsSf \
  https://d.pactflow.io/pact/<VERSION>/install.sh | sh

PowerShell (Windows)

powershell -ExecutionPolicy ByPass -c "irm https://d.pactflow.io/pact/install.ps1 | iex"

To install a specific version:

powershell -ExecutionPolicy ByPass -c "irm https://d.pactflow.io/pact/<VERSION>/install.ps1 | iex"

Python (pip / uv)

The pact-python-cli package ships the same binaries as wheels:

pip install pact-python-cli
# or, to put `pact` on your PATH outside any virtual environment
uv tool install pact-python-cli

pact-python-cli 2.x shipped the Ruby standalone tools; pin pact-python-cli<1!0 to stay on them. The Pact Python migration guide maps each Ruby command to its pact subcommand.

Node (npm)

The @pact-foundation/pact-cli package ships the same binaries as optional platform packages:

npm install --save-dev @pact-foundation/pact-cli
npx pact --help

The package also installs pact-broker, pact-mock-server, pact-stub-server, pact-plugin, pact-verifier and pactflow. These are deprecated: each prints a notice and runs the matching pact <command>, and they will be removed in a future major release.

Versions 17.x and earlier shipped a JavaScript API and the Ruby standalone tools; the pact-js-cli migration guide covers the move to pact.

Standalone executable

Download the latest binary release for your required platform, from the release page.

Cargo

The fastest install from the Cargo ecosystem uses cargo-binstall, which fetches the cargo-dist release binaries where available and falls back to a source build otherwise:

cargo binstall pact
# or a specific version
cargo binstall pact --version <VERSION>

If you do not have cargo-binstall, build and install from source:

cargo install pact --locked

GitHub Action

An action is available at pact-foundation/pact-cli. Pin the version via the action ref:

    - uses: pact-foundation/pact-cli@vX.Y.Z

    - name: Show help commands
      run: |
        pact --help

To always use the latest release, reference @main (not recommended for production workflows).

Docker

We publish both Alpine and Debian images, with tags of the form:

  • <version>
  • <version>-alpine
  • <version>-debian

To always pull the latest version, replace <version> with latest.

Our images are hosted on both DockerHub and GitHub Container Registry:

Commands

All commands

Show help
$ pact --help

**Pact** is the de-facto API contract testing tool. Replace expensive and brittle end-to-end integration tests with fast, reliable and easy to debug unit tests.

Check out https://docs.pact.io

- ⚡ Lightning fast
- 🎈 Effortless full-stack integration testing - from the front-end to the back-end
- 🔌 Supports HTTP/REST and event-driven systems
- 🛠️  Configurable mock server
- 😌 Powerful matching rules prevents brittle tests
- 🤝 Integrates with Pact Broker / PactFlow for powerful CI/CD workflows
- 🔡 Supports 12+ languages

**Why use Pact?**

Contract testing with Pact lets you:

- ⚡ Test locally
- 🚀 Deploy faster
- ⬇️  Reduce the lead time for change
- 💰 Reduce the cost of API integration testing
- 💥 Prevent breaking changes
- 🔎 Understand your system usage
- 📃 Document your APIs for free
- 🗄  Remove the need for complex data fixtures
- 🤷 Reduce the reliance on complex test environments
        

Usage: pact [OPTIONS] [COMMAND]

Commands:
  broker       A Rust and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.
  pactflow     PactFlow specific commands
  completions  Generates completion scripts for your shell
  extension    Manage Pact CLI extensions
  plugin       CLI utility for Pact plugins
  mock         Standalone Pact mock server
  verifier     Standalone pact verifier for provider pact verification
  stub         Pact Stub Server 0.7.1
  help         Print this message or the help of the given subcommand(s)

Options:
      --enable-otel
          Enable OpenTelemetry tracing

      --enable-otel-logs
          Enable OpenTelemetry logging

      --enable-otel-traces
          Enable OpenTelemetry traces

      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp)
          
          [env: OTEL_TRACES_EXPORTER=]

      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp)
          
          [env: OTEL_EXPORTER_OTLP_ENDPOINT=]

      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http)
          
          [env: OTEL_EXPORTER_OTLP_PROTOCOL=]
          [default: http]
          [possible values: http, http/protobuf]

      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace)
          
          [default: off]
          [possible values: off, none, error, warn, info, debug, trace]

  -h, --help
          Print help (see a summary with '-h')

broker

Show help
$ pact broker --help
A Rust and CLI client for the Pact Broker. Publish and retrieve pacts and verification results.

Usage: pact broker [OPTIONS] [COMMAND]

Commands:
  publish                       Publishes pacts to the Pact Broker
  list-latest-pact-versions     List the latest pact for each integration
  get-pacts                     Get pacts for a specified provider, optionally filtered by consumer and/or branch
  create-environment            Create an environment resource in the Pact Broker to represent a real world deployment or release environment
  update-environment            Update an environment resource in the Pact Broker
  delete-environment            Delete an environment
  describe-environment          Describe an environment
  list-environments             List environments
  record-deployment             Record deployment of a pacticipant version to an environment
  record-undeployment           Record undeployment of a pacticipant version from an environment
  record-release                Record release of a pacticipant version to an environment.
  record-support-ended          Record the end of support for a pacticipant version in an environment.
  can-i-deploy                  Check if a pacticipant can be deployed.
  can-i-merge                   Checks if the specified pacticipant version is compatible with the configured main branch of each of the pacticipants with which it is integrated.
  create-or-update-pacticipant  Create or update pacticipant by name
  describe-pacticipant          Describe a pacticipant
  list-pacticipants             List pacticipants
  create-webhook                Create a webhook
  create-or-update-webhook      Create or update a webhook
  delete-webhook                Delete a webhook
  test-webhook                  Test a webhook
  delete-branch                 Deletes a pacticipant branch. Does not delete the versions or pacts/verifications associated with the branch, but does make the pacts inaccessible for verification via consumer versions selectors or WIP pacts.
  create-version-tag            Add a tag to a pacticipant version
  delete-version-tag            Delete a tag from a pacticipant version
  describe-version              Describes a pacticipant version. If no version or tag is specified, the latest version is described. Use --environment to query versions deployed/released to specific environments.
  create-or-update-version      Create or update pacticipant version by version number
  generate-uuid                 Generate a UUID for use when calling create-or-update-webhook
  provider-states               Manage provider states
  ruby                          Install & Run the Pact Broker using system Ruby in $HOME/.pact/pact-broker
  docker                        Run the Pact Broker as a Docker container
  help                          Print this message or the help of the given subcommand(s)

Options:
      --enable-otel
          Enable OpenTelemetry tracing
  -o, --output <OUTPUT>
          Value must be one of ["json", "text", "table", "pretty"] [default: text] [possible values: json, text, table, pretty]
      --enable-otel-logs
          Enable OpenTelemetry logging
      --enable-otel-traces
          Enable OpenTelemetry traces
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
  -h, --help
          Print help
  -V, --version
          Print version

pactflow

Show help
$ pact pactflow --help
PactFlow specific commands

Usage: pact pactflow [OPTIONS] [COMMAND]

Commands:
  publish-provider-contract  Publish provider contract to PactFlow
  help                       Print this message or the help of the given subcommand(s)

Options:
      --enable-otel
          Enable OpenTelemetry tracing
      --enable-otel-logs
          Enable OpenTelemetry logging
      --enable-otel-traces
          Enable OpenTelemetry traces
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
  -h, --help
          Print help

plugin

Show help
$ pact plugin --help
CLI utility for Pact plugins

Usage: pact plugin [OPTIONS] <COMMAND>

Commands:
  list        List installed or available plugins
  env         Print out the Pact plugin environment config
  install     Install a plugin
  remove      Remove a plugin
  enable      Enable a plugin version
  disable     Disable a plugin version
  repository  Sub-commands for dealing with a plugin repository
  help        Print this message or the help of the given subcommand(s)

Options:
      --enable-otel
          Enable OpenTelemetry tracing
  -y, --yes
          Automatically answer Yes for all prompts
  -d, --debug
          Enable debug level logs
      --enable-otel-logs
          Enable OpenTelemetry logging
      --enable-otel-traces
          Enable OpenTelemetry traces
  -t, --trace
          Enable trace level logs
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
  -v, --version
          Print CLI version
  -h, --help
          Print help

mock

Show help
$ pact mock --help
Standalone Pact mock server

Usage: pact mock [OPTIONS] [COMMAND]

Commands:
  start            Starts the master mock server
  list             Lists all the running mock servers
  create           Creates a new mock server from a pact file
  verify           Verify the mock server by id or port number, and generate a pact file if all ok
  shutdown         Shutdown the mock server by id or port number, releasing all its resources
  shutdown-master  Performs a graceful shutdown of the master server (displayed when it started)
  help             Print this message or the help of the given subcommand(s)

Options:
      --enable-otel
          Enable OpenTelemetry tracing
      --help
          Print help and exit
      --enable-otel-logs
          Enable OpenTelemetry logging
  -v, --version
          Print version information and exit
      --enable-otel-traces
          Enable OpenTelemetry traces
  -p, --port <port>
          port the master mock server runs on (defaults to 8080)
  -h, --host <host>
          hostname the master mock server runs on (defaults to localhost)
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
  -l, --loglevel <loglevel>
          Log level for mock servers to write to the log file (defaults to info) [possible values: error, warn, info, debug, trace, none]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --no-term-log
          Turns off using terminal ANSI escape codes
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --no-file-log
          Do not log to an output file
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]

verifier

Show help
$ pact verifier --help
Standalone pact verifier for provider pact verification

Usage: pact verifier [OPTIONS]

Options:
      --enable-otel
          Enable OpenTelemetry tracing
      --help
          Print help and exit
      --enable-otel-logs
          Enable OpenTelemetry logging
  -v, --version
          Print version information and exit
      --enable-otel-traces
          Enable OpenTelemetry traces
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]

Logging options:
  -l, --loglevel <loglevel>    Log level to emit log events at (defaults to warn) [possible values: error, warn, info, debug, trace, none]
      --pretty-log             Emits excessively pretty, multi-line logs, optimized for human readability.
      --full-log               This emits human-readable, single-line logs for each event that occurs, with the current span context displayed before the formatted representation of the event.
      --compact-log            Emit logs optimized for short line lengths.
  -j, --json <json-file>       Generate a JSON report of the verification [env: PACT_VERIFIER_JSON_REPORT=]
  -x, --junit <junit-file>     Generate a JUnit XML report of the verification (requires the junit feature) [env: PACT_VERIFIER_JUNIT_REPORT=]
      --html <html-file>       Generate an HTML report of the verification [env: PACT_VERIFIER_HTML_REPORT=]
      --xslt <html-file-xslt>  XSLT to use when generating the HTML report of the verification
      --no-colour              Disables ANSI escape codes in the output [alias: --no-color]

Loading pacts options:
  -f, --file <file>
          Pact file to verify (can be repeated)
  -d, --dir <dir>
          Directory of pact files to verify (can be repeated)
  -u, --url <url>
          URL of pact file to verify (can be repeated)
  -b, --broker-url <broker-url>
          URL of the pact broker to fetch pacts from to verify (requires the provider name parameter) [env: PACT_BROKER_BASE_URL=]
      --webhook-callback-url <webhook-callback-url>
          URL of a Pact to verify via a webhook callback. Requires the broker-url to be set. [env: PACT_WEBHOOK_CALLBACK_URL=]
      --ignore-no-pacts-error
          Do not fail if no pacts are found to verify

Authentication options:
      --user <user>          Username to use when fetching pacts from URLS [env: PACT_BROKER_USERNAME=]
      --password <password>  Password to use when fetching pacts from URLS [env: PACT_BROKER_PASSWORD=]
  -t, --token <token>        Bearer token to use when fetching pacts from URLS [env: PACT_BROKER_TOKEN=]

Provider options:
  -h, --hostname <hostname>
          Provider hostname (defaults to localhost) [env: PACT_PROVIDER_HOSTNAME=]
  -p, --port <port>
          Provider port (defaults to protocol default 80/443) [env: PACT_PROVIDER_PORT=]
      --transport <transport>
          Provider protocol transport to use (http, https, grpc, etc.) [env: PACT_PROVIDER_TRANSPORT=] [default: http]
      --transports <transports>
          Allows multiple protocol transports to be configured (http, https, grpc, etc.) with their associated port numbers separated by a colon. For example, use --transports http:8080 grpc:5555 to configure both.
  -n, --provider-name <provider-name>
          Provider name (defaults to provider) [env: PACT_PROVIDER_NAME=]
      --base-path <base-path>
          Base path to add to all requests [env: PACT_PROVIDER_BASE_PATH=]
      --request-timeout <request-timeout>
          Sets the HTTP request timeout in milliseconds for requests to the target API and for state change requests. [env: PACT_PROVIDER_REQUEST_TIMEOUT=]
  -H, --header <custom-header>
          Add a custom header to be included in the calls to the provider. Values must be in the form KEY=VALUE, where KEY and VALUE contain ASCII characters (32-127) only. Can be repeated.
      --disable-ssl-verification
          Disables validation of SSL certificates

Provider state options:
  -s, --state-change-url <state-change-url>
          URL to post state change requests to [env: PACT_PROVIDER_STATE_CHANGE_URL=]
      --state-change-as-query
          State change request data will be sent as query parameters instead of in the request body [env: PACT_PROVIDER_STATE_CHANGE_AS_QUERY=]
      --state-change-teardown
          State change teardown requests are to be made after each interaction [env: PACT_PROVIDER_STATE_CHANGE_TEARDOWN=]

Filtering interactions:
      --filter-description <filter-description>
          Only validate interactions whose descriptions match this filter (regex format) [env: PACT_DESCRIPTION=]
      --filter-state <filter-state>
          Only validate interactions whose provider states match this filter (regex format) [env: PACT_PROVIDER_STATE=]
      --filter-no-state
          Only validate interactions that have no defined provider state [env: PACT_PROVIDER_NO_STATE=]
  -c, --filter-consumer <filter-consumer>
          Consumer name to filter the pacts to be verified (can be repeated)

Publishing options:
      --publish
          Enables publishing of verification results back to the Pact Broker. Requires the broker-url and provider-version parameters.
      --provider-version <provider-version>
          Provider version that is being verified. This is required when publishing results.
      --build-url <build-url>
          URL of the build to associate with the published verification results.
      --provider-tags <provider-tags>
          Provider tags to use when publishing results. Accepts comma-separated values.
      --provider-branch <provider-branch>
          Provider branch to use when publishing results

Pact Broker options:
      --consumer-version-tags <consumer-version-tags>
          Consumer tags to use when fetching pacts from the Broker. Accepts comma-separated values.
      --consumer-version-selectors <consumer-version-selectors>
          Consumer version selectors to use when fetching pacts from the Broker. Accepts a JSON string as per https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors/. Can be repeated.
      --enable-pending
          Enables Pending Pacts
      --include-wip-pacts-since <include-wip-pacts-since>
          Allow pacts that don't match given consumer selectors (or tags) to  be verified, without causing the overall task to fail. For more information, see https://pact.io/wip
      --retries <N>
          The number of times to retry failed HTTP requests to the Pact Broker (retries on 5xx, 408, and 429). Delays use exponential back-off starting at 500 ms and doubling each attempt (0.5 s, 1 s, 2 s, 4 s, 8 s, …). 429 responses honour the Retry-After header when present. [env: PACT_BROKER_HTTP_RETRIES=] [default: 8]

Development options:
      --exit-on-first-error  Stops the verifier at the first failure
      --last-failed          Only runs the interactions that failed on the previous verifier run. Requires --json-file to have been set

stub

Show help
$ pact stub --help
Pact Stub Server 0.7.1

Usage: pact stub [OPTIONS]

Options:
      --enable-otel
          Enable OpenTelemetry tracing
  -l, --loglevel <loglevel>
          Log level (defaults to info) [default: info] [possible values: error, warn, info, debug, trace, none]
      --enable-otel-logs
          Enable OpenTelemetry logging
  -f, --file <file>
          Pact file to load (can be repeated)
  -d, --dir <dir>
          Directory of pact files to load (can be repeated)
      --enable-otel-traces
          Enable OpenTelemetry traces
  -e, --extension <ext>
          File extension to use when loading from a directory (default is json)
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
  -u, --url <url>
          URL of pact file to fetch (can be repeated)
  -b, --broker-url <broker-url>
          URL of the pact broker to fetch pacts from [env: PACT_BROKER_BASE_URL=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, http) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf]
      --user <user>
          User and password to use when fetching pacts from URLS or Pact Broker in user:password form
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]
  -t, --token <token>
          Bearer token to use when fetching pacts from URLS or Pact Broker
  -p, --port <port>
          Port to run on (defaults to random port assigned by the OS)
  -o, --cors
          Automatically respond to OPTIONS requests and return default CORS headers
      --cors-referer
          Set the CORS Access-Control-Allow-Origin header to the Referer
      --insecure-tls
          Disables TLS certificate validation
  -s, --provider-state <provider-state>
          Provider state regular expression to filter the responses by
      --provider-state-header-name <provider-state-header-name>
          Name of the header parameter containing the provider state to be used in case multiple matching interactions are found
      --empty-provider-state
          Include empty provider states when filtering with --provider-state
      --consumer-name <consumer-name>
          Consumer name or regex to use to filter the Pacts fetched from the Pact broker (can be repeated)
      --provider-name <provider-name>
          Provider name or regex to use to filter the Pacts fetched from the Pact broker (can be repeated)
      --retries <PACT_BROKER_HTTP_RETRIES>
          The number of times to retry failed HTTP requests (retries on 5xx, 408, and 429). Delays use exponential back-off starting at 500 ms and doubling each attempt. [env: PACT_BROKER_HTTP_RETRIES=] [default: 8]
  -w, --watch
          Watch for changes in pact files and reload automatically
  -v, --version
          Print version information
  -h, --help
          Print help

Open Telemetry

The pact cli supports native opentelemetry for traces and application logs.

It is opt-in via --enable-otel, you must set - --enable-otel-traces for traces - --enable-otel-logs for logs - --log-level must be set - --enable-otlp-exporter must be set

By default, --otel-exporter-endpoint will route to http://localhost:4318.

Options:
      --enable-otel
          Enable OpenTelemetry tracing
      --enable-otel-logs
          Enable OpenTelemetry logging
      --enable-otel-traces
          Enable OpenTelemetry traces
      --otel-exporter <otel-exporter>
          The OpenTelemetry exporter(s) to use, comma separated (stdout, otlp) [env: OTEL_TRACES_EXPORTER=]
      --otel-exporter-endpoint <otel-exporter-endpoint>
          The endpoint to use for the OTLP exporter (required if --otel-exporter=otlp) [env: OTEL_EXPORTER_OTLP_ENDPOINT=]
      --otel-exporter-protocol <otel-exporter-protocol>
          The protocol to use for the OTLP exporter (http/protobuf, grpc) [env: OTEL_EXPORTER_OTLP_PROTOCOL=] [default: http] [possible values: http, http/protobuf, grpc]
      --log-level <LEVEL>
          Set the log level (none, off, error, warn, info, debug, trace) [default: off] [possible values: off, none, error, warn, info, debug, trace]

Standard otel environemnt variables are followed

export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"
export OTEL_TRACES_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

Currently instrumented crates are

  • pact-broker-cli
  • pact-cli

Ecosystem

The ecosystem is built up of multiple different crates, each which serve a different purpose.

All active crates are listed below.

Core

pact_models This is a library that provides the Pact models and functions for reading and writing pact files.

pact_matching This is a library that provides the Pact functions for matching requests and responses.

pact_mock_server This is a library that implements the in-process mock server for matching HTTP requests and generating responses from a pact file. It implements the V3 Pact specification and V4 Pact specification

Library Consumers

pact_consumer This is a library that provides the Pact consumer test support and DSL for use in Rust projects.

pact_verifier This library provides support for verifying a provider against pact files.

External Consumers

FFI

pact_ffi This is a library that implements exported functions using C bindings for use in foreign languages.

CLI

pact_mock_server_cli A command line application that provides both a restful web api and command line interface to run pact mock servers and is able to manage multiple mock servers. The lifecycle of each mock server can be controlled by the restful web api or through the command line interface. It implements the V4 Pact specification.

pact_verifier_cli Command line executable that uses the pact_verifier to be able to verify a running provider against pact files.

Plugins

pact-plugin-driver A support library that provides an interface for interacting with Pact plugins

pact-plugin-cli Command line executable to manage and install Pact plugins.

Satellite

pact-stub-server Command line executable that provides a server that can generate responses based on pact files. It implements the V4 Pact specification.

Contributing

See CONTRIBUTING (PRs are always welcome!).

Documentation

Rust crate documentation is published to the Rust documentation site.

Additional documentation can be found at the main Pact website.

Contact

Join us in slack: slack

or

  • Twitter: @pact_up
  • Stack Overflow: stackoverflow.com/questions/tagged/pact

Anonymized analytics

pact-cli uses Scarf to collect anonymized README impression analytics. These analytics help support the maintainers of this project and ONLY run when this README is viewed (a 1x1 pixel served from static.scarf.sh). To opt out, block static.scarf.sh at the network level, or disable image loading in your browser when viewing this README.

For more information, see docs.pact.io/telemetry.

Licensing

The code in this project is licensed under a MIT license. See LICENSE.

Metadata

Release files for pact-python-cli 1!0.10.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Built distributions (wheels)

Table of built distributions (wheels) for pact-python-cli 1!0.10.9
File Actions
pact_python_cli-1!0.10.9-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for pact_python_cli-1!0.10.9-py3-none-win_arm64.whl
pact_python_cli-1!0.10.9-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pact_python_cli-1!0.10.9-py3-none-win_amd64.whl
pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_x86_64.whl
pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details for pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_aarch64.whl
pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_x86_64.whl
pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details for pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_aarch64.whl
pact_python_cli-1!0.10.9-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for pact_python_cli-1!0.10.9-py3-none-macosx_11_0_x86_64.whl
pact_python_cli-1!0.10.9-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pact_python_cli-1!0.10.9-py3-none-macosx_11_0_arm64.whl

Total release size: 76.6 MB

Release files / pact_python_cli-1!0.10.9-py3-none-win_arm64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-win_arm64.whl
Size 8.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
ab5ace8e7fcf331556414565de2732b8c1f17f264937961fa5449c0a8ebdb9ed
BLAKE2b-256 checksum
How to use checksums
7730ce344524fecf35714cc1ac46608c2d9d8448ebc772e2e4c8b63e993837ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-win_amd64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-win_amd64.whl
Size 8.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f97f3d496e96e9b78177998ee5347811f99db19639ceb5465fec2628e91ce806
BLAKE2b-256 checksum
How to use checksums
9381a3c2071a8d4ce497593c257cbe6aa52d08e07a538d52d0ccd0216cd6b79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_x86_64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_x86_64.whl
Size 10.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6b92b9e46ce79e3fdabb3a29ad151f65c4cf484506b4ba15a5decf8af64d868e
BLAKE2b-256 checksum
How to use checksums
ac4458db02f7451b4f75872c0691514723e0d934c2414c4a5fd4818c384c05fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_aarch64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-musllinux_1_2_aarch64.whl
Size 10.6 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
542c3d77fd8a992251f960871054391cb923f508be40b5aa59294a688a82c120
BLAKE2b-256 checksum
How to use checksums
b46c4283927bbb296306a14a8ecc28f8bc0bbae426a3af516faefc7cb7631e2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_x86_64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_x86_64.whl
Size 10.8 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b05b362596a5d8021e5a44672d96d2491b64783840913af8ce604906433cd2ba
BLAKE2b-256 checksum
How to use checksums
36cb2f50e16691e32ead312614f645f7a40079ed1abf14184e742966bf08e1dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_aarch64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-manylinux_2_34_aarch64.whl
Size 10.8 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
078a32f8ec5725a3d8acc751a7a5d0cb6fc82df1d903f2b9728a29206fc5cf05
BLAKE2b-256 checksum
How to use checksums
7f3884fce70cab1eaae0118d288fa8e9175033b0e2689ff8bce4157f220a8f53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-macosx_11_0_x86_64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-macosx_11_0_x86_64.whl
Size 8.2 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
9348ec6190662cb152dba7ab2e5d756759aa552cc07af16faf98b95d70b580ea
BLAKE2b-256 checksum
How to use checksums
aab7d9900b6f9820c7284c26165e97bb2ad5294afad2e1e3ab00f2c720e9ed67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / pact_python_cli-1!0.10.9-py3-none-macosx_11_0_arm64.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL pact_python_cli-1!0.10.9-py3-none-macosx_11_0_arm64.whl
Size 7.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a258375729d6e1502c279d3fd27e2046568807cb910b066bb853bc773c197627
BLAKE2b-256 checksum
How to use checksums
1c9664484626a085c3beb8985df6b349c5e2672923dafae785f81c29b32020e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for pact-python-cli 1!0.10.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 8 files

Attestation for pact_python_cli-1!0.10.9-py3-none-win_arm64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page