Postman CLI

1.34.1 · active · verified Wed Apr 22

The Postman CLI is the official command-line companion for the Postman API platform, enabling developers to automate API development, testing, and integration into CI/CD pipelines. It allows users to run Postman Collections, execute monitors, and enforce API governance rules directly from the terminal. The current stable version is 1.34.1, indicating active development with regular updates to support the evolving Postman ecosystem. Key differentiators include its tight integration with Postman's cloud platform, providing a seamless bridge between collaborative API design and automated execution, and its capability to enforce quality gates in CI/CD workflows. It is a lightweight tool designed for local debugging, scaling systems, and embedding API workflows into build systems, supporting macOS, Linux (x64 & ARM64), and Windows (x64) platforms.

Common errors

Warnings

Install

Quickstart

Installs the Postman CLI globally, demonstrates how to get help, log in using an API key, run a collection with an environment, and lint an API for governance rules.

npm install -g postman-cli

# Get help and verify installation
postman --help

# Sign in to Postman using an API key (replace with your actual API key or environment variable)
# It's recommended to use environment variables for sensitive data.
postman login --with-api-key "${process.env.POSTMAN_API_KEY || 'pk_YOUR_API_KEY'}"

# Run a Postman collection (replace with your actual collection ID and environment ID)
postman collection run "<collection-id>" -e "<environment-id>"

# Check API governance and security rules for a specific API (replace with your actual API ID)
postman api lint "<api-id>"

view raw JSON →