postman-cli 1.77.0 → 1.79.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/man/postman.1 +75 -35
- package/package.json +6 -6
package/man/postman.1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH POSTMAN 1 "2026-10-26" "v1.
|
|
1
|
+
.TH POSTMAN 1 "2026-10-26" "v1.79.0" "Postman CLI Manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
postman \- Command\-line companion utility for Postman
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -3206,8 +3206,8 @@ Lint the current local Postman workspace: its configuration (.postman/resources.
|
|
|
3206
3206
|
.B workspace get
|
|
3207
3207
|
Read a workspace's metadata, and optionally the ids of what it holds.
|
|
3208
3208
|
.TP
|
|
3209
|
-
.B workspace
|
|
3210
|
-
Read a workspace's activity
|
|
3209
|
+
.B workspace context
|
|
3210
|
+
Read a workspace's recent activity: who changed what, and the messages left on pushes. Also available as `activity`.
|
|
3211
3211
|
.TP
|
|
3212
3212
|
.B workspace create
|
|
3213
3213
|
Create a Postman workspace and bind it to this git repository.
|
|
@@ -3298,6 +3298,9 @@ Skip all confirmation prompts
|
|
|
3298
3298
|
.B \-\-push\-strategy <strategy>
|
|
3299
3299
|
Push strategy. "force\-sync": mirror the whole workspace — also DELETE cloud entities that have no local counterpart (destructive). Defaults to "default" (create/update only).
|
|
3300
3300
|
.TP
|
|
3301
|
+
.B \-m, \-\-message <text>
|
|
3302
|
+
Short note on what changed, like a commit message (max 500 characters). Shown on the workspace activity feed. Recorded only when the push changes something.
|
|
3303
|
+
.TP
|
|
3301
3304
|
.B \-\-json
|
|
3302
3305
|
Print the outcome as machine\-readable JSON. Implies non\-interactive: use \-\-yes to actually push.
|
|
3303
3306
|
.TP
|
|
@@ -3361,8 +3364,8 @@ Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
|
3361
3364
|
|
|
3362
3365
|
|
|
3363
3366
|
|
|
3364
|
-
.SS "workspace
|
|
3365
|
-
Read a workspace's activity
|
|
3367
|
+
.SS "workspace context"
|
|
3368
|
+
Read a workspace's recent activity: who changed what, and the messages left on pushes. Also available as `activity`.
|
|
3366
3369
|
|
|
3367
3370
|
.B Usage:
|
|
3368
3371
|
[options] [id]
|
|
@@ -3370,7 +3373,7 @@ Read a workspace's activity feed.
|
|
|
3370
3373
|
.B Options:
|
|
3371
3374
|
.TP
|
|
3372
3375
|
.B \-\-type <types>
|
|
3373
|
-
Comma\-separated element types to filter on, e.g. "api,collection".
|
|
3376
|
+
Comma\-separated element types to filter on, e.g. "api,collection". Use "workspacePush" for the messages left with `workspace push \-m`.
|
|
3374
3377
|
.TP
|
|
3375
3378
|
.B \-\-contributor <ids>
|
|
3376
3379
|
Comma\-separated user ids to filter on.
|
|
@@ -3387,19 +3390,23 @@ Ask the API for a human\-readable description of each entry.
|
|
|
3387
3390
|
.B \-\-json
|
|
3388
3391
|
Print the feed as machine\-readable JSON.
|
|
3389
3392
|
.TP
|
|
3393
|
+
.B \-\-brief
|
|
3394
|
+
Print one plain line per entry (time, who, message), for a prompt or a log. Prints nothing when there are no entries.
|
|
3395
|
+
.TP
|
|
3390
3396
|
.B \-\-timeout <ms>
|
|
3391
3397
|
Milliseconds to wait for the API (default 30000).
|
|
3392
3398
|
|
|
3393
3399
|
.TP Examples:
|
|
3394
3400
|
|
|
3395
3401
|
Examples:
|
|
3396
|
-
postman workspace
|
|
3402
|
+
postman workspace context
|
|
3397
3403
|
Reads the current folder's bound workspace
|
|
3398
|
-
postman workspace
|
|
3399
|
-
postman workspace
|
|
3400
|
-
postman workspace
|
|
3401
|
-
postman workspace
|
|
3402
|
-
postman workspace
|
|
3404
|
+
postman workspace context 00a50319\-1262\-49d2\-83e5\-551e3c5dba00
|
|
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
|
|
3403
3410
|
|
|
3404
3411
|
Exit codes: 0 ok, 1 not found or API failure, 2 bad usage, 3 auth.
|
|
3405
3412
|
|
|
@@ -3840,9 +3847,9 @@ Load segments:
|
|
|
3840
3847
|
ramp\-up — 2 segments
|
|
3841
3848
|
|
|
3842
3849
|
peak ┤ _________ at peak __________
|
|
3843
|
-
│ ramp\-up _____
|
|
3844
|
-
│ ______
|
|
3845
|
-
base ┤__ warm\-up ___
|
|
3850
|
+
│ ramp\-up _____╱
|
|
3851
|
+
│ ______╱
|
|
3852
|
+
base ┤__ warm\-up ___╱
|
|
3846
3853
|
└┬─────────────┬─────────────┬───────────────────────────┤ \-\-duration
|
|
3847
3854
|
1 2 (3)
|
|
3848
3855
|
|
|
@@ -3854,10 +3861,10 @@ Load segments:
|
|
|
3854
3861
|
|
|
3855
3862
|
spike — 3 segments · no time at the peak; use \-\-load\-profile peak to hold
|
|
3856
3863
|
|
|
3857
|
-
peak ┤
|
|
3858
|
-
│ ramp\-up _
|
|
3859
|
-
│ _
|
|
3860
|
-
base ┤______ warm\-up _______
|
|
3864
|
+
peak ┤ ╱╲
|
|
3865
|
+
│ ramp\-up _╱ ╲_ ramp\-down
|
|
3866
|
+
│ _╱ ╲_
|
|
3867
|
+
base ┤______ warm\-up _______╱ ╲______ at base _______
|
|
3861
3868
|
└┬─────────────────────┬─────┬─────┬─────────────────────┤ \-\-duration
|
|
3862
3869
|
1 2 3 (4)
|
|
3863
3870
|
|
|
@@ -3870,9 +3877,9 @@ Load segments:
|
|
|
3870
3877
|
peak — 4 segments
|
|
3871
3878
|
|
|
3872
3879
|
peak ┤ __ hold ___
|
|
3873
|
-
│ ramp\-up ____
|
|
3874
|
-
│ ____
|
|
3875
|
-
base ┤_ warm\-up _
|
|
3880
|
+
│ ramp\-up ____╱ ╲____ ramp\-down
|
|
3881
|
+
│ ____╱ ╲____
|
|
3882
|
+
base ┤_ warm\-up _╱ ╲_ at base __
|
|
3876
3883
|
└┬──────────┬──────────┬──────────┬──────────┬───────────┤ \-\-duration
|
|
3877
3884
|
1 2 3 4 (5)
|
|
3878
3885
|
|
|
@@ -5058,7 +5065,7 @@ Create, run, and manage Postman mocks — in your repository or in Postman cloud
|
|
|
5058
5065
|
.B Subcommands:
|
|
5059
5066
|
.TP
|
|
5060
5067
|
.B mock generate
|
|
5061
|
-
Generate a mock from a Postman collection
|
|
5068
|
+
Generate a mock from a Postman collection, an OpenAPI file or a dataset, or from a built\-in sample shopping\-cart mock (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with \-\-workspace. Add \-\-deploy to also make it a live mock server.
|
|
5062
5069
|
.TP
|
|
5063
5070
|
.B mock run
|
|
5064
5071
|
Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).
|
|
@@ -5082,7 +5089,7 @@ Show the requests a live mock server has received and the responses it sent, usi
|
|
|
5082
5089
|
Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.
|
|
5083
5090
|
|
|
5084
5091
|
.SS "mock generate"
|
|
5085
|
-
Generate a mock from a Postman collection
|
|
5092
|
+
Generate a mock from a Postman collection, an OpenAPI file or a dataset, or from a built\-in sample shopping\-cart mock (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with \-\-workspace. Add \-\-deploy to also make it a live mock server.
|
|
5086
5093
|
|
|
5087
5094
|
.B Usage:
|
|
5088
5095
|
[sourcePath] [options]
|
|
@@ -5098,14 +5105,29 @@ Name for the mock. Taken from the source when you provide one; required for the
|
|
|
5098
5105
|
.B \-\-port <port>
|
|
5099
5106
|
Port the mock runs on (e.g. 4010) (default: 4500)
|
|
5100
5107
|
.TP
|
|
5108
|
+
.B \-\-mode <mode>
|
|
5109
|
+
How the mock behaves: static (replays examples, the default), stateful (keeps records: create, read, list, update, delete), or ai (stateful, plus realistic data and business rules; generated by Postman, needs `postman login`).
|
|
5110
|
+
.TP
|
|
5101
5111
|
.B \-\-stateful
|
|
5102
|
-
|
|
5112
|
+
Same as \-\-mode stateful. Generated offline for a local file, by Postman with \-\-workspace, \-\-spec, \-\-collection or \-\-dataset (validated, with seed data). Endpoints that are not CRUD\-shaped stay static.
|
|
5113
|
+
.TP
|
|
5114
|
+
.B \-\-instructions <text>
|
|
5115
|
+
With \-\-mode ai: guidance for the AI, e.g. "Orders can only be cancelled before they ship".
|
|
5116
|
+
.TP
|
|
5117
|
+
.B \-\-spec <specId>
|
|
5118
|
+
Generate from a spec in Postman (by id) instead of a local file. With \-\-workspace, the mock stays linked to it and is regenerated when it changes.
|
|
5119
|
+
.TP
|
|
5120
|
+
.B \-\-collection <collectionId>
|
|
5121
|
+
Generate from a collection in Postman (by id) instead of a local file. With \-\-workspace, the mock stays linked to it and is regenerated when it changes.
|
|
5122
|
+
.TP
|
|
5123
|
+
.B \-\-dataset <datasetIdOrPath>
|
|
5124
|
+
Generate from a dataset: its tables become resources and their first 20 rows the records. A dataset in Postman (by id) or a local .dataset.yaml (CSV and JSON sources). Generated by Postman in stateful (the default) or ai mode; AI sees the column names and types, never the rows.
|
|
5103
5125
|
.TP
|
|
5104
5126
|
.B \-\-force
|
|
5105
5127
|
Overwrite the mock's files if the target folder already has one
|
|
5106
5128
|
.TP
|
|
5107
5129
|
.B \-u, \-\-update <mockPath>
|
|
5108
|
-
|
|
5130
|
+
Regenerate an existing mock in place, e.g. ./postman/mocks/orders. Without a source or \-\-mode, it uses the ones the mock recorded. Cannot be used with \-\-output.
|
|
5109
5131
|
.TP
|
|
5110
5132
|
.B \-w, \-\-workspace <id>
|
|
5111
5133
|
Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with \-\-output, \-\-force, or \-\-update, except with \-\-deploy, where it only picks the workspace.
|
|
@@ -5119,11 +5141,14 @@ With \-\-deploy, let anyone with the link reach the server (default: callers nee
|
|
|
5119
5141
|
.B \-s, \-\-slug <slug>
|
|
5120
5142
|
With \-\-deploy, the short label used in the server's web address
|
|
5121
5143
|
.TP
|
|
5122
|
-
.B \-\-
|
|
5123
|
-
|
|
5144
|
+
.B \-\-timeout <ms>
|
|
5145
|
+
How long to wait for Postman to generate the mock, in milliseconds (default 75000).
|
|
5124
5146
|
.TP
|
|
5125
5147
|
.B \-\-api\-key <key>
|
|
5126
|
-
Postman API key
|
|
5148
|
+
Postman API key for anything Postman generates, saves or deploys (defaults to your `postman login` session)
|
|
5149
|
+
.TP
|
|
5150
|
+
.B \-\-json
|
|
5151
|
+
Print the result as machine\-readable data instead of a summary: the generated mock, or with \-\-deploy the live server details
|
|
5127
5152
|
.TP
|
|
5128
5153
|
.B \-x, \-\-suppress\-exit\-code
|
|
5129
5154
|
Always exit with code 0, even on failure
|
|
@@ -5137,7 +5162,11 @@ Eg. postman mock generate ./my\-collection.json
|
|
|
5137
5162
|
postman mock generate ./openapi.yaml \-n orders \-\-deploy # generate and get a live URL
|
|
5138
5163
|
postman mock generate ./openapi.yaml \-n orders \-\-deploy \-\-json # same, machine\-readable
|
|
5139
5164
|
postman mock generate ./openapi.yaml \-\-stateful # CRUD handlers backed by pm.state
|
|
5140
|
-
postman mock generate ./
|
|
5165
|
+
postman mock generate ./openapi.yaml \-\-mode ai \-\-instructions "Orders ship in 2 days"
|
|
5166
|
+
postman mock generate \-\-spec <specId> \-\-mode stateful \-w <workspaceId> # linked cloud mock
|
|
5167
|
+
postman mock generate \-\-dataset ./postman/datasets/shop/shop.dataset.yaml # rows as records
|
|
5168
|
+
postman mock generate \-\-update ./postman/mocks/orders # regenerate from its recorded source
|
|
5169
|
+
postman mock generate \-\-spec <specId> \-\-mode ai \-o ./postman/mocks/orders \-\-json
|
|
5141
5170
|
postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # save to Postman cloud
|
|
5142
5171
|
|
|
5143
5172
|
Paths can be relative (e.g. ./my\-collection.json) or absolute (e.g. /Users/me/my\-collection.json).
|
|
@@ -5668,6 +5697,8 @@ Eg. postman simulation create \-n "Checkout" \-\-mock ./postman/mocks/payments \
|
|
|
5668
5697
|
|
|
5669
5698
|
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.
|
|
5670
5699
|
|
|
5700
|
+
A <name>.context.md is written beside the .sim.yaml, holding what running this simulation has taught: the commands, the preconditions, and what a passing run still does not prove. `simulation update` renames it with the simulation and `simulation delete` removes it. An existing one is never overwritten, because it holds what earlier runs learned.
|
|
5701
|
+
|
|
5671
5702
|
|
|
5672
5703
|
.SS "simulation list"
|
|
5673
5704
|
List the simulations in your repository or Postman cloud workspace
|
|
@@ -5736,7 +5767,7 @@ Path to a file of environment variables for the mocks (relative or absolute)
|
|
|
5736
5767
|
Path to a file of global variables for the mocks (relative or absolute)
|
|
5737
5768
|
.TP
|
|
5738
5769
|
.B \-p, \-\-port <port>
|
|
5739
|
-
Port to serve on (e.g. 4010), or "auto" for a free one
|
|
5770
|
+
Port to serve on (e.g. 4010), or "auto" for a free one. Omitted, it prefers 3000 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 \-\-output ndjson's "listening" event. Binds 127.0.0.1 only, so a caller in a container or VM cannot reach it.
|
|
5740
5771
|
.TP
|
|
5741
5772
|
.B \-\-dataset <pathOrDir>
|
|
5742
5773
|
Dataset file or folder to load for pm.datasets (repeatable) (default: )
|
|
@@ -5763,22 +5794,25 @@ Show request and response headers and bodies for each request. By default each r
|
|
|
5763
5794
|
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.
|
|
5764
5795
|
.TP
|
|
5765
5796
|
.B \-\-proxy\-port <n>
|
|
5766
|
-
Port for the proxy server. Distinct from \-\-port, which is the one\-port run's own port. (default: 7001)
|
|
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. A busy port exits 1. (default: 7001)
|
|
5767
5798
|
.TP
|
|
5768
5799
|
.B \-\-scenario <name>
|
|
5769
|
-
Scenario each mock serves, sent as both pm\-mock\-scenario and x\-mock\-scenario. (default: default)
|
|
5800
|
+
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)
|
|
5770
5801
|
.TP
|
|
5771
5802
|
.B \-\-session <id>
|
|
5772
5803
|
Session id to select via the x\-mock\-session header (default: a generated id).
|
|
5773
5804
|
.TP
|
|
5774
5805
|
.B \-\-log\-format <format>
|
|
5775
|
-
Proxy request log format: text or json. (default: text)
|
|
5806
|
+
Proxy request log format: text or json. Each line carries the method, host, path, destination (a routeKey, or "passthrough"), status and duration; json adds a timestamp, the scenario and the session. (default: text)
|
|
5776
5807
|
.TP
|
|
5777
5808
|
.B \-\-log\-body
|
|
5778
5809
|
Also log each response body (truncated). Buffers full responses in memory; meant for temporary debugging, not left on by default.
|
|
5779
5810
|
.TP
|
|
5780
5811
|
.B \-\-doctor
|
|
5781
5812
|
Start the proxy, probe each available HTTP client (fetch/undici/axios/node\-fetch) to confirm it honors HTTP_PROXY/HTTPS_PROXY, then exit.
|
|
5813
|
+
.TP
|
|
5814
|
+
.B \-\-lift <cmd>
|
|
5815
|
+
Start this command behind the proxy with HTTP_PROXY, HTTPS_PROXY and NODE_EXTRA_CA_CERTS already set in its environment, instead of printing them for you to export by hand. Runs as a child process, so the variables reach the code making the calls rather than the CLI. The proxy lives exactly as long as the command and exits with its exit code.
|
|
5782
5816
|
|
|
5783
5817
|
.TP Examples:
|
|
5784
5818
|
|
|
@@ -5793,8 +5827,14 @@ Start history (source: cli): a simulation\-id run records automatically (the id
|
|
|
5793
5827
|
|
|
5794
5828
|
Eg. postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy
|
|
5795
5829
|
postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy \-\-doctor
|
|
5830
|
+
postman simulation run ./postman/simulations/checkout/checkout.sim.yaml \-\-proxy \e
|
|
5831
|
+
\-\-lift "npm start" # starts npm with the proxy variables already set
|
|
5832
|
+
|
|
5833
|
+
\-\-proxy reads the same .sim.yaml, starts the mocks on throwaway ports behind the proxy, and records no start history. The hostnames a member stands in for are its `origin:` in the .sim.yaml, as a string or a list, and a member with none is never matched, so its host reaches the real service. `simulation create` copies that value from the mock's own manifest, which is where it is declared — so adding an `origin:` to a manifest does not change a .sim.yaml that already exists. Edit the member, or recreate the simulation.
|
|
5834
|
+
|
|
5835
|
+
Because the mocks sit on throwaway ports, a manifest's own `port` is ignored. A member that does not answer within 30s gives 504 and one that cannot be reached gives 502. Ctrl+C prints the total, mocked and passed\-through request counts.
|
|
5796
5836
|
|
|
5797
|
-
\-\-proxy
|
|
5837
|
+
Every \-\-proxy\-* flag, plus \-\-scenario, \-\-session, \-\-log\-format, \-\-log\-body, \-\-doctor and \-\-lift, is inert without \-\-proxy and passing one alone is a usage error (exit 2), as is an unsupported \-\-log\-format.
|
|
5798
5838
|
|
|
5799
5839
|
|
|
5800
5840
|
.SS "simulation push"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postman-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.79.0",
|
|
4
4
|
"description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postman",
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"scripts/"
|
|
63
63
|
],
|
|
64
64
|
"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.
|
|
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"
|
|
70
70
|
}
|
|
71
71
|
}
|