postman-cli-completion 1.67.0 → 1.71.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.
@@ -1,6 +1,6 @@
1
1
  #compdef postman
2
2
  compdef _postman postman
3
- # Zsh completion for Postman CLI (postman v1.67.0)
3
+ # Zsh completion for Postman CLI (postman v1.71.0)
4
4
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
5
5
  # Source: spec/commands.json
6
6
  # https://github.com/yokawasa/postman-cli-completion
@@ -43,13 +43,14 @@ _postman() {
43
43
  sdk) _postman_sdk ;;
44
44
  mock) _postman_mock ;;
45
45
  application|app) _postman_application ;;
46
- simulate) _postman_simulate ;;
46
+ simulation) _postman_simulation ;;
47
47
  describe) _postman_describe ;;
48
48
  context-graph) _postman_context_graph ;;
49
49
  search) _postman_search ;;
50
50
  webhook) _postman_webhook ;;
51
51
  dataset) _postman_dataset ;;
52
52
  dependency) _postman_dependency ;;
53
+ secret) _postman_secret ;;
53
54
  esac
54
55
  ;;
55
56
  esac
@@ -68,7 +69,7 @@ _postman_commands() {
68
69
  'skills:Check and update the agent skills in this repository.'
69
70
  'collection:Run and test your Postman collections directly from the command line.'
70
71
  'environment:Work with local Postman environments from the command line. Also read cloud environments by ID.'
71
- 'globals:Work with local Postman globals from the command line.'
72
+ 'globals:Work with local Postman globals from the command line. Also read cloud globals by workspace.'
72
73
  'api:Publish and test your APIs directly from the command line'
73
74
  'runner:Where your monitors execute\: run and inspect your own self-hosted runners, and list the Postman-operated regions available to your team.'
74
75
  'spec:Lint and validate Specifications from the command line'
@@ -84,13 +85,14 @@ _postman_commands() {
84
85
  'mock:Create, run, and manage Postman mocks — in your repository or in Postman cloud.'
85
86
  'application:Application-level commands\: initialise config and run tests.'
86
87
  'app:Alias for application'
87
- 'simulate:Start mock servers with simulated failure scenarios.'
88
+ 'simulation:Create, run and manage simulations — serve several mocks behind one address.'
88
89
  'describe:\[Beta\] Get API context for AI coding agents directly from the command line.'
89
90
  'context-graph:Ask natural-language questions about your team'\''s Context Graph.'
90
91
  'search:Search for Postman element types (requests, collections, workspaces, and more).'
91
92
  'webhook:Create and manage Postman webhooks.'
92
93
  'dataset:Work with Postman datasets in local YAML files or the cloud.'
93
94
  'dependency:Manage workspace dependencies (Postman entities reused from other workspaces).'
95
+ 'secret:Create and manage Postman secrets in a team'\''s shared vault.'
94
96
  )
95
97
  _describe -t commands 'postman command' commands
96
98
  }
@@ -124,8 +126,8 @@ _postman_init() {
124
126
  '--no-fetch[Use the skills bundled with this CLI instead of fetching the latest]' \
125
127
  '--spec[Which spec is authoritative, when more than one could be]:path:_files -g "*.(yaml|yml|json)"' \
126
128
  '--visibility[Create and bind a workspace non-interactively (personal, team)]:status' \
127
- '--no-cloud[Skip the workspace step entirely]' \
128
- '--report-events[Send init analytics to Postman (requires login)]' \
129
+ '(-y --yes)'{-y,--yes}'[Accept the default for every question instead of asking or stopping]' \
130
+ '--report-events[Dispatch init events to the API Catalog and Application Inventory ingestion pipelines (requires login)]' \
129
131
  '(-h --help)'{-h,--help}'[display help for command]' \
130
132
  '*:path:_files -g "*.json"'
131
133
  }
@@ -207,12 +209,16 @@ _postman_collection() {
207
209
  new) _postman_collection_new ;;
208
210
  migrate) _postman_collection_migrate ;;
209
211
  lint) _postman_collection_lint ;;
212
+ ai-readiness) _postman_collection_ai_readiness ;;
210
213
  get) _postman_collection_get ;;
214
+ delete) _postman_collection_delete ;;
211
215
  publish) _postman_collection_publish ;;
212
216
  generate) _postman_collection_generate ;;
213
217
  sync) _postman_collection_sync ;;
214
218
  request) _postman_collection_request ;;
215
219
  folder) _postman_collection_folder ;;
220
+ example) _postman_collection_example ;;
221
+ import) _postman_collection_import ;;
216
222
  list) _postman_collection_list ;;
217
223
  run) _postman_collection_run ;;
218
224
  esac
@@ -226,12 +232,16 @@ _postman_collection_commands() {
226
232
  'new:Scaffold a v3 collection on disk, or create one in a cloud Postman workspace with --workspace.'
227
233
  'migrate:Migrate a v2.1 collection to the v3 format'
228
234
  'lint:Run linting on a local v3 collection at the given file or directory path.'
235
+ 'ai-readiness:Score a Postman collection for AI readiness by ID, local file path, or local-mode directory.'
229
236
  'get:Fetch a Postman collection in the V3 format and print it.'
237
+ 'delete:Delete a cloud collection by id or a local collection directory by path. Prompts unless --yes is passed.'
230
238
  'publish:Publish a cloud collection'\''s documentation (or request Community Manager approval).'
231
239
  'generate:Generate artifacts from a collection.'
232
240
  'sync:Sync artifacts generated from a collection.'
233
- 'request:Add, update, or remove requests in a local v3 collection.'
234
- 'folder:Add, update, or remove folders in a local v3 collection.'
241
+ 'request:Add, get, update, or remove requests in a local v3 collection.'
242
+ 'folder:Add, get, update, or remove folders in a local v3 collection.'
243
+ 'example:Add, update, remove, get, or list examples (saved responses) under a request.'
244
+ 'import:Import a cURL or HAR source into a v3 collection (local, or cloud with --workspace).'
235
245
  'list:List collections\: your local project'\''s collections by default, or a Postman cloud workspace'\''s collections with --workspace.'
236
246
  'run:Initiate a Postman collection run from a given ID or path.'
237
247
  )
@@ -263,6 +273,15 @@ _postman_collection_lint() {
263
273
  '*:path:_files -g "*.json"'
264
274
  }
265
275
 
276
+ _postman_collection_ai_readiness() {
277
+ _arguments \
278
+ '(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "cli", "json", "html"\]]:value' \
279
+ '--export[Write the report to this file instead of stdout. A directory receives the report under a name derived from the collection. Requires --output html.]:path:_files -g "*.json"' \
280
+ '--min-score[Exit with a non-zero code if the overall score is below this threshold (0-100).]:n' \
281
+ '(-h --help)'{-h,--help}'[display help for command]' \
282
+ '*:collectionId/Path:_files -g "*.json"'
283
+ }
284
+
266
285
  _postman_collection_get() {
267
286
  _arguments \
268
287
  '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
@@ -271,6 +290,16 @@ _postman_collection_get() {
271
290
  '*:id:'
272
291
  }
273
292
 
293
+ _postman_collection_delete() {
294
+ _arguments \
295
+ '(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
296
+ '--api-key[Postman API key, used when deleting a cloud collection]:key:_files -g "*.(pem|crt|key)"' \
297
+ '--verbose[Verbose output]' \
298
+ '--json[Output the result as JSON]' \
299
+ '(-h --help)'{-h,--help}'[display help for command]' \
300
+ '*:idOrPath:'
301
+ }
302
+
274
303
  _postman_collection_publish() {
275
304
  _arguments \
276
305
  '--target[Where to publish (default\: documentation) (default\: "documentation")]:name' \
@@ -361,6 +390,7 @@ _postman_collection_request() {
361
390
  args)
362
391
  case $words[1] in
363
392
  add) _postman_collection_request_add ;;
393
+ get) _postman_collection_request_get ;;
364
394
  update) _postman_collection_request_update ;;
365
395
  rm|remove) _postman_collection_request_rm ;;
366
396
  esac
