Postman CLI commands and options overview

View as MarkdownOpen in Claude

Availability of some Postman CLI commands depend on your Postman plan.

The Postman CLI provides a comprehensive set of commands for working with Postman from the command line. These commands are organized by functionality to help you quickly find the tools you need for your specific workflow.

Global options

The following options are available globally across many Postman CLI commands. See each individual command for usage details.

OptionWhat it does
--jsonEmits machine-readable JSON instead of the default table or CLI-formatted output.
--api-key <key>A Postman API key, used instead of your postman login session.
-w, --workspace <id>The Postman cloud workspace a command reads from, writes to, or runs against.
-y, --yesSkips the confirmation prompt before a destructive or interactive action.
--report-events / --no-report-eventsControls whether that invocation uploads its run results as usage analytics. On by default; --no-report-events turns it off for that run.

Exit codes

Most Postman CLI commands follow the standard convention of exit code 0 for success and a non-zero code for failure. The following commands have a specific, numbered set of exit codes:

CommandExit codes
postman init0 set up, or adopted an existing setup · 1 could not run: bad usage, or an unexpected error · 2 several specs could be authoritative, re-run with --spec <path> · 4 refused: postman/ holds source files, or a binding names a missing file · 5 local setup done, but the workspace --visibility asked for wasn’t made
postman skills status0 the check completed · 1 the skills repository couldn’t be reached · 3 not current, and --strict was passed
postman skills update0 up to date, or updated · 1 the skills repository couldn’t be reached · 4 refused: a skill file was edited locally, re-run with --force
postman workspace get0 ok · 1 not found or API failure · 2 bad usage · 3 auth
postman request0 success (2xx-3xx response, all tests passed) · N the number of failed tests (for example, exit code 3 means 3 tests failed)
postman context-graph ask0 the ask completed, or was accepted without --wait · 1 the request failed (auth, network, malformed input, or unknown status) · 2 the ask reached a failed state · 4 --timeout elapsed before the ask finished (--wait only)
postman context-graph status0 the ask completed · 1 the request failed (auth, network, or unknown ask ID or status) · 2 the ask reached a failed state · 3 the ask is still in progress

Command categories

The Postman CLI commands are organized into the following categories:

Init

  • postman init — Set up an AI-ready API project in a repository.

Basic

Authentication

Workspace

Team

Collection

Dependency

Environment

Globals

Secret commands

Request commands

  • postman request — Test and debug individual HTTP requests from the command line.

Monitor

App

  • postman app test — Run your application’s existing UI test command, capture the network traffic generated during the run, and validate observed API calls against requests in your collections.

  • postman app setup-capture — Set up automatic network capture for your Playwright tests.

  • postman app init — Deprecated. Initialize your project as an Application Inventory application.

Flows

Spec

Mock

Dataset

Simulate

API publish

SDK

Describe

  • postman describe — Aggregate all the information that a coding agent needs to generate accurate code.

Context Graph

Skills

Webhook

Usage analytics

Several Postman CLI commands report usage analytics to Postman by default. To turn this reporting off for a command, pass --report-events=false (or --no-report-events).

The Postman CLI also records a minimal, anonymous usage event for many of its commands, so Postman can measure overall CLI usage. These events contain no personal data, file paths, request URLs, or resource names. They include only anonymous IDs, flags, and counts. They’re separate from the reporting that --report-events controls, so --report-events=false doesn’t turn them off.

Get started

To begin using the Postman CLI, do the following:

  1. Install the Postman CLI.
  2. Explore the specific command categories that match your workflow.

Each command category page provides detailed options, examples, and use cases to help you integrate the Postman CLI into your development and testing workflows.