postman-cli 1.79.0 → 1.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +197 -46
  2. package/man/postman.1 +20 -2
  3. package/package.json +32 -37
package/README.md CHANGED
@@ -1,82 +1,233 @@
1
- <br>
2
-
3
- <div align="left">
4
- <a href="https://www.getpostman.com/">
5
- <img src="https://voyager.postman.com/logo/postman-logo-orange.svg" alt="Postman Logo" width="400" height="200">
6
- </a>
7
- </div>
8
-
9
- <br>
1
+ <a href="https://www.postman.com/">
2
+ <img src="https://voyager.postman.com/logo/postman-logo-orange.svg" alt="Postman" width="320">
3
+ </a>
10
4
 
11
5
  # Postman CLI
12
6
 
13
- The Postman CLI brings the power of Postman’s API platform directly to your terminal. It lets you run collections, automate tests, integrate API checks into CI/CD pipelines, and enforce quality gates — all with a single, lightweight command-line tool. Whether you’re debugging locally, scaling systems, or embedding API workflows into your build system, the Postman CLI helps you bridge the gap between collaborative API design in Postman and automated execution in your development and production environments.
7
+ **API engineering for your agents.** Go faster from development to production.
14
8
 
15
- ## Installation
9
+ Lets a coding agent send and test API requests, run collections (saved groups of requests with tests) and OpenAPI specs, load-test an API, stand in for third-party APIs with local fake servers (mocks, and simulations that serve several mocks together), and schedule checks against production (monitors). The CLI provides a standardised runtime and execution across operating systems and environments such as the terminal, coding harnesses and CI.
16
10
 
17
- ### npm
11
+ ## Install
18
12
 
19
13
  ```bash
20
14
  npm install -g postman-cli
21
15
  ```
22
16
 
23
- ### Alternative Installation Methods
17
+ Without Node.js:
18
+
19
+ ```bash
20
+ # macOS, Linux, WSL
21
+ curl -o- "https://dl-cli.pstmn.io/install/unix.sh" | sh
22
+
23
+ # Windows (PowerShell)
24
+ powershell -NoP -NonI -c "irm https://dl-cli.pstmn.io/install/win64.ps1 | iex"
25
+ ```
26
+
27
+ The Postman desktop app includes the CLI. Update with `postman update`. See the [installation guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/) for other options.
28
+
29
+ ## Quick start
24
30
 