@@ -372,6 +402,7 @@ _postman_collection_request_commands() {
372
402
  local -a sub
373
403
  sub=(
374
404
  'add:Add an empty request to a local v3 collection (set its details later with `update`).'
405
+ 'get:Show a request (any type) in a v3 collection\: its own fields, with examples and messages as references.'
375
406
  'update:Update a request in a v3 collection (only the fields you pass).'
376
407
  'rm:Remove a request (any type) from a v3 collection.'
377
408
  'remove:Alias for rm'
@@ -390,6 +421,16 @@ _postman_collection_request_add() {
390
421
  '*:request-name:'
391
422
  }
392
423
 
424
+ _postman_collection_request_get() {
425
+ _arguments \
426
+ '--collection[Target collection\: name, directory, id, cloud id, or path. Required locally; optional in cloud mode (id only).]:id|name' \
427
+ '--folder[Folder to scope a bare-name request selector, e.g. "Users/Admin" (local mode only).]:id|name|path' \
428
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
429
+ '--json[JSON output.]' \
430
+ '(-h --help)'{-h,--help}'[display help for command]' \
431
+ '*:request:'
432
+ }
433
+
393
434
  _postman_collection_request_update() {
394
435
  _arguments \
395
436
  '--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
@@ -434,6 +475,7 @@ _postman_collection_folder() {
434
475
  args)
435
476
  case $words[1] in
436
477
  add) _postman_collection_folder_add ;;
478
+ get) _postman_collection_folder_get ;;
437
479
  update) _postman_collection_folder_update ;;
438
480
  rm|remove) _postman_collection_folder_rm ;;
439
481
  esac
@@ -445,6 +487,7 @@ _postman_collection_folder_commands() {
445
487
  local -a sub
446
488
  sub=(
447
489
  'add:Add an empty folder to a local v3 collection (set its details later with `update`).'
490
+ 'get:Show a folder in a v3 collection\: its own fields and its direct children as references.'
448
491
  'update:Update a folder in a v3 collection (only the fields you pass).'
449
492
  'rm:Remove a folder from a v3 collection (recursive\: removes everything inside it).'
450
493
  'remove:Alias for rm'
@@ -462,6 +505,16 @@ _postman_collection_folder_add() {
462
505
  '*:folder-name:'
463
506
  }
464
507
 
508
+ _postman_collection_folder_get() {
509
+ _arguments \
510
+ '--collection[Target collection\: name, directory, id, cloud id, or path. Required locally; optional in cloud mode (id only).]:id|name' \
511
+ '--folder[Parent folder to scope a bare-name selector, e.g. "Users" (local mode only).]:id|name|path' \
512
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
513
+ '--json[JSON output.]' \
514
+ '(-h --help)'{-h,--help}'[display help for command]' \
515
+ '*:folder:'
516
+ }
517
+
465
518
  _postman_collection_folder_update() {
466
519
  _arguments \
467
520
  '--collection[Target collection\: name, directory, id, cloud id, or path (cloud\: id only). Required.]:id|name' \
@@ -487,6 +540,125 @@ _postman_collection_folder_rm() {
487
540
  '*:folder:'
488
541
  }
489
542
 
543
+ _postman_collection_example() {
544
+ local context state state_descr line
545
+ typeset -A opt_args
546
+ _arguments -C \
547
+ '(-h --help)'{-h,--help}'[display help for command]' \
548
+ '1: :_postman_collection_example_commands' \
549
+ '*::arg:->args'
550
+ case $state in
551
+ args)
552
+ case $words[1] in
553
+ add) _postman_collection_example_add ;;
554
+ update) _postman_collection_example_update ;;
555
+ rm|remove) _postman_collection_example_rm ;;
556
+ get) _postman_collection_example_get ;;
557
+ list) _postman_collection_example_list ;;
558
+ esac
559
+ ;;
560
+ esac
561
+ }
562
+
563
+ _postman_collection_example_commands() {
564
+ local -a sub
565
+ sub=(
566
+ 'add:Add an empty example under a request (defaults to 200 OK; set details later with `update`).'
567
+ 'update:Update an example (only the fields you pass).'
568
+ 'rm:Remove an example from a request.'
569
+ 'remove:Alias for rm'
570
+ 'get:Get a single example.'
571
+ 'list:List examples under a request.'
572
+ )
573
+ _describe -t commands 'example command' sub
574
+ }
575
+
576
+ _postman_collection_example_add() {
577
+ _arguments \
578
+ '--collection[Target collection\: name, directory, id, cloud id, or path. Required.]:id|name' \
579
+ '--request[Parent request (required). Local\: name/path/id; cloud\: id.]:id|name|path' \
580
+ '--folder[Folder to scope the request selector, e.g. "Users/Admin".]:id|name|path' \
581
+ '--type[Example type\: http (default). (default\: "http")]:type' \
582
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
583
+ '--json[JSON output.]' \
584
+ '(-h --help)'{-h,--help}'[display help for command]' \
585
+ '*:example-name:'
586
+ }
587
+
588
+ _postman_collection_example_update() {
589
+ _arguments \
590
+ '--collection[Target collection. Required.]:id|name' \
591
+ '--request[Parent request (optional; disambiguates local names / --copy-request).]:id|name|path' \
592
+ '--folder[Folder to scope the request selector.]:id|name|path' \
593
+ '--status-code[HTTP status code.]:code' \
594
+ '--status-text[HTTP status text.]:text' \
595
+ '(-d --body)'{-d,--body}'[Response body as contentType\:content.]:body' \
596
+ '--headers[Replace response headers. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
597
+ '--description[Example description.]:text' \
598
+ '--rename[Rename the example.]:name' \
599
+ '--url[Example request snapshot URL.]:url' \
600
+ '--method[Example request snapshot method.]:method' \
601
+ '--request-headers[Replace request-snapshot headers. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
602
+ '--request-param[Replace request-snapshot query params. Repeatable. (default\: \[\])]:key\:value:_files -g "*.(pem|crt|key)"' \
603
+ '--request-body[Example request snapshot body.]:body' \
604
+ '--copy-request[Refresh example.request from the parent request.]' \
605
+ '--clear-request[Remove the example.request snapshot.]' \
606
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
607
+ '--type[Example type for cloud mode\: http. (default\: "http")]:type' \
608
+ '--json[JSON output.]' \
609
+ '(-h --help)'{-h,--help}'[display help for command]' \
610
+ '*:example:'
611
+ }
612
+
613
+ _postman_collection_example_rm() {
614
+ _arguments \
615
+ '--collection[Target collection. Required.]:id|name' \
616
+ '--request[Parent request (optional; disambiguates local names).]:id|name|path' \
617
+ '--folder[Folder to scope the request selector.]:id|name|path' \
618
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
619
+ '--type[Example type for cloud mode\: http. (default\: "http")]:type' \
620
+ '--json[JSON output.]' \
621
+ '(-h --help)'{-h,--help}'[display help for command]' \
622
+ '*:example:'
623
+ }
624
+
625
+ _postman_collection_example_get() {
626
+ _arguments \
627
+ '--collection[Target collection. Required.]:id|name' \
628
+ '--request[Parent request (optional; disambiguates local names).]:id|name|path' \
629
+ '--folder[Folder to scope the request selector.]:id|name|path' \
630
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
631
+ '--type[Example type for cloud mode\: http. (default\: "http")]:type' \
632
+ '--json[JSON output.]' \
633
+ '(-h --help)'{-h,--help}'[display help for command]' \
634
+ '*:example:'
635
+ }
636
+
637
+ _postman_collection_example_list() {
638
+ _arguments \
639
+ '--collection[Target collection. Required.]:id|name' \
640
+ '--request[Parent request (required).]:id|name|path' \
641
+ '--folder[Folder to scope the request selector.]:id|name|path' \
642
+ '(-w --workspace)'{-w,--workspace}'[Target a Postman cloud workspace by id (cloud mode).]:id' \
643
+ '--type[Example type for cloud mode\: http. (default\: "http")]:type' \
644
+ '--json[JSON output.]' \
645
+ '(-h --help)'{-h,--help}'[display help for command]'
646
+ }
647
+
648
+ _postman_collection_import() {
649
+ _arguments \
650
+ '--type[Source format\: curl or har. Auto-detected from the extension/content when omitted.]:format' \
651
+ '--name[Collection display name. Defaults to a per-format fallback.]:name' \
652
+ '(-o --output)'{-o,--output}'[Output directory for the local collection (default\: postman/collections/<name>).]:dir:_files -g "*.json"' \
653
+ '(-w --workspace)'{-w,--workspace}'[Create the collection in a Postman cloud workspace by id (cloud mode).]:id' \
654
+ '--force[Overwrite an existing local target directory.]' \
655
+ '--timeout[Max time for a cloud import, in milliseconds (default 120000).]:ms' \
656
+ '--verbose[Verbose output (cloud import diagnostics).]' \
657
+ '--json[JSON output.]' \
658
+ '(-h --help)'{-h,--help}'[display help for command]' \
659
+ '*:src:'
660
+ }
661
+
490
662
  _postman_collection_list() {
491
663
  _arguments \
492
664
  '(-w --workspace)'{-w,--workspace}'[List a Postman cloud workspace'\''s collections by id. Omit to list the local project'\''s collections.]:workspaceId' \
@@ -501,9 +673,7 @@ _postman_collection_run() {
501
673
  _arguments \
