postman-cli 1.79.0 → 1.82.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.
- package/README.md +197 -46
- package/man/postman.1 +145 -28
- package/package.json +32 -37
package/README.md
CHANGED
|
@@ -1,82 +1,233 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
+
**API engineering for your agents.** Go faster from development to production.
|
|
14
8
|
|
|
15
|
-
|
|
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
|
-
|
|
11
|
+
## Install
|
|
18
12
|
|
|
19
13
|
```bash
|
|
20
14
|
npm install -g postman-cli
|
|
21
15
|
```
|
|
22
16
|
|
|
23
|
-
|
|
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
|
-
|
|
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
|
-
|
|
31
|
-
postman --
|
|
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
|
-
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
postman
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
46
|
-
postman collection run <collection-id>
|
|
103
|
+
### Performance tests
|
|
47
104
|
|
|
48
|
-
|
|
49
|
-
postman
|
|
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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
-
|
|
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
|
-
|
|
135
|
+
### Workspace context
|
|
61
136
|
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
223
|
+
## Documentation
|
|
73
224
|
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
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
|
-
-
|
|
82
|
-
- [GitHub Issues](https://github.com/postmanlabs/postman-app-support/issues)
|
|
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-
|
|
1
|
+
.TH POSTMAN 1 "2026-10-28" "v1.82.0" "Postman CLI Manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
postman \- Command\-line companion utility for Postman
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -49,6 +49,12 @@ Specify the API key directly.
|
|
|
49
49
|
.B \-\-region <region>
|
|
50
50
|
Specify the region for authentication. Use "eu" for EU region.
|
|
51
51
|
.TP
|
|
52
|
+
.B \-\-migrate\-guest\-workspace
|
|
53
|
+
Copy this repository's local work into a new workspace in the account you sign in to, even when this session is no longer a guest (for example after a logout).
|
|
54
|
+
.TP
|
|
55
|
+
.B \-\-no\-migrate\-guest\-workspace
|
|
56
|
+
Do not copy a guest's local work into the account you sign in to. By default a guest's local work is copied.
|
|
57
|
+
.TP
|
|
52
58
|
.B \-\-verbose
|
|
53
59
|
Show detailed error information
|
|
54
60
|
|
|
@@ -166,6 +172,24 @@ Show the Postman account or guest session this CLI session is using.
|
|
|
166
172
|
.B \-\-json
|
|
167
173
|
Print current identity as machine\-readable JSON.
|
|
168
174
|
|
|
175
|
+
.SS "status"
|
|
176
|
+
Show the Postman CLI version, project initialization, authentication, skills, and agent plugins.
|
|
177
|
+
|
|
178
|
+
.B Usage:
|
|
179
|
+
[options] [dir\-path]
|
|
180
|
+
|
|
181
|
+
.B Options:
|
|
182
|
+
.TP
|
|
183
|
+
.B \-\-json
|
|
184
|
+
Print status as machine\-readable JSON.
|
|
185
|
+
|
|
186
|
+
.TP Examples:
|
|
187
|
+
|
|
188
|
+
Examples:
|
|
189
|
+
$ postman status
|
|
190
|
+
$ postman status ./services/api \-\-json
|
|
191
|
+
|
|
192
|
+
|
|
169
193
|
.SS "feedback"
|
|
170
194
|
Submit feedback about CLI usability, gaps, and improvement suggestions.
|
|
171
195
|
|
|
@@ -327,7 +351,7 @@ Add, get, update, or remove folders in a local v3 collection.
|
|
|
327
351
|
Add, update, remove, get, or list examples (saved responses) under a request.
|
|
328
352
|
.TP
|
|
329
353
|
.B collection import
|
|
330
|
-
Import a cURL or
|
|
354
|
+
Import a cURL, HAR, or JMeter (.jmx) source into a v3 collection (local, or cloud with \-\-workspace).
|
|
331
355
|
.TP
|
|
332
356
|
.B collection list
|
|
333
357
|
List collections: your local project's collections by default, or a Postman cloud workspace's collections with \-\-workspace.
|
|
@@ -1206,7 +1230,7 @@ Example type for cloud mode: http. (default: http)
|
|
|
1206
1230
|
JSON output.
|
|
1207
1231
|
|
|
1208
1232
|
.SS "collection import"
|
|
1209
|
-
Import a cURL or
|
|
1233
|
+
Import a cURL, HAR, or JMeter (.jmx) source into a v3 collection (local, or cloud with \-\-workspace).
|
|
1210
1234
|
|
|
1211
1235
|
.B Usage:
|
|
1212
1236
|
[options] <src>
|
|
@@ -1214,7 +1238,7 @@ Import a cURL or HAR source into a v3 collection (local, or cloud with \-\-works
|
|
|
1214
1238
|
.B Options:
|
|
1215
1239
|
.TP
|
|
1216
1240
|
.B \-\-type <format>
|
|
1217
|
-
Source format: curl or
|
|
1241
|
+
Source format: curl, har, or jmeter. Auto\-detected from the extension/content when omitted.
|
|
1218
1242
|
.TP
|
|
1219
1243
|
.B \-\-name <name>
|
|
1220
1244
|
Collection display name. Defaults to a per\-format fallback.
|
|
@@ -1244,6 +1268,7 @@ JSON output.
|
|
|
1244
1268
|
Examples:
|
|
1245
1269
|
postman collection import ./login.curl
|
|
1246
1270
|
postman collection import ./session.har \-\-name "Recorded session"
|
|
1271
|
+
postman collection import ./load\-test.jmx \-\-name "Load test"
|
|
1247
1272
|
pbpaste | postman collection import \- \-\-type curl \-\-name Users
|
|
1248
1273
|
postman collection import ./session.har \-\-name Session \-\-workspace <workspaceId>
|
|
1249
1274
|
|
|
@@ -2255,7 +2280,7 @@ Read a spec definition, including every file of a multi\-file spec.
|
|
|
2255
2280
|
Postman API key
|
|
2256
2281
|
.TP
|
|
2257
2282
|
.B \-\-json
|
|
2258
|
-
Output as JSON
|
|
2283
|
+
Output as JSON; a local OpenAPI spec also includes its parsed, $ref\-resolved definition
|
|
2259
2284
|
|
|
2260
2285
|
.TP Examples:
|
|
2261
2286
|
|
|
@@ -3207,7 +3232,10 @@ Lint the current local Postman workspace: its configuration (.postman/resources.
|
|
|
3207
3232
|
Read a workspace's metadata, and optionally the ids of what it holds.
|
|
3208
3233
|
.TP
|
|
3209
3234
|
.B workspace context
|
|
3210
|
-
|
|
3235
|
+
Everything about a workspace: collections, environments, monitors, mocks, specs and flows, and how they relate (which monitor runs which collection). Add `\-\-section activity` for the change feed. Prints JSON when piped.
|
|
3236
|
+
.TP
|
|
3237
|
+
.B workspace activity
|
|
3238
|
+
Shorthand for `workspace context \-\-section activity`: who changed what, and the messages left on pushes.
|
|
3211
3239
|
.TP
|
|
3212
3240
|
.B workspace create
|
|
3213
3241
|
Create a Postman workspace and bind it to this git repository.
|
|
@@ -3365,7 +3393,60 @@ Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
|
3365
3393
|
|
|
3366
3394
|
|
|
3367
3395
|
.SS "workspace context"
|
|
3368
|
-
|
|
3396
|
+
Everything about a workspace: collections, environments, monitors, mocks, specs and flows, and how they relate (which monitor runs which collection). Add `\-\-section activity` for the change feed. Prints JSON when piped.
|
|
3397
|
+
|
|
3398
|
+
.B Usage:
|
|
3399
|
+
[options] [id]
|
|
3400
|
+
|
|
3401
|
+
.B Options:
|
|
3402
|
+
.TP
|
|
3403
|
+
.B \-\-section <names>
|
|
3404
|
+
Comma\-separated sections to show (collection, environment, monitor, mock, spec, flow, activity). Default: everything but activity. Counts are always reported for every inventory section.
|
|
3405
|
+
.TP
|
|
3406
|
+
.B \-\-limit <n>
|
|
3407
|
+
Max items per section, or entries for activity (default 25 items). A cut section says how many were left out.
|
|
3408
|
+
.TP
|
|
3409
|
+
.B \-\-type <types>
|
|
3410
|
+
Activity only: comma\-separated element types, e.g. "api,collection". Use "workspacePush" for the messages left with `workspace push \-m`.
|
|
3411
|
+
.TP
|
|
3412
|
+
.B \-\-contributor <ids>
|
|
3413
|
+
Activity only: comma\-separated user ids.
|
|
3414
|
+
.TP
|
|
3415
|
+
.B \-\-cursor <cursor>
|
|
3416
|
+
Activity only: the page of entries that follows this cursor.
|
|
3417
|
+
.TP
|
|
3418
|
+
.B \-\-markdown
|
|
3419
|
+
Activity only: ask the API for a human\-readable description of each entry.
|
|
3420
|
+
.TP
|
|
3421
|
+
.B \-\-brief
|
|
3422
|
+
With only `\-\-section activity`: one plain line per entry (time, who, message).
|
|
3423
|
+
.TP
|
|
3424
|
+
.B \-\-json
|
|
3425
|
+
Print JSON (schemaVersion 1.0). This is already the default when piped.
|
|
3426
|
+
.TP
|
|
3427
|
+
.B \-\-text
|
|
3428
|
+
Print prose even when piped.
|
|
3429
|
+
.TP
|
|
3430
|
+
.B \-\-timeout <ms>
|
|
3431
|
+
Milliseconds to wait for the API (default 30000).
|
|
3432
|
+
|
|
3433
|
+
.TP Examples:
|
|
3434
|
+
|
|
3435
|
+
Examples:
|
|
3436
|
+
postman workspace context
|
|
3437
|
+
Snapshot of the current folder's bound workspace
|
|
3438
|
+
postman workspace context <id> \-\-section monitor,mock
|
|
3439
|
+
postman workspace context <id> \-\-section collection \-\-limit 200
|
|
3440
|
+
postman workspace context <id> \-\-section activity \-\-limit 5 \-\-brief
|
|
3441
|
+
postman workspace context <id> \-\-section monitor,activity \-\-limit 5
|
|
3442
|
+
postman workspace context <id> \-\-json | jq '.sections.monitor.items[].refs'
|
|
3443
|
+
|
|
3444
|
+
Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth, 4 printed but some sections could not be listed.
|
|
3445
|
+
|
|
3446
|
+
|
|
3447
|
+
|
|
3448
|
+
.SS "workspace activity"
|
|
3449
|
+
Shorthand for `workspace context \-\-section activity`: who changed what, and the messages left on pushes.
|
|
3369
3450
|
|
|
3370
3451
|
.B Usage:
|
|
3371
3452
|
[options] [id]
|
|
@@ -3399,14 +3480,9 @@ Milliseconds to wait for the API (default 30000).
|
|
|
3399
3480
|
.TP Examples:
|
|
3400
3481
|
|
|
3401
3482
|
Examples:
|
|
3402
|
-
postman workspace
|
|
3403
|
-
|
|
3404
|
-
postman workspace
|
|
3405
|
-
postman workspace context <id> \-\-type api,collection
|
|
3406
|
-
postman workspace context <id> \-\-contributor <userId>
|
|
3407
|
-
postman workspace context <id> \-\-markdown
|
|
3408
|
-
postman workspace context <id> \-\-json
|
|
3409
|
-
postman workspace context <id> \-\-type workspacePush \-\-limit 5 \-\-brief
|
|
3483
|
+
postman workspace activity
|
|
3484
|
+
postman workspace activity <id> \-\-type workspacePush \-\-limit 5 \-\-brief
|
|
3485
|
+
postman workspace activity <id> \-\-contributor <userId> \-\-json
|
|
3410
3486
|
|
|
3411
3487
|
Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
3412
3488
|
|
|
@@ -3816,6 +3892,9 @@ Format: "<{{var}}|host> mock|mock\-server:<path|id> [scenario]" (default: )
|
|
|
3816
3892
|
.TP
|
|
3817
3893
|
.B \-\-dataset <pathOrDir>
|
|
3818
3894
|
Pass \-\-dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the handlers of the local mocks started by \-\-use\-mock as pm.datasets(<id>). Local runner only. (default: )
|
|
3895
|
+
.TP
|
|
3896
|
+
.B \-\-workspace\-id <id>
|
|
3897
|
+
Workspace that owns the shared vault for the collection's v12 secret variables. Required on cloud runs to resolve those secrets; omit if the run uses no vault secrets.
|
|
3819
3898
|
|
|
3820
3899
|
.TP Examples:
|
|
3821
3900
|
|
|
@@ -3847,9 +3926,9 @@ Load segments:
|
|
|
3847
3926
|
ramp\-up — 2 segments
|
|
3848
3927
|
|
|
3849
3928
|
peak ┤ _________ at peak __________
|
|
3850
|
-
│ ramp\-up _____
|
|
3851
|
-
│ ______
|
|
3852
|
-
base ┤__ warm\-up ___
|
|
3929
|
+
│ ramp\-up _____/
|
|
3930
|
+
│ ______/
|
|
3931
|
+
base ┤__ warm\-up ___/
|
|
3853
3932
|
└┬─────────────┬─────────────┬───────────────────────────┤ \-\-duration
|
|
3854
3933
|
1 2 (3)
|
|
3855
3934
|
|
|
@@ -3861,10 +3940,10 @@ Load segments:
|
|
|
3861
3940
|
|
|
3862
3941
|
spike — 3 segments · no time at the peak; use \-\-load\-profile peak to hold
|
|
3863
3942
|
|
|
3864
|
-
peak ┤
|
|
3865
|
-
│ ramp\-up _
|
|
3866
|
-
│ _
|
|
3867
|
-
base ┤______ warm\-up _______
|
|
3943
|
+
peak ┤ /\e
|
|
3944
|
+
│ ramp\-up _/ \e_ ramp\-down
|
|
3945
|
+
│ _/ \e_
|
|
3946
|
+
base ┤______ warm\-up _______/ \e______ at base _______
|
|
3868
3947
|
└┬─────────────────────┬─────┬─────┬─────────────────────┤ \-\-duration
|
|
3869
3948
|
1 2 3 (4)
|
|
3870
3949
|
|
|
@@ -3877,9 +3956,9 @@ Load segments:
|
|
|
3877
3956
|
peak — 4 segments
|
|
3878
3957
|
|
|
3879
3958
|
peak ┤ __ hold ___
|
|
3880
|
-
│ ramp\-up ____
|
|
3881
|
-
│ ____
|
|
3882
|
-
base ┤_ warm\-up _
|
|
3959
|
+
│ ramp\-up ____/ \e____ ramp\-down
|
|
3960
|
+
│ ____/ \e____
|
|
3961
|
+
base ┤_ warm\-up _/ \e_ at base __
|
|
3883
3962
|
└┬──────────┬──────────┬──────────┬──────────┬───────────┤ \-\-duration
|
|
3884
3963
|
1 2 3 4 (5)
|
|
3885
3964
|
|
|
@@ -3966,6 +4045,9 @@ Manage and interact with flows.
|
|
|
3966
4045
|
|
|
3967
4046
|
.B Subcommands:
|
|
3968
4047
|
.TP
|
|
4048
|
+
.B flows create
|
|
4049
|
+
Create a flow in the current repository, the same way "New flow" does in the Postman app. Run it from the root of a repository connected to a Postman workspace.
|
|
4050
|
+
.TP
|
|
3969
4051
|
.B flows list
|
|
3970
4052
|
List all flows
|
|
3971
4053
|
.TP
|
|
@@ -3990,6 +4072,35 @@ List run history for a deployed flow
|
|
|
3990
4072
|
.B flows get-run
|
|
3991
4073
|
Analyze a specific flow run
|
|
3992
4074
|
|
|
4075
|
+
.SS "flows create"
|
|
4076
|
+
Create a flow in the current repository, the same way "New flow" does in the Postman app. Run it from the root of a repository connected to a Postman workspace.
|
|
4077
|
+
|
|
4078
|
+
.B Usage:
|
|
4079
|
+
[options]
|
|
4080
|
+
|
|
4081
|
+
.B Options:
|
|
4082
|
+
.TP
|
|
4083
|
+
.B \-n, \-\-name <name>
|
|
4084
|
+
Specify the flow name (default: New flow)
|
|
4085
|
+
.TP
|
|
4086
|
+
.B \-\-verbose
|
|
4087
|
+
Verbose output
|
|
4088
|
+
.TP
|
|
4089
|
+
.B \-\-debug
|
|
4090
|
+
Debug output
|
|
4091
|
+
.TP
|
|
4092
|
+
.B \-\-json
|
|
4093
|
+
JSON output
|
|
4094
|
+
|
|
4095
|
+
.TP Examples:
|
|
4096
|
+
|
|
4097
|
+
Examples:
|
|
4098
|
+
postman flows create
|
|
4099
|
+
postman flows create \-\-name "Order sync"
|
|
4100
|
+
postman flows create \-\-name "Order sync" \-\-json
|
|
4101
|
+
|
|
4102
|
+
|
|
4103
|
+
|
|
3993
4104
|
.SS "flows list"
|
|
3994
4105
|
List all flows
|
|
3995
4106
|
|
|
@@ -5697,7 +5808,13 @@ Eg. postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \
|
|
|
5697
5808
|
|
|
5698
5809
|
Local mock paths build a simulation file you serve with `postman simulation run`. Postman mock ids create it in your cloud workspace instead. Use one kind or the other, not both. Add \-\-deploy to upload it and get a live mock server.
|
|
5699
5810
|
|
|
5700
|
-
A <name>.context.
|
|
5811
|
+
A <name>.context.yaml is written beside the .sim.yaml: the record of what your code is believed to rely on about the services this stands in for, and the evidence behind each belief.
|
|
5812
|
+
purpose what it stands in for, and what work it unblocks
|
|
5813
|
+
assumptions one claim per entry — { id, status, claim, reason, verification,
|
|
5814
|
+
source, updated_at }, status being supported | contradicted |
|
|
5815
|
+
unknown | conflicting
|
|
5816
|
+
fingerprints the commit and CLI version the claims were written against
|
|
5817
|
+
The template carries each field's meaning in the comments above it. `simulation update` renames the file with the simulation and `simulation delete` removes it. An existing one is never overwritten, because it holds what earlier sessions established.
|
|
5701
5818
|
|
|
5702
5819
|
|
|
5703
5820
|
.SS "simulation list"
|
|
@@ -5793,8 +5910,8 @@ Show request and response headers and bodies for each request. By default each r
|
|
|
5793
5910
|
.B \-\-proxy
|
|
5794
5911
|
Serve the mocks behind a local HTTP(S) forward proxy instead of one routed port, so a repo under test can point HTTP_PROXY/HTTPS_PROXY at it and reach each mock by hostname without code changes. Each mock is reached on the hostnames its `origin:` declares; a request to any other host reaches the real host unchanged.
|
|
5795
5912
|
.TP
|
|
5796
|
-
.B \-\-proxy\-port <
|
|
5797
|
-
Port for the proxy server. Distinct from \-\-port, which is the one\-port run's own port. Bound to 127.0.0.1, so point clients there rather than at "localhost" — a client that resolves localhost to ::1 first will not reach it.
|
|
5913
|
+
.B \-\-proxy\-port <port>
|
|
5914
|
+
Port for the proxy server, or "auto" for a free one. Omitted, it prefers 7001 but falls back to a free port when that one is busy, so an omitted port is not guaranteed: pass one to pin it, or read the bound port from the startup banner. A port passed here exits 1 when it is busy. Distinct from \-\-port, which is the one\-port run's own port. Bound to 127.0.0.1, so point clients there rather than at "localhost" — a client that resolves localhost to ::1 first will not reach it.
|
|
5798
5915
|
.TP
|
|
5799
5916
|
.B \-\-scenario <name>
|
|
5800
5917
|
Scenario each mock serves, sent as both pm\-mock\-scenario and x\-mock\-scenario. A member that defines no scenario by this name serves its default. (default: default)
|
package/package.json
CHANGED
|
@@ -1,50 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postman-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.82.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
|
-
"
|
|
10
|
-
"automation",
|
|
11
|
-
"rest",
|
|
12
|
-
"newman",
|
|
13
|
-
"api-testing",
|
|
12
|
+
"api-engineering",
|
|
14
13
|
"api-development",
|
|
15
|
-
"
|
|
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
|
-
"
|
|
30
|
-
"
|
|
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
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
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.
|
|
66
|
-
"@postman/pm-bin-macos-x64": "1.
|
|
67
|
-
"@postman/pm-bin-linux-x64": "1.
|
|
68
|
-
"@postman/pm-bin-linux-arm64": "1.
|
|
69
|
-
"@postman/pm-bin-windows-x64": "1.
|
|
60
|
+
"@postman/pm-bin-macos-arm64": "1.82.0",
|
|
61
|
+
"@postman/pm-bin-macos-x64": "1.82.0",
|
|
62
|
+
"@postman/pm-bin-linux-x64": "1.82.0",
|
|
63
|
+
"@postman/pm-bin-linux-arm64": "1.82.0",
|
|
64
|
+
"@postman/pm-bin-windows-x64": "1.82.0"
|
|
70
65
|
}
|
|
71
66
|
}
|