postman-cli 1.52.0 → 1.54.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 (2) hide show
  1. package/man/postman.1 +236 -20
  2. package/package.json +6 -6
package/man/postman.1 CHANGED
@@ -1,4 +1,4 @@
1
- .TH POSTMAN 1 "2026-08-28" "v1.52.0" "Postman CLI Manual"
1
+ .TH POSTMAN 1 "2026-09-03" "v1.54.0" "Postman CLI Manual"
2
2
  .SH NAME
3
3
  postman \- Command\-line companion utility for Postman
4
4
  .SH SYNOPSIS
@@ -52,6 +52,65 @@ Delete the stored Postman API key.
52
52
  Specify the alias of the API key to fetch your resources using it.
53
53
  (This option is discontinued and will be removed in a future release.)
54
54
 
55
+ .SS "init"
56
+ Set up Postman artifacts and agent instructions in a repository.
57
+
58
+ .B Usage:
59
+ [options] [path]
60
+
61
+ .B Options:
62
+ .TP
63
+ .B \-\-json
64
+ Emit machine\-readable output for agents
65
+ .TP
66
+ .B \-\-dry\-run
67
+ Report what would happen without writing anything
68
+ .TP
69
+ .B \-\-no\-seed
70
+ Do not derive a spec from source
71
+ .TP
72
+ .B \-\-spec <path>
73
+ Which spec is authoritative, when more than one could be
74
+ .TP
75
+ .B \-\-visibility <status>
76
+ Create and bind a workspace non\-interactively (personal or team)
77
+ .TP
78
+ .B \-\-no\-cloud
79
+ Skip the workspace step entirely
80
+ .TP
81
+ .B \-\-report\-events
82
+ Send init analytics to Postman (requires login)
83
+
84
+ .TP Examples:
85
+
86
+ Runs entirely locally: no authentication, no network, safe in CI.
87
+
88
+ Not the same as `postman app init`, which writes a postman.config.cjs
89
+ for test\-traffic capture.
90
+
91
+ Exit codes:
92
+ 0 set up, or adopted an existing setup
93
+ 1 init could not run: bad usage, or an unexpected error
94
+ 2 several specs could be authoritative \- re\-run with \-\-spec <path>
95
+ 4 refused: postman/ holds source files, or a binding names a missing file
96
+ 5 local setup done, but the workspace \-\-visibility asked for was not made
97
+
98
+ Code 5 needs \-\-visibility: without it no workspace was requested, so nothing
99
+ can fail for not getting one. It does not mean re\-run init \- the local files
100
+ are already written.
101
+
102
+ Under \-\-json, read `exitCode` and `refusal` from the payload rather than
103
+ matching the messages on stderr. `refusal.kind` is one of
104
+ foreign\-postman\-dir, bound\-spec\-missing, spec\-hint\-unmatched.
105
+
106
+ Examples:
107
+ $ postman init
108
+ $ postman init ./services/api \-\-json
109
+ $ postman init \-\-dry\-run
110
+ $ postman init \-\-spec postman/specs/orders.yaml
111
+ $ postman init \-\-visibility personal
112
+
113
+
55
114
  .SS "collection"
56
115
  Run and test your Postman collections directly from the command line.
57
116
 