502
674
  '(-e --environment)'{-e,--environment}'[Specify an Id or path to a Postman Environment]:path:_files -g "*.json"' \
503
675
  '(-g --globals)'{-g,--globals}'[Specify an Id or path to a file containing Postman Globals]:path:_files -g "*.json"' \
504
- '(-r --reporters)'{-r,--reporters}'[Specify the reporters to use for the run\: cli,json,junit,html. For multiple reporters, provide their names as a comma-separated list (E.g., -r cli,json) (default\: \["cli"\])]:reporter:(cli json junit html)' \
505
- '--output[Write a YAML-based run report to the given folder. Creates a paired `<prefix>.collection-run-summary.yaml` (refreshed during the run) and streaming `<prefix>.collection-run-executions.yaml`, where prefix defaults to `<collection-slug>-<timestamp>`. Gotcha\: --output streams run data to file and cannot be combined with the built-in reporters (-r/--reporter-*); doing so exits with an error. This keeps large runs from buffering an entire report in memory.]:folder' \
506
- '--reporter-json-structure[\[Optional\] Generate JSON report using the Newman schema. By default, JSON reports use the native structure of Postman CLI.]' \
676
+ '--output[Write a YAML-based run report to the given folder. Creates a paired `<prefix>.collection-run-summary.yaml` (refreshed during the run) and streaming `<prefix>.collection-run-executions.yaml`, where prefix defaults to `<collection-slug>-<timestamp>`. Gotcha\: --output streams run data to file, which keeps large runs from buffering an entire report in memory.]:folder' \
507
677
  '(-n --iteration-count)'{-n,--iteration-count}'[Define the number of iterations to run]:n' \
508
678
  '(-d --iteration-data)'{-d,--iteration-data}'[Specify a data file to use for iterations (either JSON or CSV)]:path:_files -g "*.(json|csv)"' \
509
679
  '--iteration-data-dataset[Path to a .dataset.yaml (local collection) or a cloud dataset id (cloud collection) whose view drives the iteration data. Mutually exclusive with --iteration-data. Requires --iteration-data-view.]:pathOrId:_files -g "*.(json|csv)"' \
@@ -514,7 +684,7 @@ _postman_collection_run() {
514
684
  '--env-var[Allows the specification of environment variables via the command line, in a key=value format (default\: \[\])]:value' \
515
685
  '--integration-id[Specify the integration id for the report. (Only supported in the US region)]:integration-id' \
516
686
  '--postman-api-key[API Key used to load the resources from the Postman API (Only supported in the US region, use '\''postman login --region'\'' to authenticate instead)]:apiKey' \
517
- '--alias[Specify the alias of the API key to fetch remote resources using it.]:alias' \
687
+ '--alias[Specify the alias of the API key to fetch remote resources using it. (This option is discontinued and will be removed in a future release.)]:alias' \
518
688
  '--bail[Specify whether or not to gracefully stop a collection run on encountering an error and whether to end the run with an error based on the optional modifier]:modifiers:(folder failure)' \
519
689
  '--ignore-redirects[Prevents Postman CLI from automatically following 3XX redirect responses]' \
520
690
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
@@ -542,20 +712,9 @@ _postman_collection_run() {
542
712
  '--simulation[Simulation id to record start history against when using --simulate.]:id' \
543
713
  '--simulate-workspace[Workspace that owns the --simulate run, for recording its start history.]:id' \
544
714
  '--no-simulate-history[Do not record the --simulate run in the simulation'\''s start history.]' \
545
- '--report-events[Upload results for git-native v3 collection runs. Analytics are sent by default]' \
546
- '--no-report-events[Do not send analytics to Postman]' \
547
- '(-h --help)'{-h,--help}'[display help for command]' \
548
- '--reporter-json-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
549
- '--reporter-junit-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
550
- '--reporter-html-export[Path to save the report for the given reporter.]:value:_files -g "*.(json|xml|html)"' \
551
- '--reporter-json-omitRequestBodies[Remove all request bodies from the report.]' \
552
- '--reporter-html-omitRequestBodies[Remove all request bodies from the report.]' \
553
- '--reporter-json-omitResponseBodies[Remove all response bodies from the report.]' \
554
- '--reporter-html-omitResponseBodies[Remove all response bodies from the report.]' \
555
- '--reporter-json-omitHeaders[Remove all request and response headers from the report.]' \
556
- '--reporter-html-omitHeaders[Remove all request and response headers from the report.]' \
557
- '--reporter-json-omitAllHeadersAndBody[Remove all request/response headers and bodies from the report.]' \
558
- '--reporter-html-omitAllHeadersAndBody[Remove all request/response headers and bodies from the report.]' \
715
+ '--report-events[Dispatch run events, including git-native v3 collection run results, to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
716
+ '--no-report-events[Do not dispatch run events to the API Catalog and Application Inventory ingestion pipelines]' \
717
+ '(-h --help)'{-h,--help}'[display help for command]' \
559
718
  '*:collectionId/Path:_files -g "*.json"'
560
719
  }
561
720
 
@@ -572,6 +731,7 @@ _postman_environment() {
572
731
  new) _postman_environment_new ;;
573
732
  list) _postman_environment_list ;;
574
733
  get) _postman_environment_get ;;
734
+ delete) _postman_environment_delete ;;
575
735
  var) _postman_environment_var ;;
576
736
  lint) _postman_environment_lint ;;
577
737
  esac
@@ -585,6 +745,7 @@ _postman_environment_commands() {
585
745
  'new:Scaffold a local environment file, or create one in a Postman workspace with --workspace.'
586
746
  'list:List environments in a Postman workspace.'
587
747
  'get:Read an environment by ID or local environment file path.'
748
+ 'delete:Delete an environment by ID or local environment file path. Prompts unless --yes is passed.'
588
749
  'var:Read and update environment variables.'
589
750
  'lint:Run linting on a local Postman environment at the given file or directory path.'
590
751
  )
@@ -615,7 +776,15 @@ _postman_environment_get() {
615
776
  _arguments \
616
777
  '--verbose[Verbose output]' \
617
778
  '--json[JSON output]' \
618
- '--show-secrets[Show secret variable values in output]' \
779
+ '(-h --help)'{-h,--help}'[display help for command]' \
780
+ '*:environment:_files -g "*.json"'
781
+ }
782
+
783
+ _postman_environment_delete() {
784
+ _arguments \
785
+ '(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
786
+ '--verbose[Verbose output]' \
787
+ '--json[JSON output]' \
619
788
  '(-h --help)'{-h,--help}'[display help for command]' \
620
789
  '*:environment:_files -g "*.json"'
621
790
  }
@@ -641,7 +810,7 @@ _postman_environment_var() {
641
810
  _postman_environment_var_commands() {
642
811
  local -a sub
643
812
  sub=(
644
- 'set:Set one variable in an environment.'
813
+ 'set:Set one variable in an environment, or link it to a shared-vault secret.'
645
814
  'get:Read one variable value from an environment.'
646
815
  'unset:Remove one variable from an environment.'
647
816
  )
@@ -651,6 +820,9 @@ _postman_environment_var_commands() {
651
820
  _postman_environment_var_set() {
652
821
  _arguments \
653
822
  '(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
823
+ '--secret-id[Link this variable to a shared-vault secret instead of an inline value (from `secret create`'\''s output).]:id' \
824
+ '--vault-id[Vault id for --secret-id (auto-resolved from --workspace when omitted).]:id' \
825
+ '(-w --workspace)'{-w,--workspace}'[Workspace to resolve --vault-id from when --secret-id is given without --vault-id (falls back to .postman/resources.yaml).]:workspaceId' \
654
826
  '--verbose[Verbose output]' \
655
827
  '--json[JSON output]' \
656
828
  '(-h --help)'{-h,--help}'[display help for command]' \
@@ -662,7 +834,6 @@ _postman_environment_var_get() {
662
834
  '(-e --environment)'{-e,--environment}'[Cloud Environment ID or local environment file path.]:environment:_files -g "*.json"' \
663
835
  '--verbose[Verbose output]' \
664
836
  '--json[JSON output]' \
665
- '--show-secrets[Show secret variable values in output]' \
666
837
  '(-h --help)'{-h,--help}'[display help for command]' \
667
838
  '*:key:_files -g "*.json"'
668
839
  }
@@ -694,6 +865,8 @@ _postman_globals() {
694
865
  case $state in
695
866
  args)
696
867
  case $words[1] in
868
+ get) _postman_globals_get ;;
869
+ var) _postman_globals_var ;;
697
870
  lint) _postman_globals_lint ;;