25
- For direct binary downloads, platform-specific installers, or other installation methods, see the **[Installation Guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/)**.
31
+ ```bash
32
+ postman init # set up the repo, install agent skills, link a workspace
33
+ postman request GET https://api.example.com/health # send a request
34
+ postman collection run ./postman/collections/orders # run a collection and its tests
35
+ ```
36
+
37
+ ## Agent skills
38
+
39
+ `postman init` installs Postman's agent skills in `postman/skills/` and adds a pointer to them in `AGENTS.md`. Check for updates with `postman skills status`.
40
+
41
+ | Skill | What you get |
42
+ |---|---|
43
+ | `api-discovery` | Reuse the APIs your organization already has, and see what depends on one before you change it |
44
+ | `api-testing` | A repeatable test for every change, so regressions surface in review |
45
+ | `api-mocking` | Build against agreed behaviour before the real API or its dependencies exist |
46
+ | `api-monitoring` | The same tests that passed in development, running against production |
47
+ | `ci-integration` | Merges that fail on a broken test, contract or governance rule |
48
+ | `performance-testing` | Releases gated on latency and error-rate thresholds |
49
+
50
+ [See all skills](https://github.com/postmanlabs/postman-plugin/tree/main/skills).
26
51
 
27
52
  ## Usage
28
53
 
54
+ The examples below cover common tasks. For the full reference, run `man postman`, `postman --help`, or `postman <command> --help`.
55
+
56
+ ### Requests
57
+
29
58
  ```bash
30
- # Get help
31
- postman --help
59
+ postman request POST http://localhost:3000/auth/token --body @creds.json --response-only
60
+ postman request PATCH http://localhost:3000/orders/42 --auth-bearer-token "$TOKEN" \
61
+ --body '{"status":"shipped"}' \
62
+ --script-post-request "pm.test('200', () => pm.response.to.have.status(200))"
63
+ ```
32
64
 
33
- # Sign in to Postman
34
- postman login
65
+ Exits `0` on a 2xx or 3xx response with all tests passing. Otherwise exits with the number of failed tests.
66
+
67
+ ### Collections and specs
35
68
 
36
- # Sign in to Postman and EU region
37
- postman login --region eu
69
+ ```bash
70
+ postman spec lint ./openapi.yaml
71
+ postman spec generate collection ./openapi.yaml --name "Orders API"
72
+ postman collection import ./login.curl
73
+ postman collection run ./postman/collections/orders -e ./postman/environments/dev.environment.yaml
74
+ ```
75
+
76
+ ### Mocks
77
+
78
+ ```bash
79
+ postman mock generate ./specs/payments.yaml --stateful # no spec? pass only --name for a sample
80
+ postman mock run ./postman/mocks/payments --port 4010
81
+ postman collection run ./postman/collections/checkout --use-mock "{{paymentsUrl}} mock:./postman/mocks/payments"
82
+ ```
83
+
84
+ A mock is a Node.js request handler in `postman/mocks/<name>/`. Use `pm.state` to keep state between requests:
85
+
86
+ ```js
87
+ const http = require("http");
88
+ http.createServer(async (req, res) => {
89
+ const key = req.headers["idempotency-key"];
90
+ const seen = await pm.state.get(key);
91
+ if (seen) return res.end(JSON.stringify(seen));
92
+ if (req.headers["x-test"] === "429") { res.writeHead(429); return res.end(); }
93
+ const charge = { id: "ch_" + Date.now(), status: "succeeded" };
94
+ await pm.state.set(key, charge);
95
+ res.writeHead(201); res.end(JSON.stringify(charge));
96
+ });
97
+ ```
38
98
 
39
- # Sign in using API key
40
- postman login --with-api-key <api-key>
99
+ `--use-mock` takes `"<url or {{variable}}> mock:<path>"` and points every request to `{{paymentsUrl}}` at the local mock for the length of the run. Repeat the flag to redirect several URLs. `pm.state` persists across requests and runs until `pm.state.clear()`. `postman mock run --output ndjson` streams one JSON event per request for CI.
41
100
 
42
- # Sign in using API key and EU region
43
- postman login --with-api-key <api-key> --region eu
101
+ Scenarios in `config.yaml` add delays, error responses, rate limits and random failures. Select one per request with the `x-mock-scenario` header. A simulation is a `.sim.yaml` file that serves several mocks together on one local port. `postman simulation run <file>` runs it, and adding `--proxy` routes requests to each mock by hostname with no code changes (Solo, Team and Enterprise plans).
44
102
 
45
- # Run a collection
46
- postman collection run <collection-id>
103
+ ### Performance tests
47
104
 
48
- # Run with environment
49
- postman collection run <collection-id> -e <environment-id>
105
+ ```bash
106
+ postman performance run ./postman/collections/checkout \
107
+ --peak-vu 200 --duration 5 --load-profile fixed \
108
+ --pass-if "less_than(p95, 300)" --pass-if "less_than(error_rate, 1)" \
109
+ --output ndjson
110
+ ```
50
111
 
51
- # Run a monitor
112
+ `--duration` is in minutes. `--load-profile` takes `fixed` (flat at `--peak-vu`), `ramp-up`, `spike` (a short burst, no time held at the peak) or `peak` (ramps up, holds the peak, then ramps down). A failed `--pass-if` exits `1`, which fails the CI job. Thresholds can use `avg`, `p90`, `p95`, `p99` (milliseconds), `error_rate` (percent) and `rps`. Load runs from the local machine by default. Use `--runner postman-cloud` to generate load from Postman's cloud runners.
113
+
114
+ ### Monitors
115
+
116
+ A monitor runs a cloud collection on a schedule against a live API and alerts you when it fails. It is not process or host monitoring.
117
+
118
+ ```bash
119
+ postman monitor create --collection <collection-id> --schedule "*/5 * * * *" --notify-email oncall@example.com
52
120
  postman monitor run <monitor-id>
121
+ postman monitor jobs list <monitor-id> --result failure
122
+ ```
53
123
 
54
- # Check API governance and security rules
55
- postman api lint <api-id>
124
+ Send alerts to email or any of Postman's [monitor integrations](https://www.postman.com/product/integrations/?filter=api-monitoring). Run monitors inside your own network with `postman runner start` ([private runners](https://learning.postman.com/docs/monitoring-your-api/runners/overview/)).
125
+
126
+ ### Secrets
127
+
128
+ ```bash
129
+ postman secret create PAYMENTS_API_KEY
130
+ postman environment var set api_key --secret-id <id> -e ./postman/environments/staging.environment.yaml
56
131
  ```
57
132
 
58
- ## Platform Support
133
+ Secret values are entered in a one-time browser form and stored in your team's Shared Vault. The CLI never prints them, and coding agents never see them.
59
134
 
60
- This package automatically downloads the appropriate binary for your platform:
135
+ ### Workspace context
61
136
 
62
- - macOS (Intel & Apple Silicon)
63
- - Linux (x64 & ARM64)
64
- - Windows (x64)
137
+ ```bash
138
+ postman workspace push --yes -m "Add refunds endpoint, spec and tests"
139
+ postman workspace context --type workspacePush --limit 5 --brief # recent push messages, one line each
140
+ postman workspace context --json # the full workspace context
141
+ postman workspace pull
142
+ ```
143
+
144
+ Use `-m` to record what changed. `workspace context` shows each push with its author, and changes made by agents appear as `Name (Agent)`, for example `Ada Lovelace (Claude Code)`. Monitor runs and runs of linked collections are recorded in the workspace. Collection runs from CI include the commit and pipeline.
145
+
146
+ ### Context Graph
147
+
148
+ ```bash
149
+ postman context-graph ask "What depends on the billing service's invoice response?" --wait --json
150
+ ```
151
+
152
+ Context Graph maps your organization's APIs, deployments, database schemas, external services and teams into a single dependency graph, built from Git-connected Postman workspaces plus the sources you connect, such as GitHub repositories and New Relic. It answers how your services relate to each other and gives agents grounded, queryable context about your architecture.
153
+
154
+ Answers draw on the sources your team connects in Postman under **Home > Agent Context**. Use code search for anything outside them. `postman dependency add` pulls in collections and specs published by other teams. `postman describe` returns the details an agent needs to write code against an API. [Learn more](https://www.postman.com/context-graph/)
155
+
156
+ ### Public APIs
65
157
 
66
- > **Note:** Linux support excludes Alpine Linux distributions due to libc compatibility requirements.
158
+ [Orbit](https://www.buildwithorbit.ai/) finds public API endpoints for a task and returns instructions to call them. The `api-discovery` skill uses it automatically.
67
159
 
68
- ## Troubleshooting Installation
160
+ ```bash
161
+ claude mcp add --transport http orbit https://mcp.buildwithorbit.ai/mcp
162
+ ```
163
+
164
+ ## What install and `init` change on your machine
165
+
166
+ - **`npm install`:** if Claude Code's or Codex's configuration folder already exists, the install adds one line to its global instructions (`CLAUDE.md`, or Codex's `AGENTS.override.md` or `AGENTS.md`) between `<!-- postman-cli:installation:start -->` and `<!-- postman-cli:installation:end -->` markers: "Postman CLI is installed on this device, and can be used for API Engineering work." Delete those lines to remove it.
167
+ - **`postman init`:** writes local files (`postman/`, `AGENTS.md`, skills under `postman/skills/`). It fetches the latest skills over HTTPS and falls back to the copies bundled with the CLI; `--no-fetch` skips the attempt. It creates a cloud workspace only when you pass `--visibility`, or `--yes` (a guest session when you aren't signed in), and never in CI. `--dry-run` shows what it would do first.
168
+ - **Context that carries over:** in a repo linked to a Postman workspace, using the CLI saves context to that cloud workspace automatically: run results, pushes with their messages, and who or which agent did what. The next session, agent or teammate reads it back with `postman workspace context`, so work isn't re-derived each time. It also keeps your team's API Catalog and Application Inventory current, and feeds Context Graph. Commands such as `collection run`, `request` and `spec lint` do this by default.
169
+
170
+ ## Accounts
171
+
172
+ All capabilities are available without signing in. Signing in associates your work with a Postman account from then on: `postman signup` creates a new account, and `postman login` connects an existing one.
173
+
174
+ ```bash
175
+ postman whoami
176
+ postman signup
177
+ postman login
178
+ postman login --with-api-key <api-key> # or set POSTMAN_API_KEY
179
+ ```
180
+
181
+ The CLI supports Postman's EU region for teams whose data is hosted in the EU. Sign in with `postman login --region eu` (or `postman login --with-api-key <api-key> --region eu`), and the CLI works against the EU region from then on. Private runners take the same `--region eu` option. See [EU data residency](https://learning.postman.com/docs/administration/enterprise/about-eu-data-residency/).
182
+
183
+ ## Postman plugin for coding agents
184
+
185
+ Install the Postman plugin to make the skills available in every repo you open in your coding agent. The plugin runs its commands through this CLI. `postman init` adds the skills to one repo, so everyone who clones it gets them.
186
+
187
+ ```bash
188
+ npx @postman/postman-plugin # every agent on this machine
189
+
190
+ claude plugin marketplace add anthropics/claude-plugins-official # Claude Code
191
+ claude plugin install postman@claude-plugins-official
192
+
193
+ codex plugin marketplace add postmanlabs/postman-plugin # Codex
194
+ codex plugin add postman@postman
195
+
196
+ /add-plugin postman # Cursor
197
+ ```
198
+
199
+ Also available for OpenCode, GitHub Copilot CLI, Antigravity, Factory, Kimi Code and Pi. See [Install the Postman plugin](https://learning.postman.com/docs/postman-plugin/install/overview/).
200
+
201
+ ## CI/CD
202
+
203
+ - Authenticate with `POSTMAN_API_KEY` or `postman login --with-api-key`.
204
+ - Commands exit non-zero on failure.
205
+ - `--json` for machine-readable output, `--output ndjson` for streaming, `--yes` to skip prompts.
206
+ - Collection run reporters: `cli`, `json`, `junit`, `html`.
207
+ - `postman workspace diff --exit-code` fails when local files and the cloud workspace differ.
208
+ - In CI, `postman init` uses the workspace recorded in `.postman/resources.yaml`.
209
+ - GitHub Actions: [Postman CLI GitHub Action](https://learning.postman.com/docs/postman-cli/postman-cli-github-actions).
210
+
211
+ ## Migrating from Newman
212
+
213
+ `postman collection run` accepts Newman's main options and also runs v3 YAML collections from [Native Git](https://www.postman.com/product/native-git/). Convert a v2.1 collection with `postman collection migrate`. See [Migrate from Newman](https://learning.postman.com/docs/reference/newman-cli/migrate-to-postman-cli).
214
+
215
+ ## Platform support
216
+
217
+ - macOS (Intel and Apple Silicon)
218
+ - Linux (x64 and ARM64). Alpine is not supported.
219
+ - Windows (x64)
69
220
 
70
- The Postman CLI relies on platform-specific binaries distributed as optional dependencies. If you encounter "Binary not found" errors, ensure you're not using `--no-optional` or `--omit=optional` flags during installation, and verify that your `.npmrc` configuration doesn't contain `optional=false`. Installation failures may also occur due to network/registry access issues blocking `@postman/*` scoped packages or when using an unsupported platform architecture.
221
+ If you see `Binary not found`, make sure optional dependencies are installed (no `--omit=optional`, no `optional=false` in `.npmrc`) and your registry can reach `@postman/*` packages. If you installed with both npm and the install script, run `which postman` to see which one is on your `PATH`.
71
222
 
72
- ## Resources
223
+ ## Documentation
73
224
 
74
- - **[Complete Documentation](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)** - Full guide with examples and advanced usage
75
- - **[Installation Guide](https://learning.postman.com/docs/postman-cli/postman-cli-installation/)** - All installation methods and platform-specific instructions
76
- - **[Command Reference](https://learning.postman.com/docs/postman-cli/postman-cli-options/)** - Complete list of commands and options
77
- - **[Release Notes](https://www.postman.com/release-notes/postman-cli/)** - Latest versions and changelog
225
+ - [Postman CLI docs](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)
226
+ - [Command reference](https://learning.postman.com/docs/postman-cli/postman-cli-options/)
227
+ - [Using the CLI with AI agents and CI/CD](https://learning.postman.com/docs/postman-cli/postman-cli-agents-and-ci)
228
+ - [Release notes](https://www.postman.com/release-notes/postman-cli/)
78
229
 
79
230
  ## Support
80
231
 
81
- - [Postman Support](https://support.postman.com/) – For general support and troubleshooting
82
- - [GitHub Issues](https://github.com/postmanlabs/postman-app-support/issues) – For bug reports and feature requests
232
+ - `postman feedback "<message>"`
233
+ - [GitHub Issues](https://github.com/postmanlabs/postman-app-support/issues)
package/man/postman.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH POSTMAN 1 "2026-10-26" "v1.79.0" "Postman CLI Manual"
1
+ .TH POSTMAN 1 "2026-10-27" "v1.80.0" "Postman CLI Manual"
2
2
  .SH NAME
3
3
  postman \- Command\-line companion utility for Postman
4
4
  .SH SYNOPSIS
@@ -166,6 +166,24 @@ Show the Postman account or guest session this CLI session is using.
166
166
  .B \-\-json
167
167
  Print current identity as machine\-readable JSON.
168
168
 
169
+ .SS "status"
170
+ Show the Postman CLI version, project initialization, authentication, skills, and agent plugins.
171
+
172
+ .B Usage:
173
+ [options] [dir\-path]
174
+
175
+ .B Options:
176
+ .TP
177
+ .B \-\-json
178
+ Print status as machine\-readable JSON.
179
+
180
+ .TP Examples:
181
+
182
+ Examples:
183
+ $ postman status
184
+ $ postman status ./services/api \-\-json
185
+
186
+
169
187
  .SS "feedback"
170
188
  Submit feedback about CLI usability, gaps, and improvement suggestions.
171
189
 
@@ -2255,7 +2273,7 @@ Read a spec definition, including every file of a multi\-file spec.
2255
2273
  Postman API key
2256
2274
  .TP
2257
2275
  .B \-\-json
2258
- Output as JSON (full spec definition)
2276
+ Output as JSON; a local OpenAPI spec also includes its parsed, $ref\-resolved definition
2259
2277
 
2260
2278
  .TP Examples:
2261
2279
 
package/package.json CHANGED
@@ -1,50 +1,45 @@
1
1
  {
2
2
  "name": "postman-cli",
3
- "version": "1.79.0",
3
+ "version": "1.80.0",
4
4
  "description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
5
5
  "keywords": [
6
6
  "postman",
7
+ "postman-cli",
8
+ "postman-collection",
9
+ "newman",
7
10
  "cli",
8
11
  "api",
9
- "testing",
10
- "automation",
11
- "rest",
12
- "newman",
13
- "api-testing",
12
+ "api-engineering",
14
13
  "api-development",
15
- "ci-cd",
16
- "continuous-integration",
17
- "postman-cli",
14
+ "rest-api",
18
15
  "api-client",
19
16
  "http-client",
17
+ "api-testing",
20
18
  "api-automation",
21
- "collection-runner",
22
- "postman-collection",
23
- "api-governance",
24
- "api-security",
25
- "api-linting",
26
- "api-validation",
27
19
  "contract-testing",
28
20
  "schema-validation",
29
- "devops",
30
- "pipeline",
21
+ "openapi",
22
+ "openapi-lint",
23
+ "api-governance",
24
+ "mock-server",
25
+ "api-mocking",
26
+ "service-virtualization",
27
+ "api-simulation",
28
+ "fault-injection",
29
+ "load-testing",
30
+ "performance-testing",
31
+ "api-monitoring",
32
+ "webhook-testing",
33
+ "api-discovery",
34
+ "api-documentation",
35
+ "dependency-graph",
36
+ "secrets-manager",
37
+ "ci-cd",
31
38
  "github-actions",
32
- "gitlab-ci",
33
- "azure-devops",
34
- "jenkins",
35
- "circleci",
36
- "integration-testing",
37
- "functional-testing",
38
- "test-reports",
39
39
  "junit-reports",
40
- "html-reports",
41
- "postman-automation",
42
- "postman-testing",
43
- "postman-runner",
44
- "postman-monitor",
45
- "rest-api",
46
- "http-testing",
47
- "api-tools"
40
+ "ai-agents",
41
+ "coding-agents",
42
+ "agent-skills"
48
43
  ],
49
44
  "bin": {
50
45
  "postman": "bin/postman.js"
@@ -62,10 +57,10 @@
62
57
  "scripts/"
63
58
  ],
64
59
  "optionalDependencies": {
65
- "@postman/pm-bin-macos-arm64": "1.79.0",
66
- "@postman/pm-bin-macos-x64": "1.79.0",
67
- "@postman/pm-bin-linux-x64": "1.79.0",
68
- "@postman/pm-bin-linux-arm64": "1.79.0",
69
- "@postman/pm-bin-windows-x64": "1.79.0"
60
+ "@postman/pm-bin-macos-arm64": "1.80.0",
61
+ "@postman/pm-bin-macos-x64": "1.80.0",
62
+ "@postman/pm-bin-linux-x64": "1.80.0",
63
+ "@postman/pm-bin-linux-arm64": "1.80.0",
64
+ "@postman/pm-bin-windows-x64": "1.80.0"
70
65
  }
71
66
  }