@@ -590,6 +649,9 @@ Push local workspace entities (collections, environments, specifications, and mo
590
649
  .B workspace lint
591
650
  Lint the current local Postman workspace: its configuration (.postman/resources.yaml) plus every discovered entity. Use \-\-meta to lint only the configuration.
592
651
  .TP
652
+ .B workspace create
653
+ Create a Postman workspace and bind it to this git repository.
654
+ .TP
593
655
  .B workspace pull
594
656
  Pull workspace entities from a Postman workspace into the local git\-native folder.
595
657
  .TP
@@ -689,6 +751,43 @@ The workspace ID to use for fetching governance rulesets. Defaults to the id in
689
751
  .B \-\-fix
690
752
  Apply safe autofixes to repairable workspace lint issues.
691
753
 
754
+ .SS "workspace create"
755
+ Create a Postman workspace and bind it to this git repository.
756
+
757
+ .B Usage:
758
+ [options]
759
+
760
+ .B Options:
761
+ .TP
762
+ .B \-\-visibility <status>
763
+ Required. Workspace visibility, e.g. personal or team
764
+ .TP
765
+ .B \-\-name <name>
766
+ Workspace name (defaults to owner/repo from the git remote)
767
+ .TP
768
+ .B \-\-summary <text>
769
+ Optional workspace summary
770
+ .TP
771
+ .B \-\-path <dir>
772
+ Directory to bind (defaults to the current directory)
773
+ .TP
774
+ .B \-\-no\-connect
775
+ Create the workspace without binding it to the repository
776
+ .TP
777
+ .B \-\-force
778
+ Create even when a workspace is already recorded for this repo
779
+
780
+ .TP Examples:
781
+
782
+ Requires a login (`postman login`) or POSTMAN_API_KEY.
783
+ Refuses to run on CI: create once locally and commit the binding.
784
+
785
+ Examples:
786
+ $ postman workspace create \-\-visibility personal
787
+ $ postman workspace create \-\-visibility team \-\-name "acme/orders"
788
+ $ postman workspace create \-\-visibility personal \-\-no\-connect
789
+
790
+
692
791
  .SS "workspace pull"
693
792
  Pull workspace entities from a Postman workspace into the local git\-native folder.
694
793
 
@@ -767,6 +866,12 @@ Specify an Id to a Postman Environment
767
866
  .B \-g, \-\-globals <id>
768
867
  Specify an Id to a Postman Globals
769
868
  .TP
869
+ .B \-\-setup\-collection <id>
870
+ Collection UID to run before the Postman Cloud performance test
871
+ .TP
872
+ .B \-\-teardown\-collection <id>
873
+ Collection UID to run after the Postman Cloud performance test
874
+ .TP
770
875
  .B \-\-vu\-count <count>
771
876
  Number of virtual users (default: 20)
772
877
  .TP
@@ -805,6 +910,7 @@ Example: less_than(p95, 500) or less_than(error_rate, 5)
805
910
  Examples:
806
911
  postman performance run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-vu\-count 50 \-\-duration 15
807
912
  postman performance run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-pass\-if "less_than(p95, 500)"
913
+ postman performance run 123456\-45159473\-1e45\-1f34\-5678\-1234567890ab \-\-runner postman\-cloud \-\-setup\-collection 123456\-11111111\-1111\-4111\-8111\-111111111111 \-\-teardown\-collection 123456\-22222222\-2222\-4222\-8222\-222222222222
808
914
 
809
915
 
810
916
  .SS "flows"
@@ -1849,7 +1955,7 @@ Examples:
1849
1955
 
1850
1956
 
1851
1957
  .SS "mock"
1852
- Run and manage local Postman mock servers.
1958
+ Run and manage Postman mocks, locally and in the cloud.
1853
1959
 
1854
1960
  .B Usage:
1855
1961
  [options] [command]
@@ -1857,22 +1963,28 @@ Run and manage local Postman mock servers.
1857
1963
  .B Subcommands:
1858
1964
  .TP
1859
1965
  .B mock generate
1860
- Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto\-detected. Omit the source to scaffold a sample mock with a GET /health endpoint.
1966
+ Generate a runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto\-detected. Omit the source to scaffold a sample mock with a GET /health endpoint. Writes a local mock by default, or a cloud mock with \-\-workspace.
1861
1967
  .TP
1862
1968
  .B mock run
1863
- Start a local mock server given a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.
1969
+ Start a local mock server from a cloud mock id (fetched and run locally), a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.
1970
+ .TP
1971
+ .B mock deploy
1972
+ Deploy a cloud mock into a mock server.
1864
1973
  .TP
1865
1974
  .B mock get
1866
- Show a local mock's details and run status.
1975
+ Show a mock's details: a cloud mock by id, or a local mock by path.
1867
1976
  .TP
1868
1977
  .B mock list
1869
- List local mocks found under a directory.
1978
+ List a workspace's cloud mocks, or (with a path) local mocks under a directory.
1979
+ .TP
1980
+ .B mock log
1981
+ Browse a deployed mock server's request/response logs by its id (see `mock get`).
1870
1982
  .TP
1871
1983
  .B mock delete
1872
- Permanently remove a local mock artifact.
1984
+ Permanently remove a mock: a cloud mock by id, or a local mock artifact by path.
1873
1985
 
1874
1986
  .SS "mock generate"
1875
- Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto\-detected. Omit the source to scaffold a sample mock with a GET /health endpoint.
1987
+ Generate a runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git\-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto\-detected. Omit the source to scaffold a sample mock with a GET /health endpoint. Writes a local mock by default, or a cloud mock with \-\-workspace.
1876
1988
 
1877
1989
  .B Usage:
1878
1990
  [sourcePath] [options]
@@ -1894,6 +2006,12 @@ Overwrite the config.yaml/default.js in the output directory if it already exist
1894
2006
  .B \-u, \-\-update <mockPath>
1895
2007
  Update an existing mock in place from the source: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port/scenarios. Cannot be combined with \-\-output.
1896
2008
  .TP
2009
+ .B \-w, \-\-workspace <id>
2010
+ Create a cloud mock in this Postman workspace instead of a local mock. Cannot be combined with \-\-output/\-\-force/\-\-update.
2011
+ .TP
2012
+ .B \-\-api\-key <key>
2013
+ Postman API key for \-\-workspace (defaults to the `postman login` session)
2014
+ .TP
1897
2015
  .B \-x, \-\-suppress\-exit\-code
1898
2016
  Always exit with code 0, even on failure
1899
2017
 
@@ -1904,13 +2022,14 @@ Eg. postman mock generate ./my\-collection.json
1904
2022
  postman mock generate \-\-name "My Mock" \-\-port 4010 # sample mock, custom port
1905
2023
  postman mock generate ./openapi.yaml \-\-output ./postman/mocks/api \-\-port 4010
1906
2024
  postman mock generate ./my\-collection.json \-\-update ./postman/mocks/orders
2025
+ postman mock generate ./my\-collection.json \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud mock
1907
2026
 
1908
2027
 
1909
2028
  .SS "mock run"
1910
- Start a local mock server given a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.
2029
+ Start a local mock server from a cloud mock id (fetched and run locally), a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.
1911
2030
 
1912
2031
  .B Usage:
1913
- <pathOrDir>
2032
+ <mockIdOrPath>
1914
2033
 
1915
2034
  .B Options:
1916
2035
  .TP
@@ -1922,9 +2041,13 @@ Path to a globals file (JSON or YAML) for pm.globals
1922
2041
  .TP
1923
2042
  .B \-p, \-\-port <port>
1924
2043
  Mock server port, or "auto" for an ephemeral one (default: configured port, falls back to an ephemeral one if busy).
2044
+ .TP
2045
+ .B \-\-api\-key <key>
2046
+ Postman API key for cloud mock ids (defaults to the `postman login` session)
1925
2047
 
1926
2048
  .TP Examples:
1927
- Eg. postman mock run ./postman/mocks/orders # a mock directory
2049
+ Eg. postman mock run 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud mock by id
2050
+ postman mock run ./postman/mocks/orders # a mock directory
1928
2051
  postman mock run ./postman/mock\-manifest.json
1929
2052
  postman mock run ./postman/mock\-manifest.yaml
1930
2053
  postman mock run ./manifest.json \-\-environment ./postman/environments/dev.yaml
@@ -1932,55 +2055,148 @@ Eg. postman mock run ./postman/mocks/orders # a mock directory
1932
2055
  postman mock run ./manifest.yaml \-\-port 4600 # exact port, errors if busy
1933
2056
 
1934
2057
 
2058
+ .SS "mock deploy"
2059
+ Deploy a cloud mock into a mock server.
2060
+
2061
+ .B Usage:
2062
+ <mockId> [options]
2063
+
2064
+ .B Options:
2065
+ .TP
2066
+ .B \-w, \-\-workspace <id>
2067
+ Workspace that will own the mock server (defaults to the workspace linked in .postman/resources.yaml)
2068
+ .TP
2069
+ .B \-n, \-\-name <name>
2070
+ Display name for the mock server (prompts when omitted)
2071
+ .TP
2072
+ .B \-s, \-\-slug <slug>
2073
+ Slug for the deploy URL (prompts when omitted)
2074
+ .TP
2075
+ .B \-\-public
2076
+ Deploy as a public mock (default is private; requires an x\-api\-key header)
2077
+ .TP
2078
+ .B \-\-auto\-deploy
2079
+ Re\-deploy the mock automatically whenever it changes (default off)
2080
+ .TP
2081
+ .B \-y, \-\-yes
2082
+ Accept defaults and skip all prompts (private, no auto\-deploy)
2083
+ .TP
2084
+ .B \-\-api\-key <key>
2085
+ Postman API key (defaults to the `postman login` session)
2086
+
2087
+ .TP Examples:
2088
+
2089
+ Eg. postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef # interactive prompts
2090
+ postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-slug my\-mock \-\-public
2091
+ postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-n "My Mock" \-s my\-mock \-\-auto\-deploy
2092
+ postman mock deploy 12345678\-90ab\-cdef\-1234\-567890abcdef \-s my\-mock \-y # non\-interactive
2093
+
2094
+
1935
2095
  .SS "mock get"
1936
- Show a local mock's details and run status.
2096
+ Show a mock's details: a cloud mock by id, or a local mock by path.
1937
2097
 
1938
2098
  .B Usage:
1939
- <pathOrDir> [options]
2099
+ <mockIdOrPath> [options]
1940
2100
 
1941
2101
  .B Options:
1942
2102
  .TP
2103
+ .B \-\-api\-key <key>
2104
+ Postman API key (defaults to the `postman login` session)
2105
+ .TP
1943
2106
  .B \-\-json
1944
2107
  Output the mock details as JSON instead of a table
1945
2108
 
1946
2109
  .TP Examples:
1947
2110
 
1948
- Eg. postman mock get ./postman/mocks/orders
2111
+ Eg. postman mock get 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud mock by id
2112
+ postman mock get ./postman/mocks/orders # local mock by path
1949
2113
  postman mock get ./postman/mocks/orders \-\-json
1950
2114
 
1951
2115
 
1952
2116
  .SS "mock list"
1953
- List local mocks found under a directory.
2117
+ List a workspace's cloud mocks, or (with a path) local mocks under a directory.
1954
2118
 
1955
2119
  .B Usage:
1956
2120
  [pathOrDir] [options]
1957
2121
 
1958
2122
  .B Options:
1959
2123
  .TP
2124
+ .B \-w, \-\-workspace <id>
2125
+ Workspace whose cloud mocks to list (defaults to the workspace linked in .postman/resources.yaml)
2126
+ .TP
2127
+ .B \-\-api\-key <key>
2128
+ Postman API key (defaults to the `postman login` session)
2129
+ .TP
1960
2130
  .B \-\-json
1961
2131
  Output the mock list as JSON instead of a table
1962
2132
 
1963
2133
  .TP Examples:
1964
2134
 
1965
- Eg. postman mock list
1966
- postman mock list ./postman/mocks
2135
+ Eg. postman mock list # linked workspace (cloud)
2136
+ postman mock list \-w 12345678\-90ab\-cdef\-1234\-567890abcdef # explicit workspace (cloud)
2137
+ postman mock list ./postman/mocks # local mocks under a dir
1967
2138
  postman mock list ./postman/mocks \-\-json
1968
2139
 
1969
2140
 
2141
+ .SS "mock log"
2142
+ Browse a deployed mock server's request/response logs by its id (see `mock get`).
2143
+
2144
+ .B Usage:
2145
+ <mockServerId> [options]
2146
+
2147
+ .B Options:
2148
+ .TP
2149
+ .B \-\-limit <n>
2150
+ Maximum number of log entries to show (default 50 for \-\-json/non\-interactive output)
2151
+ .TP
2152
+ .B \-\-method <method>
2153
+ Filter by HTTP method (e.g. GET, POST)
2154
+ .TP
2155
+ .B \-\-status <code|range>
2156
+ Filter by response status (e.g. 404 or 5xx)
2157
+ .TP
2158
+ .B \-\-path <pattern>
2159
+ Filter by request path (supports * and ? wildcards)
2160
+ .TP
2161
+ .B \-\-since <duration>
2162
+ Show logs from this long ago onward (e.g. 2h = the last 2 hours)
2163
+ .TP
2164
+ .B \-\-until <duration>
2165
+ Stop this long ago (e.g. 30m = exclude the most recent 30 minutes)
2166
+ .TP
2167
+ .B \-\-api\-key <key>
2168
+ Postman API key (defaults to the `postman login` session)
2169
+ .TP
2170
+ .B \-\-json
2171
+ Output logs as JSON instead of the interactive pager
2172
+
2173
+ .TP Examples:
2174
+
2175
+ Eg. postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef # interactive pager
2176
+ postman mock log 12345678\-90ab\-cdef\-1234\-567890abcdef \-\-json # outputs in JSON
2177
+ postman mock log <mockServerId> \-\-method GET \-\-path '/users/*'
2178
+ postman mock log <mockServerId> \-\-status 5xx \-\-limit 50
2179
+ postman mock log <mockServerId> \-\-since 7h \-\-until 2h # between 7h and 2h ago
2180
+
2181
+
1970
2182
  .SS "mock delete"
1971
- Permanently remove a local mock artifact.
2183
+ Permanently remove a mock: a cloud mock by id, or a local mock artifact by path.
1972
2184
 
1973
2185
  .B Usage:
1974
- <pathOrDir> [options]
2186
+ <mockIdOrPath> [options]
1975
2187
 
1976
2188
  .B Options:
1977
2189
  .TP
1978
2190
  .B \-y, \-\-yes
1979
2191
  Skip the confirmation prompt
2192
+ .TP
2193
+ .B \-\-api\-key <key>
2194
+ Postman API key for cloud mock ids (defaults to the `postman login` session)
1980
2195
 
1981
2196
  .TP Examples:
1982
2197
 
1983
- Eg. postman mock delete ./postman/mocks/orders
2198
+ Eg. postman mock delete 12345678\-90ab\-cdef\-1234\-567890abcdef # cloud mock by id
2199
+ postman mock delete ./postman/mocks/orders # local mock by path
1984
2200
  postman mock delete ./postman/mocks/orders \-\-yes
1985
2201
  postman mock delete ./postman/mocks/orders/config.yaml \-\-yes
1986
2202
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postman-cli",
3
- "version": "1.52.0",
3
+ "version": "1.54.0",
4
4
  "description": "Official Postman CLI - Command-line companion for API development, testing, and automation",
5
5
  "keywords": [
6
6
  "postman",
@@ -58,10 +58,10 @@
58
58
  "man/"
59
59
  ],
60
60
  "optionalDependencies": {
61
- "@postman/pm-bin-macos-arm64": "1.52.0",
62
- "@postman/pm-bin-macos-x64": "1.52.0",
63
- "@postman/pm-bin-linux-x64": "1.52.0",
64
- "@postman/pm-bin-linux-arm64": "1.52.0",
65
- "@postman/pm-bin-windows-x64": "1.52.0"
61
+ "@postman/pm-bin-macos-arm64": "1.54.0",
62
+ "@postman/pm-bin-macos-x64": "1.54.0",
63
+ "@postman/pm-bin-linux-x64": "1.54.0",
64
+ "@postman/pm-bin-linux-arm64": "1.54.0",
65
+ "@postman/pm-bin-windows-x64": "1.54.0"
66
66
  }
67
67
  }