698
871
  esac
699
872
  ;;
@@ -703,11 +876,82 @@ _postman_globals() {
703
876
  _postman_globals_commands() {
704
877
  local -a sub
705
878
  sub=(
879
+ 'get:Read local workspace globals from the default file, or cloud globals with --workspace.'
880
+ 'var:Read and update variables in the workspace globals singleton.'
706
881
  'lint:Run linting on a local Postman globals file at the given file or directory path.'
707
882
  )
708
883
  _describe -t commands 'globals command' sub
709
884
  }
710
885
 
886
+ _postman_globals_get() {
887
+ _arguments \
888
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID to read globals from.]:workspaceId' \
889
+ '--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
890
+ '--verbose[Verbose output]' \
891
+ '--json[JSON output]' \
892
+ '(-h --help)'{-h,--help}'[display help for command]'
893
+ }
894
+
895
+ _postman_globals_var() {
896
+ local context state state_descr line
897
+ typeset -A opt_args
898
+ _arguments -C \
899
+ '(-h --help)'{-h,--help}'[display help for command]' \
900
+ '1: :_postman_globals_var_commands' \
901
+ '*::arg:->args'
902
+ case $state in
903
+ args)
904
+ case $words[1] in
905
+ set) _postman_globals_var_set ;;
906
+ get) _postman_globals_var_get ;;
907
+ unset) _postman_globals_var_unset ;;
908
+ esac
909
+ ;;
910
+ esac
911
+ }
912
+
913
+ _postman_globals_var_commands() {
914
+ local -a sub
915
+ sub=(
916
+ 'set:Set one variable in local workspace globals, or link it to a shared-vault secret.'
917
+ 'get:Read one variable from local workspace globals, or cloud globals with --workspace.'
918
+ 'unset:Remove one variable from local workspace globals, or cloud globals with --workspace.'
919
+ )
920
+ _describe -t commands 'var command' sub
921
+ }
922
+
923
+ _postman_globals_var_set() {
924
+ _arguments \
925
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be updated.]:workspaceId' \
926
+ '--secret-id[Link this variable to a shared-vault secret instead of an inline value (from `secret create`'\''s output).]:id' \
927
+ '--vault-id[Vault id for --secret-id (auto-resolved from --workspace when omitted).]:id' \
928
+ '--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
929
+ '--verbose[Verbose output]' \
930
+ '--json[JSON output]' \
931
+ '(-h --help)'{-h,--help}'[display help for command]' \
932
+ '*:value:'
933
+ }
934
+
935
+ _postman_globals_var_get() {
936
+ _arguments \
937
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be read.]:workspaceId' \
938
+ '--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
939
+ '--verbose[Verbose output]' \
940
+ '--json[JSON output]' \
941
+ '(-h --help)'{-h,--help}'[display help for command]' \
942
+ '*:key:_files -g "*.json"'
943
+ }
944
+
945
+ _postman_globals_var_unset() {
946
+ _arguments \
947
+ '(-w --workspace)'{-w,--workspace}'[Workspace ID whose cloud globals should be updated.]:workspaceId' \
948
+ '--workspace-path[Local Postman workspace path. Defaults to the current directory.]:path:_files -g "*.json"' \
949
+ '--verbose[Verbose output]' \
950
+ '--json[JSON output]' \
951
+ '(-h --help)'{-h,--help}'[display help for command]' \
952
+ '*:key:_files -g "*.json"'
953
+ }
954
+
711
955
  _postman_globals_lint() {
712
956
  _arguments \
713
957
  '(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
@@ -803,8 +1047,8 @@ _postman_runner_start() {
803
1047
  '--dataset-jdbc-driver-dir[Folder on this machine holding the JDBC driver .jar files you put there. Required to run a dataset that uses a JDBC source. Drivers are loaded only from this folder and matched by file name; driver paths saved in the dataset are ignored]:path:_files -/' \
804
1048
  '--metrics[Enable the metrics server for health checks]' \
805
1049
  '--metrics-port[Port for the metrics server (default\: "9090")]:port' \
806
- '--report-events[Accepted for compatibility; run events are reported by default]' \
807
- '--no-report-events[Do not report run events to Postman]' \
1050
+ '--report-events[Dispatch run events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
1051
+ '--no-report-events[Do not dispatch run events to the API Catalog and Application Inventory ingestion pipelines]' \
808
1052
  '(-h --help)'{-h,--help}'[display help for command]'
809
1053
  }
810
1054
 
@@ -834,6 +1078,7 @@ _postman_spec() {
834
1078
  args)
835
1079
  case $words[1] in
836
1080
  lint) _postman_spec_lint ;;
1081
+ ai-readiness) _postman_spec_ai_readiness ;;
837
1082
  list) _postman_spec_list ;;
838
1083
  get) _postman_spec_get ;;
839
1084
  file) _postman_spec_file ;;
@@ -850,9 +1095,10 @@ _postman_spec_commands() {
850
1095
  local -a sub
851
1096
  sub=(
852
1097
  'lint:Run linting on the given specification by ID or local file path.'
1098
+ 'ai-readiness:Score an OpenAPI specification for AI readiness by ID or local file path.'
853
1099
  'list:List local spec files under a path, or (no path) a workspace'\''s cloud specs.'
854
1100
  'get:Read a spec definition, including every file of a multi-file spec.'
855
- 'file:Add, update, or remove files in a spec (cloud ID or local directory).'
1101
+ 'file:Get, add, update, or remove files in a spec (cloud ID or local directory).'
856
1102
  'create:Create a new spec in a workspace, or (with path) scaffold a local spec file.'
857
1103
  'generate:Generate artifacts from a specification.'
858
1104
  'sync:Sync a generated collection with its source specification.'
@@ -866,8 +1112,17 @@ _postman_spec_lint() {
866
1112
  '(-f --fail-severity)'{-f,--fail-severity}'[Results of this level or above will trigger a failure exit code. \[choices\: "error", "warning", "info", "hint"\] (default\: "ERROR")]:value' \
867
1113
  '(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "json", "csv"\]]:value' \
868
1114
  '--workspace-id[The workspace ID to use for fetching governance rulesets.]:value' \
869
- '--report-events[Accepted for compatibility; analytics are sent by default]' \
870
- '--no-report-events[Do not send analytics to Postman]' \
1115
+ '--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
1116
+ '--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
1117
+ '(-h --help)'{-h,--help}'[display help for command]' \
1118
+ '*:spec:'
1119
+ }
1120
+
1121
+ _postman_spec_ai_readiness() {
1122
+ _arguments \
1123
+ '(-o --output)'{-o,--output}'[Output format for the results. \[choices\: "cli", "json", "html"\]]:value' \
1124
+ '--export[Write the report to this file instead of stdout. A directory receives the report under a name derived from the specification. Requires --output html.]:path:_files -g "*.json"' \
1125
+ '--min-score[Exit with a non-zero code if the overall score is below this threshold (0-100).]:n' \
871
1126
  '(-h --help)'{-h,--help}'[display help for command]' \
872
1127
  '*:spec:'
873
1128
  }
@@ -899,6 +1154,7 @@ _postman_spec_file() {
899
1154
  case $state in
900
1155
  args)
901
1156
  case $words[1] in
1157
+ get) _postman_spec_file_get ;;
902
1158
  add) _postman_spec_file_add ;;
903
1159
  update) _postman_spec_file_update ;;
904
1160
  rm) _postman_spec_file_rm ;;
@@ -910,6 +1166,7 @@ _postman_spec_file() {
910
1166
  _postman_spec_file_commands() {
911
1167
  local -a sub
912
1168
  sub=(
1169
+ 'get:Show a file in a spec\: its path, size and content.'
913
1170
  'add:Add a new file to a spec.'
914
1171
  'update:Update an existing file in a spec.'
915
1172
  'rm:Remove a file from a spec.'
@@ -917,6 +1174,14 @@ _postman_spec_file_commands() {
917
1174
  _describe -t commands 'file command' sub
918
1175
  }
919
1176
 
1177
+ _postman_spec_file_get() {
1178
+ _arguments \
1179
+ '--json[Output as JSON]' \
1180
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
1181
+ '(-h --help)'{-h,--help}'[display help for command]' \
1182
+ '*:filePath:_files -g "*.json"'
1183
+ }
1184
+
920
1185
  _postman_spec_file_add() {
921
1186
  _arguments \
922
1187
  '(-c --content)'{-c,--content}'[File content (reads from stdin if omitted)]:content' \
@@ -1017,6 +1282,7 @@ _postman_spec_sync_collection() {
1017
1282
  _arguments \
1018
1283
  '--collection-id[Collection ID to sync (required for cloud mode)]:id' \
1019
1284
  '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
1285
+ '--force[Overwrite hand-written scripts that the spec would otherwise drop]' \
1020
1286
  '(-h --help)'{-h,--help}'[display help for command]' \
1021
1287
  '*:spec:'
1022
1288
  }
@@ -1060,7 +1326,7 @@ _postman_monitor_commands() {
1060
1326
  sub=(
1061
1327
  'run:Invoke a monitor run and display results.'
1062
1328
  'create:Create a collection-based monitor.'
1063
- 'update:Update a monitor'\''s schedule, runner, notifications or run options.'
1329
+ 'update:Update a monitor'\''s schedule, runner, notifications, request selection or run options.'
1064
1330
  'delete:Permanently delete a monitor. Prompts for confirmation unless --yes is passed.'
1065
1331
  'jobs:Inspect a monitor'\''s jobs and their per-region runs.'
1066
1332
  'runs:Inspect a monitor run'\''s attempts.'
@@ -1093,6 +1359,7 @@ _postman_monitor_create() {
1093
1359
  '--schedule[Cron expression for the monitor'\''s schedule]:cron' \
1094
1360
  '--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
1095
1361
  '--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable) (default\: \[\])]:value' \
1362
+ '(-i --item)'{-i,--item}'[Id of a request or folder in the collection to run, in the order given (repeatable; ids only, not names or paths; defaults to every request; list ids with `postman collection get <collection-id> --json`) (default\: \[\])]:id' \
1096
1363
  '--notify-email[Email to notify on a run failure or error (repeatable) (default\: \[\])]:email' \
1097
1364
  '--notification-limit[Consecutive failure notifications to send before muting them]:n' \
1098
1365
  '--retry[Times to retry a failed run]:n' \
@@ -1118,6 +1385,8 @@ _postman_monitor_update() {
1118
1385
  '--schedule[New cron expression for the monitor'\''s schedule]:cron' \
1119
1386
  '--timezone[Time zone for --schedule, for example America/New_York (defaults to the host machine'\''s own zone)]:tz' \
1120
1387
  '--runner[A Postman region name (see `postman runner regions`) or the id of a self-hosted runner created in Postman (list existing ones with `postman runner list`) to run from (repeatable; replaces the current set) (default\: \[\])]:value' \
1388
+ '(-i --item)'{-i,--item}'[Id of a request or folder in the collection to run, in the order given (repeatable; ids only, not names or paths; replaces the saved selection; list ids with `postman collection get <collection-id> --json`) (default\: \[\])]:id' \
1389
+ '--clear-items[Remove the saved selection so the monitor runs every request in its collection]' \
1121
1390
  '--notify-email[Email to notify on a run failure or error (repeatable; replaces the current list) (default\: \[\])]:email' \
1122
1391
  '--clear-notifications[Remove every notification recipient]' \
1123
1392
  '(-e --environment)'{-e,--environment}'[Environment to run the monitored collection with (replaces the current one)]:id' \
@@ -1334,6 +1603,7 @@ _postman_workspace_list() {
1334
1603
  _arguments \
1335
1604
  '(-f --filter)'{-f,--filter}'[Filter workspaces by name.]:name' \
1336
1605
  '(-t --type)'{-t,--type}'[Filter workspaces by visibility type\: team, public, private, personal.]:type' \
1606
+ '--cursor[Fetch the page of workspaces that follows this cursor.]:cursor' \
1337
1607
  '--verbose[Verbose output]' \
1338
1608
  '--debug[Debug output]' \
1339
1609
  '--json[JSON output]' \
@@ -1343,6 +1613,7 @@ _postman_workspace_list() {
1343
1613
  _postman_workspace_prepare() {
1344
1614
  _arguments \
1345
1615
  '--verbose[Show detailed logging]' \
1616
+ '--json[Print the outcome as machine-readable JSON.]' \
1346
1617
  '(-h --help)'{-h,--help}'[display help for command]'
1347
1618
  }
1348
1619
 
@@ -1351,9 +1622,10 @@ _postman_workspace_push() {
1351
1622
  '--no-prepare[Skip ID validation and auto-fix before pushing]' \
1352
1623
  '(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
1353
1624
  '--push-strategy[Push strategy. "force-sync"\: mirror the whole workspace — also DELETE cloud entities that have no local counterpart (destructive). Defaults to "default" (create/update only).]:strategy' \
1625
+ '--json[Print the outcome as machine-readable JSON. Implies non-interactive\: use --yes to actually push.]' \
1354
1626
  '--verbose[Show detailed logging]' \
1355
- '--report-events[Accepted for compatibility; analytics are sent by default]' \
1356
- '--no-report-events[Do not send analytics to Postman]' \
1627
+ '--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
1628
+ '--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
1357
1629
  '(-h --help)'{-h,--help}'[display help for command]'
1358
1630
  }
1359
1631
 
@@ -1386,6 +1658,7 @@ _postman_workspace_create() {
1386
1658
  '--path[Directory to bind (defaults to the current directory)]:dir:_files -g "*.json"' \
1387
1659
  '--no-connect[Create the workspace without binding it to the repository]' \
1388
1660
  '--force[Create even when a workspace is already recorded for this repo]' \
1661
+ '--json[Print the created workspace as machine-readable JSON.]' \
1389
1662
  '(-h --help)'{-h,--help}'[display help for command]'
1390
1663
  }
1391
1664
 
@@ -1403,6 +1676,7 @@ _postman_workspace_pull() {
1403
1676
  _arguments \
1404
1677
  '(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
1405
1678
  '--source-workspace[Pull from a different source workspace.]:workspaceId' \
1679
+ '--json[Print the outcome as machine-readable JSON. Implies non-interactive\: use --yes to actually pull.]' \
1406
1680
  '--verbose[Show detailed logging]' \
1407
1681
  '(-h --help)'{-h,--help}'[display help for command]' \
1408
1682
  '*:workspaceId:'
@@ -1411,6 +1685,7 @@ _postman_workspace_pull() {
1411
1685
  _postman_workspace_connect_git() {
1412
1686
  _arguments \
1413
1687
  '--verbose[Show detailed logging]' \
1688
+ '--json[Print the outcome as machine-readable JSON.]' \
1414
1689
  '(-h --help)'{-h,--help}'[display help for command]' \
1415
1690
  '*:path:_files -g "*.json"'
1416
1691
  }
@@ -1419,6 +1694,7 @@ _postman_workspace_disconnect_git() {
1419
1694
  _arguments \
1420
1695
  '(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
1421
1696
  '--verbose[Show detailed logging]' \
1697
+ '--json[Print the outcome as machine-readable JSON. Requires --yes to actually disconnect.]' \
1422
1698
  '(-h --help)'{-h,--help}'[display help for command]' \
1423
1699
  '*:workspaceId:'
1424
1700
  }
@@ -1479,6 +1755,7 @@ _postman_performance() {
1479
1755
  case $words[1] in
1480
1756
  run) _postman_performance_run ;;
1481
1757
  list) _postman_performance_list ;;
1758
+ get) _postman_performance_get ;;
1482
1759
  esac
1483
1760
  ;;
1484
1761
  esac
@@ -1489,6 +1766,7 @@ _postman_performance_commands() {
1489
1766
  sub=(
1490
1767
  'run:Run a performance test on a collection'
1491
1768
  'list:List past performance runs for a collection, newest first.'
1769
+ 'get:Get one performance run by ID.'
1492
1770
  )
1493
1771
  _describe -t commands 'performance command' sub
1494
1772
  }
@@ -1499,9 +1777,12 @@ _postman_performance_run() {
1499
1777
  '(-g --globals)'{-g,--globals}'[Specify an Id to a Postman Globals]:id' \
1500
1778
  '--setup-collection[Collection UID to run before the performance test]:id' \
1501
1779
  '--teardown-collection[Collection UID to run after the performance test]:id' \
1502
- '--vu-count[Number of virtual users (default\: 20)]:count' \
1780
+ '--peak-vu[Peak (maximum) virtual users (default\: 20)]:count' \
1781
+ '--vu-count[Older name for --peak-vu]:count' \
1782
+ '--base-vu[Base (floor) virtual users the run starts from, 1 or more. Not for --load-profile fixed, which runs flat]:count' \
1503
1783
  '(-d --duration)'{-d,--duration}'[Duration of the performance test in minutes (default\: 1)]:minutes' \
1504
1784
  '(-p --load-profile)'{-p,--load-profile}'[Load profile type\: fixed, ramp-up, spike, peak (default\: "ramp-up")]:profile' \
1785
+ '(-s --load-segments)'{-s,--load-segments}'[Duration of each phase of the profile, comma separated, in order. ramp-up takes 2, spike 3, peak 4; fixed takes none. See the load-segment section below for which position is which phase]:durations' \
1505
1786
  '--data-file[Path to a JSON or CSV data file to use with the collection]:path:_files -g "*.json"' \
1506
1787
  '--ssl-client-cert-list[Path to a client certificates configuration file (JSON). Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
1507
1788
  '--ssl-client-cert[Path to a client certificate (PEM) for mTLS targets. Local runner only.]:path:_files -g "*.(pem|crt|key)"' \
@@ -1515,7 +1796,8 @@ _postman_performance_run() {
1515
1796
  '--postman-api-key[API Key used to load the resources from the Postman API (Only supported in the US region, use '\''postman login --region'\'' to authenticate instead)]:apiKey' \
1516
1797
  '--output[Output format for live results\: auto (default, interactive dashboard) or ndjson (one JSON object per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
1517
1798
  '--runner[Runner to execute the performance test on\: local, postman-cloud, or postman-cloud-static-ip (egress from your account region'\''s static-IP cluster) (default\: local)]:runner' \
1518
- '--pass-if[Pass condition in format\: function(metric, value). Functions\: less_than, greater_than, less_than_eq, greater_than_eq. Metrics\: avg, p90, p95, p99, error_rate, rps. Example\: less_than(p95, 500) or less_than(error_rate, 5)]:condition' \
1799
+ '--disable-unicode[Forces Unicode compliant symbols to be replaced by their plain text equivalents]' \
1800
+ '--pass-if[Pass condition in format\: function(metric, value) (repeatable; all conditions must hold). Functions\: less_than, greater_than, less_than_eq, greater_than_eq. Metrics\: avg, p90, p95, p99, error_rate, rps. Example\: less_than(p95, 500)]:condition' \
1519
1801
  '--use-mock[Redirect a variable/host to a local code mock or cloud Mock Server (repeatable). Format\: "<{{var}}|host> mock|mock-server\:<path|id> \[scenario\]" (default\: \[\])]:mapping' \
1520
1802
  '--dataset[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\: \[\])]:pathOrDir:_files -g "*.json"' \
1521
1803
  '(-h --help)'{-h,--help}'[display help for command]' \
@@ -1526,12 +1808,22 @@ _postman_performance_list() {
1526
1808
  _arguments \
1527
1809
  '(-c --collection-id)'{-c,--collection-id}'[Collection ID whose performance runs to list]:id' \
1528
1810
  '--cursor[Pagination cursor from a previous page'\''s response]:token' \
1529
- '--json[Output as JSON instead of a table]' \
1811
+ '--output[Output format\: table (default) or json (default\: "table")]:format' \
1812
+ '--json[Alias for --output json]' \
1530
1813
  '--timeout[Milliseconds to wait for the service before failing (default\: "30000")]:ms' \
1531
1814
  '(-h --help)'{-h,--help}'[display help for command]' \
1532
1815
  '*:id:'
1533
1816
  }
1534
1817
 
1818
+ _postman_performance_get() {
1819
+ _arguments \
1820
+ '--output[Output format\: table (default) or json (default\: "table")]:format' \
1821
+ '--json[Alias for --output json]' \
1822
+ '--timeout[Milliseconds to wait for the service before failing (default\: "30000")]:ms' \
1823
+ '(-h --help)'{-h,--help}'[display help for command]' \
1824
+ '*:runId:'
1825
+ }
1826
+
1535
1827
  _postman_flows() {
1536
1828
  local context state state_descr line
1537
1829
  typeset -A opt_args
@@ -1626,8 +1918,8 @@ _postman_flows_run() {
1626
1918
  '--reporters[Save a test results report to a file (supported\: html)]:format' \
1627
1919
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Specify whether or not to override the default exit code for the current run]' \
1628
1920
  '--workspace[Workspace ID required for flows that contain connector blocks. Find it in the Postman app URL\: https\://postman.com/workspace/<workspaceId>]:workspaceId' \
1629
- '--report-events[Accepted for compatibility; analytics are sent by default]' \
1630
- '--no-report-events[Do not send analytics to Postman]' \
1921
+ '--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
1922
+ '--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
1631
1923
  '--verbose[Verbose output]' \
1632
1924
  '--debug[Debug output]' \
1633
1925
  '--json[JSON output]' \
@@ -1679,6 +1971,14 @@ _postman_request() {
1679
1971
  '--redirects-max[Maximum number of redirects to follow. Default is unlimited. Useful for preventing redirect loops.]:n' \
1680
1972
  '--redirects-follow-method[Preserves the original HTTP method when following redirects. By default, redirects are followed with GET method.]' \
1681
1973
  '--redirects-remove-referrer[Removes the Referer header when following redirects. By default, Referer header is sent with redirects.]' \
1974
+ '(-k --insecure)'{-k,--insecure}'[Disable SSL certificate verification.]' \
1975
+ '--ssl-client-cert-list[Specify the path to client certificate configurations (JSON).]:path:_files -g "*.(pem|crt|key)"' \
1976
+ '--ssl-client-cert[Specify the path to a client certificate (PEM).]:path:_files -g "*.(pem|crt|key)"' \
1977
+ '--ssl-client-key[Specify the path to a client certificate private key.]:path:_files -g "*.(pem|crt|key)"' \
1978
+ '--ssl-client-passphrase[Specify the client certificate passphrase (for protected key).]:passphrase' \
1979
+ '--ssl-extra-ca-certs[Specify additional trusted CA certificates (PEM).]:path:_files -g "*.(pem|crt|key)"' \
1980
+ '--cookie-jar[Specify the path to a custom cookie jar (serialized tough-cookie JSON).]:path:_files -g "*.json"' \
1981
+ '--export-cookie-jar[Export the cookie jar to a file after completing the request.]:path:_files -g "*.json"' \
1682
1982
  '--retry[Number of retry attempts for failed requests (4xx, 5xx, network errors). Useful for flaky endpoints or rate-limited APIs. (default\: 0)]:n' \
1683
1983
  '--retry-delay[Delay between retry attempts in milliseconds. (default\: 1000)]:ms' \
1684
1984
  '--script-pre-request[Add JavaScript script to run before the request. Can be inline JS or @filepath to load from file. Scripts have access to pm.* APIs. Example\: --script-pre-request "pm.environment.set('\''timestamp'\'', Date.now());" or --script-pre-request @setup.js]:script' \
@@ -1688,8 +1988,8 @@ _postman_request() {
1688
1988
  '--verbose[Show detailed request and response information including headers, body, and metadata.]' \
1689
1989
  '--response-only[suppress all output except response body. Useful for piping to other commands.]' \
1690
1990
  '--debug[Debug mode\: show detailed execution information including retry attempts, redirects, and timing breakdowns.]' \
1691
- '--report-events[Accepted for compatibility; analytics are sent by default]' \
1692
- '--no-report-events[Do not send analytics to Postman]' \
1991
+ '--report-events[Dispatch events to the API Catalog and Application Inventory ingestion pipelines (on by default)]' \
1992
+ '--no-report-events[Do not dispatch events to the API Catalog and Application Inventory ingestion pipelines]' \
1693
1993
  '(-h --help)'{-h,--help}'[display help for command]' \
1694
1994
  '--auth-basic-username[Supply authentication parameters dynamically.]:value' \
1695
1995
  '--auth-basic-password[Supply authentication parameters dynamically.]:value' \
@@ -2047,9 +2347,9 @@ _postman_application_test() {
2047
2347
  '--network-log[Directory to scan for captured artifacts, or a direct path to a Playwright JSON report / NDJSON capture file. When a directory is given, recursively discovers `*.json` Playwright reports plus their `trace.zip` attachments, and `network-capture-*.ndjson` at the top level. By default, scans Playwright config `outputDir`, test-results/, then pm-results/.]:path:_files -g "*.json"' \
2048
2348
  '--capture-only[Skip collection matching and tests; capture traffic and save a V3 collection organised by host]' \
2049
2349
  '--output[Output directory for captured collection (default\: pm-results/captured/; used with --capture-only)]:path:_files -g "*.json"' \
2050
- '--force[Overwrite the output directory if it exists and is not empty (used with --capture-only)]' \
2051
- '--report-events[Send application test run results to Postman (default\: true)]:boolean' \
2052
- '--no-report-events[Do not send run results or analytics to Postman]' \
2350
+ '--force[Deprecated\: output directory is always overwritten on re-run (used with --capture-only)]' \
2351
+ '--report-events[Dispatch application test run results to the API Catalog and Application Inventory ingestion pipelines (on by default) (default\: true)]:boolean' \
2352
+ '--no-report-events[Do not dispatch run results to the API Catalog and Application Inventory ingestion pipelines]' \
2053
2353
  '--verbose[Show detailed per-request matching, sandbox errors, and debug information]' \
2054
2354
  '(-h --help)'{-h,--help}'[display help for command]'
2055
2355
  }
@@ -2060,38 +2360,119 @@ _postman_application_setup_capture() {
2060
2360
  '(-h --help)'{-h,--help}'[display help for command]'
2061
2361
  }
2062
2362
 
2063
- _postman_simulate() {
2363
+ _postman_simulation() {
2064
2364
  local context state state_descr line
2065
2365
  typeset -A opt_args
2066
2366
  _arguments -C \
2067
2367
  '(-h --help)'{-h,--help}'[display help for command]' \
2068
- '1: :_postman_simulate_commands' \
2368
+ '1: :_postman_simulation_commands' \
2069
2369
  '*::arg:->args'
2070
2370
  case $state in
2071
2371
  args)
2072
2372
  case $words[1] in
2073
- run) _postman_simulate_run ;;
2373
+ create) _postman_simulation_create ;;
2374
+ list) _postman_simulation_list ;;
2375
+ get) _postman_simulation_get ;;
2376
+ run) _postman_simulation_run ;;
2377
+ push) _postman_simulation_push ;;
2378
+ deploy) _postman_simulation_deploy ;;
2379
+ delete) _postman_simulation_delete ;;
2074
2380
  esac
2075
2381
  ;;
2076
2382
  esac
2077
2383
  }
2078
2384
 
2079
- _postman_simulate_commands() {
2385
+ _postman_simulation_commands() {
2080
2386
  local -a sub
2081
2387
  sub=(
2082
- 'run:Start mocks with fault-injection scenarios defined in a .sim.yaml file'
2388
+ 'create:Create a simulation that serves several mocks behind one address'
2389
+ 'list:List the simulations in your repository or Postman cloud workspace'
2390
+ 'get:Show a simulation'\''s details using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud.'
2391
+ 'run:Serve a simulation'\''s mocks on one local port, routing each by its routeKey. Pass a .sim.yaml path (local) or a Postman simulation id (fetched and run locally).'
2392
+ 'push:Upload a simulation from your repository to Postman cloud (creates it the first time, updates it after). Its member mocks are pushed too.'
2393
+ 'deploy:Turn a simulation in Postman cloud into a live mock server others can call over the internet.'
2394
+ 'delete:Delete a simulation using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
2083
2395
  )
2084
- _describe -t commands 'simulate command' sub
2396
+ _describe -t commands 'simulation command' sub
2085
2397
  }
2086
2398
 
2087
- _postman_simulate_run() {
2399
+ _postman_simulation_create() {
2088
2400
  _arguments \
2089
- '(-w --workspace)'{-w,--workspace}'[Workspace that owns the run, for recording its simulation start history.]:id' \
2090
- '--simulation[Simulation id to record start history against (a local .sim.yaml has only a name). Required, with --workspace, to record history.]:id' \
2091
- '--api-key[Postman API key for recording start history (defaults to your `postman login` session).]:key:_files -g "*.(pem|crt|key)"' \
2092
- '--no-history[Do not record this run in the simulation'\''s start history.]' \
2401
+ '(-n --name)'{-n,--name}'[Name for the simulation]:name' \
2402
+ '--mock[A mock to include (repeatable). Use a local mock path to build the simulation in your repository, or a Postman mock id to create it in Postman cloud. Set its address with <mockIdOrPath>=<routeKey>. (default\: \[\])]:mockIdOrPath:_files -g "*.json"' \
2403
+ '--routing[How callers reach each mock\: header or path (default path)]:header|path' \
2404
+ '(-o --output)'{-o,--output}'[Where to save the simulation file in your repository, a file or folder (defaults to postman/simulations)]:path:_files -g "*.json"' \
2405
+ '--force[Overwrite the simulation file if it already exists]' \
2406
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to create the simulation in, by id (defaults to the workspace already linked to this project)]:id' \
2407
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2408
+ '(-h --help)'{-h,--help}'[display help for command]'
2409
+ }
2410
+
2411
+ _postman_simulation_list() {
2412
+ _arguments \
2413
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace whose simulations to list, by id (defaults to the workspace already linked to this project)]:id' \
2414
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2415
+ '--json[Print the list as machine-readable data instead of a table]' \
2416
+ '(-h --help)'{-h,--help}'[display help for command]' \
2417
+ '*:pathOrDir:_files -g "*.json"'
2418
+ }
2419
+
2420
+ _postman_simulation_get() {
2421
+ _arguments \
2422
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2423
+ '--json[Print the details as machine-readable data instead of a table]' \
2424
+ '(-h --help)'{-h,--help}'[display help for command]' \
2425
+ '*:simIdOrPath:'
2426
+ }
2427
+
2428
+ _postman_simulation_run() {
2429
+ _arguments \
2430
+ '(-e --environment)'{-e,--environment}'[Path to a file of environment variables for the mocks (relative or absolute)]:path:_files -g "*.json"' \
2431
+ '(-g --globals)'{-g,--globals}'[Path to a file of global variables for the mocks (relative or absolute)]:path:_files -g "*.json"' \
2432
+ '(-p --port)'{-p,--port}'[Port to serve on (e.g. 4010), or "auto" for a free one (default 3000)]:port' \
2433
+ '--dataset[Dataset file or folder to load for pm.datasets (repeatable) (default\: \[\])]:pathOrDir:_files -g "*.json"' \
2434
+ '(-w --workspace)'{-w,--workspace}'[Workspace for recording start history. Derived from a simulation id or the linked project; needed only for an unlinked .sim.yaml path.]:id' \
2435
+ '--simulation[Simulation id to record start history against for a .sim.yaml path (a local file has only a name). Not needed when running by simulation id, or when the file is linked to a cloud simulation (via workspace push).]:id' \
2436
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2437
+ '--no-history[Do not record this run in the simulation'\''s start history]' \
2438
+ '--output[Live output format\: auto (default, human-readable logs) or ndjson (one JSON event per line on stdout, ending with a "summary" event — for CI or other non-interactive use) (default\: "auto")]:format' \
2439
+ '--proxy[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. Requires a simulation.yaml (routing config), not a .sim.yaml.]' \
2440
+ '--proxy-port[Port for the proxy server. Distinct from --port, which is the one-port run'\''s own port. (default\: 7001)]:n' \
2441
+ '--scenario[Scenario each mock serves, sent as both pm-mock-scenario and x-mock-scenario. (default\: "default")]:name' \
2442
+ '--session[Session id to select via the x-mock-session header (default\: a generated id).]:id' \
2443
+ '--log-format[Proxy request log format\: text or json. (default\: "text")]:format' \
2444
+ '--log-body[Also log each response body (truncated). Buffers full responses in memory; meant for temporary debugging, not left on by default.]' \
2445
+ '--doctor[Start the proxy, probe each available HTTP client (fetch/undici/axios/node-fetch) to confirm it honors HTTP_PROXY/HTTPS_PROXY, then exit.]' \
2093
2446
  '(-h --help)'{-h,--help}'[display help for command]' \
2094
- '*:filepath:_files -g "*.json"'
2447
+ '*:simIdOrPath:'
2448
+ }
2449
+
2450
+ _postman_simulation_push() {
2451
+ _arguments \
2452
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
2453
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2454
+ '(-h --help)'{-h,--help}'[display help for command]' \
2455
+ '*:simPath:'
2456
+ }
2457
+
2458
+ _postman_simulation_deploy() {
2459
+ _arguments \
2460
+ '(-w --workspace)'{-w,--workspace}'[Postman cloud workspace that will own the server, by id (defaults to the workspace already linked to this project)]:id' \
2461
+ '(-n --name)'{-n,--name}'[Name for the mock server (you are asked for one if you skip this)]:name' \
2462
+ '(-s --slug)'{-s,--slug}'[Short label used in the server'\''s web address, e.g. "my-sim" (you are asked for one if you skip this)]:slug' \
2463
+ '--private[Require a Postman API key to reach the server. Public by default.]' \
2464
+ '(-y --yes)'{-y,--yes}'[Use the defaults and skip all questions (public)]' \
2465
+ '--api-key[Postman API key (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2466
+ '(-h --help)'{-h,--help}'[display help for command]' \
2467
+ '*:simId:'
2468
+ }
2469
+
2470
+ _postman_simulation_delete() {
2471
+ _arguments \
2472
+ '(-y --yes)'{-y,--yes}'[Delete without asking for confirmation first]' \
2473
+ '--api-key[Postman API key, used with a Postman cloud id (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
2474
+ '(-h --help)'{-h,--help}'[display help for command]' \
2475
+ '*:simIdOrPath:'
2095
2476
  }
2096
2477
 
2097
2478
  _postman_describe() {
@@ -2782,7 +3163,7 @@ _postman_dataset_source_list() {
2782
3163
  _postman_dataset_source_add() {
2783
3164
  _arguments \
2784
3165
  '(-d --dataset)'{-d,--dataset}'[Dataset to add the source to; positional target is also accepted for v1.45 compatibility]:datasetPathOrId' \
2785
- '(-n --name)'{-n,--name}'[Logical name for the source (becomes the SQL table name). Required for every source except a spreadsheet, whose worksheets are each named source_<worksheet>]:name' \
3166
+ '(-n --name)'{-n,--name}'[Logical name for the source (becomes the SQL table name when it loads a file or a database --table). Required for every source except a spreadsheet, whose worksheets are each named source_<worksheet>]:name' \
2786
3167
  '--source-id[Override the generated source id (local dataset only)]:uuid' \
2787
3168
  '--format[Use this format instead of extension/type inference; file contents are not sniffed. A spreadsheet (xlsx/xls/ods) is added as one source per worksheet, each named source_<worksheet>]:csv|json|xlsx|xls|ods|jdbc|mysql|postgres|sqlserver' \
2788
3169
  '--type[Source kind; local is inferred from --file, jdbc from --driver-jar]:local|mysql|postgresql|sqlserver|jdbc' \
@@ -2808,7 +3189,7 @@ _postman_dataset_source_add() {
2808
3189
  '--user[DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
2809
3190
  '--password[DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
2810
3191
  '--database[DB database name]:db' \
2811
- '--table[DB table name (required for sqlserver)]:table' \
3192
+ '--table[DB table to load (required for sqlserver). Leave it out to connect to the whole database; query it with `dataset query -s <source>` or `dataset view create -s <source>`]:table' \
2812
3193
  '--ssh-host[SSH bastion host]:host' \
2813
3194
  '--ssh-port[SSH bastion port]:port' \
2814
3195
  '--ssh-user[SSH bastion user]:user' \
@@ -2861,7 +3242,7 @@ _postman_dataset_source_update() {
2861
3242
  '--user[Update DB user. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:user' \
2862
3243
  '--password[Update DB password. WARNING\: a literal value is visible in `ps` output and shell history, and is stored in clear text in the dataset YAML (local) or sent in the request body (cloud). Prefer a Shared Vault reference.]:password' \
2863
3244
  '--database[Update DB database name]:db' \
2864
- '--table[Update DB table name]:table' \
3245
+ '--table[Update the DB table to load. A source without a table connects to the whole database; query it with `dataset query -s <source>` or `dataset view create -s <source>`]:table' \
2865
3246
  '--ssh-host[Update SSH bastion host]:host' \
2866
3247
  '--ssh-port[Update SSH bastion port]:port' \
2867
3248
  '--ssh-user[Update SSH bastion user]:user' \
@@ -3018,6 +3399,7 @@ _postman_dependency() {
3018
3399
  args)
3019
3400
  case $words[1] in
3020
3401
  add) _postman_dependency_add ;;
3402
+ get) _postman_dependency_get ;;
3021
3403
  list) _postman_dependency_list ;;
3022
3404
  install) _postman_dependency_install ;;
3023
3405
  update) _postman_dependency_update ;;
@@ -3031,6 +3413,7 @@ _postman_dependency_commands() {
3031
3413
  local -a sub
3032
3414
  sub=(
3033
3415
  'add:Add a Postman collection, environment, or mock as a workspace dependency.'
3416
+ 'get:Show a declared workspace dependency from .postman/resources.yaml.'
3034
3417
  'list:List the workspace dependencies declared in .postman/resources.yaml.'
3035
3418
  'install:Materialise the dependencies declared in .postman/resources.yaml (all, or one).'
3036
3419
  'update:Refresh declared dependencies to the latest content from their source (all, or one).'
@@ -3048,6 +3431,14 @@ _postman_dependency_add() {
3048
3431
  '*:nameOrId:'
3049
3432
  }
3050
3433
 
3434
+ _postman_dependency_get() {
3435
+ _arguments \
3436
+ '--type[Only match dependencies of this type (collection, environment, or mock).]:type' \
3437
+ '--json[Output the result as JSON.]' \
3438
+ '(-h --help)'{-h,--help}'[display help for command]' \
3439
+ '*:nameOrId:'
3440
+ }
3441
+
3051
3442
  _postman_dependency_list() {
3052
3443
  _arguments \
3053
3444
  '--type[Only list dependencies of this type (collection, environment, or mock).]:type' \
@@ -3080,6 +3471,52 @@ _postman_dependency_remove() {
3080
3471
  '*:nameOrId:'
3081
3472
  }
3082
3473
 
3474
+ _postman_secret() {
3475
+ local context state state_descr line
3476
+ typeset -A opt_args
3477
+ _arguments -C \
3478
+ '(-h --help)'{-h,--help}'[display help for command]' \
3479
+ '1: :_postman_secret_commands' \
3480
+ '*::arg:->args'
3481
+ case $state in
3482
+ args)
3483
+ case $words[1] in
3484
+ create) _postman_secret_create ;;
3485
+ list) _postman_secret_list ;;
3486
+ esac
3487
+ ;;
3488
+ esac
3489
+ }
3490
+
3491
+ _postman_secret_commands() {
3492
+ local -a sub
3493
+ sub=(
3494
+ 'create:Create a secret in a team'\''s shared vault.'
3495
+ 'list:List the secrets in a workspace'\''s shared vault\: key, secret id, vault id, and allowed domains.'
3496
+ )
3497
+ _describe -t commands 'secret command' sub
3498
+ }
3499
+
3500
+ _postman_secret_create() {
3501
+ _arguments \
3502
+ '--team-id[Team id (defaults to your authenticated profile'\''s team; must be your own team — the vault rejects any other team id, even one you otherwise have access to)]:id' \
3503
+ '(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
3504
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
3505
+ '--terminal[Enter one secret value through the terminal instead of the default browser form]' \
3506
+ '--value-stdin[Read the secret value from stdin instead of prompting; implies --terminal]' \
3507
+ '--timeout[Seconds to wait for the browser form (default 300)]:seconds' \
3508
+ '(-h --help)'{-h,--help}'[display help for command]' \
3509
+ '*:keys...:_files -g "*.json"'
3510
+ }
3511
+
3512
+ _postman_secret_list() {
3513
+ _arguments \
3514
+ '(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
3515
+ '--api-key[Postman API key]:key:_files -g "*.(pem|crt|key)"' \
3516
+ '--json[Print the list as machine-readable JSON.]' \
3517
+ '(-h --help)'{-h,--help}'[display help for command]'
3518
+ }
3519
+
3083
3520
  # When loaded via fpath + compinit, the file body becomes the function body of
3084
3521
  # `_postman`. In that case `funcstack[1]` is `_postman` and we must actually
3085
3522
  # invoke the completion. When sourced directly, this is a no-op — `_postman`