postman-cli-completion 1.52.0 → 1.54.2

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,4 +1,4 @@
1
- # Bash completion for Postman CLI (postman v1.52.0)
1
+ # Bash completion for Postman CLI (postman v1.54.2)
2
2
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
3
3
  # Source: spec/commands.json
4
4
  # https://github.com/yokawasa/postman-cli-completion
@@ -22,7 +22,7 @@ _postman() {
22
22
  cur="${COMP_WORDS[COMP_CWORD]}"
23
23
  prev="${COMP_WORDS[COMP_CWORD-1]}"
24
24
 
25
- local top_commands="login logout collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset"
25
+ local top_commands="login logout init collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset"
26
26
  local global_flags="-v --version --silent --color -h --help -h --help"
27
27
 
28
28
  local i cmd="" subcmd=""
@@ -48,6 +48,7 @@ _postman() {
48
48
  case "$cmd" in
49
49
  login) _postman_login ;;
50
50
  logout) _postman_logout ;;
51
+ init) _postman_init ;;
51
52
  collection) _postman_collection ;;
52
53
  environment) _postman_environment ;;
53
54
  globals) _postman_globals ;;
@@ -91,6 +92,19 @@ _postman_logout() {
91
92
  esac
92
93
  }
93
94
 
95
+ _postman_init() {
96
+ if [[ "$cur" == -* ]]; then
97
+ COMPREPLY=( $(compgen -W "--json --dry-run --no-seed --spec --visibility --no-cloud --report-events -h --help" -- "$cur") )
98
+ return 0
99
+ fi
100
+ case "$prev" in
101
+ --spec)
102
+ _postman_filematch '!*.@(yaml|yml|json)' "$cur"
103
+ return 0 ;;
104
+ esac
105
+ _postman_filematch '!*.@(json)' "$cur"
106
+ }
107
+
94
108
  _postman_collection() {
95
109
  if [[ -z "$subcmd" ]]; then
96
110
  if [[ "$cur" == -* ]]; then
@@ -382,7 +396,7 @@ _postman_workspace() {
382
396
  if [[ "$cur" == -* ]]; then
383
397
  COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
384
398
  else
385
- COMPREPLY=( $(compgen -W "list prepare push lint pull connect-git" -- "$cur") )
399
+ COMPREPLY=( $(compgen -W "list prepare push lint create pull connect-git" -- "$cur") )
386
400
  fi
387
401
  return 0
388
402
  fi
@@ -391,6 +405,7 @@ _postman_workspace() {
391
405
  prepare) _postman_workspace_prepare ;;
392
406
  push) _postman_workspace_push ;;
393
407
  lint) _postman_workspace_lint ;;
408
+ create) _postman_workspace_create ;;
394
409
  pull) _postman_workspace_pull ;;
395
410
  connect-git) _postman_workspace_connect_git ;;
396
411
  esac
@@ -430,6 +445,18 @@ _postman_workspace_lint() {
430
445
  esac
431
446
  }
432
447
 
448
+ _postman_workspace_create() {
449
+ if [[ "$cur" == -* ]]; then
450
+ COMPREPLY=( $(compgen -W "--visibility --name --summary --path --no-connect --force -h --help" -- "$cur") )
451
+ return 0
452
+ fi
453
+ case "$prev" in
454
+ --path)
455
+ _postman_filematch '!*.@(json)' "$cur"
456
+ return 0 ;;
457
+ esac
458
+ }
459
+
433
460
  _postman_workspace_pull() {
434
461
  if [[ "$cur" == -* ]]; then
435
462
  COMPREPLY=( $(compgen -W "-y --yes --source-workspace --verbose -h --help" -- "$cur") )
@@ -463,7 +490,7 @@ _postman_performance() {
463
490
 
464
491
  _postman_performance_run() {
465
492
  if [[ "$cur" == -* ]]; then
466
- COMPREPLY=( $(compgen -W "-e --environment -g --globals --vu-count -d --duration -p --load-profile --data-file --dataset-id --dataset-view-id --dataset-distribution --postman-api-key --runner --pass-if -h --help" -- "$cur") )
493
+ COMPREPLY=( $(compgen -W "-e --environment -g --globals --setup-collection --teardown-collection --vu-count -d --duration -p --load-profile --data-file --dataset-id --dataset-view-id --dataset-distribution --postman-api-key --runner --pass-if -h --help" -- "$cur") )
467
494
  return 0
468
495
  fi
469
496
  case "$prev" in
@@ -724,22 +751,24 @@ _postman_mock() {
724
751
  if [[ "$cur" == -* ]]; then
725
752
  COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
726
753
  else
727
- COMPREPLY=( $(compgen -W "generate run get list delete" -- "$cur") )
754
+ COMPREPLY=( $(compgen -W "generate run deploy get list log delete" -- "$cur") )
728
755
  fi
729
756
  return 0
730
757
  fi
731
758
  case "$subcmd" in
732
759
  generate) _postman_mock_generate ;;
733
760
  run) _postman_mock_run ;;
761
+ deploy) _postman_mock_deploy ;;
734
762
  get) _postman_mock_get ;;
735
763
  list) _postman_mock_list ;;
764
+ log) _postman_mock_log ;;
736
765
  delete) _postman_mock_delete ;;
737
766
  esac
738
767
  }
739
768
 
740
769
  _postman_mock_generate() {
741
770
  if [[ "$cur" == -* ]]; then
742
- COMPREPLY=( $(compgen -W "-o --output -n --name --port --force -u --update -x --suppress-exit-code -h --help" -- "$cur") )
771
+ COMPREPLY=( $(compgen -W "-o --output -n --name --port --force -u --update -w --workspace --api-key -x --suppress-exit-code -h --help" -- "$cur") )
743
772
  return 0
744
773
  fi
745
774
  case "$prev" in
@@ -749,12 +778,15 @@ _postman_mock_generate() {
749
778
  -u|--update)
750
779
  _postman_filematch '!*.@(json)' "$cur"
751
780
  return 0 ;;
781
+ --api-key)
782
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
783
+ return 0 ;;
752
784
  esac
753
785
  }
754
786
 
755
787
  _postman_mock_run() {
756
788
  if [[ "$cur" == -* ]]; then
757
- COMPREPLY=( $(compgen -W "-e --environment -g --globals -p --port -h --help" -- "$cur") )
789
+ COMPREPLY=( $(compgen -W "-e --environment -g --globals -p --port --api-key -h --help" -- "$cur") )
758
790
  return 0
759
791
  fi
760
792
  case "$prev" in
@@ -764,31 +796,75 @@ _postman_mock_run() {
764
796
  -g|--globals)
765
797
  _postman_filematch '!*.@(json)' "$cur"
766
798
  return 0 ;;
799
+ --api-key)
800
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
801
+ return 0 ;;
802
+ esac
803
+ _postman_filematch '!*.@(json)' "$cur"
804
+ }
805
+
806
+ _postman_mock_deploy() {
807
+ if [[ "$cur" == -* ]]; then
808
+ COMPREPLY=( $(compgen -W "-w --workspace -n --name -s --slug --public --auto-deploy -y --yes --api-key -h --help" -- "$cur") )
809
+ return 0
810
+ fi
811
+ case "$prev" in
812
+ --api-key)
813
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
814
+ return 0 ;;
767
815
  esac
768
816
  _postman_filematch '!*.@(json)' "$cur"
769
817
  }
770
818
 
771
819
  _postman_mock_get() {
772
820
  if [[ "$cur" == -* ]]; then
773
- COMPREPLY=( $(compgen -W "--json -h --help" -- "$cur") )
821
+ COMPREPLY=( $(compgen -W "--api-key --json -h --help" -- "$cur") )
774
822
  return 0
775
823
  fi
824
+ case "$prev" in
825
+ --api-key)
826
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
827
+ return 0 ;;
828
+ esac
776
829
  _postman_filematch '!*.@(json)' "$cur"
777
830
  }
778
831
 
779
832
  _postman_mock_list() {
780
833
  if [[ "$cur" == -* ]]; then
781
- COMPREPLY=( $(compgen -W "--json -h --help" -- "$cur") )
834
+ COMPREPLY=( $(compgen -W "-w --workspace --api-key --json -h --help" -- "$cur") )
782
835
  return 0
783
836
  fi
837
+ case "$prev" in
838
+ --api-key)
839
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
840
+ return 0 ;;
841
+ esac
842
+ _postman_filematch '!*.@(json)' "$cur"
843
+ }
844
+
845
+ _postman_mock_log() {
846
+ if [[ "$cur" == -* ]]; then
847
+ COMPREPLY=( $(compgen -W "--limit --method --status --path --since --until --api-key --json -h --help" -- "$cur") )
848
+ return 0
849
+ fi
850
+ case "$prev" in
851
+ --api-key)
852
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
853
+ return 0 ;;
854
+ esac
784
855
  _postman_filematch '!*.@(json)' "$cur"
785
856
  }
786
857
 
787
858
  _postman_mock_delete() {
788
859
  if [[ "$cur" == -* ]]; then
789
- COMPREPLY=( $(compgen -W "-y --yes -h --help" -- "$cur") )
860
+ COMPREPLY=( $(compgen -W "-y --yes --api-key -h --help" -- "$cur") )
790
861
  return 0
791
862
  fi
863
+ case "$prev" in
864
+ --api-key)
865
+ _postman_filematch '!*.@(pem|crt|key)' "$cur"
866
+ return 0 ;;
867
+ esac
792
868
  _postman_filematch '!*.@(json)' "$cur"
793
869
  }
794
870
 
@@ -1,10 +1,10 @@
1
- # Fish completion for Postman CLI (postman v1.52.0)
1
+ # Fish completion for Postman CLI (postman v1.54.2)
2
2
  # Auto-generated by scripts/generate.mjs — DO NOT EDIT
3
3
  # Source: spec/commands.json
4
4
  # https://github.com/yokawasa/postman-cli-completion
5
5
 
6
6
  function __postman_no_subcommand
7
- not __fish_seen_subcommand_from login logout collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset
7
+ not __fish_seen_subcommand_from login logout init collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset
8
8
  end
9
9
 
10
10
  function __postman_using_subcommand
@@ -23,6 +23,7 @@ complete -c postman -n __postman_no_subcommand -s h -l help -d 'display help for
23
23
  # ---------- Top-level commands ----------
24
24
  complete -c postman -n __postman_no_subcommand -a login -d 'Authenticate with Postman to access your resources.'
25
25
  complete -c postman -n __postman_no_subcommand -a logout -d 'Delete the stored Postman API key.'
26
+ complete -c postman -n __postman_no_subcommand -a init -d 'Set up Postman artifacts and agent instructions in a repository.'
26
27
  complete -c postman -n __postman_no_subcommand -a collection -d 'Run and test your Postman collections directly from the command line.'
27
28
  complete -c postman -n __postman_no_subcommand -a environment -d 'Work with local Postman environments from the command line.'
28
29
  complete -c postman -n __postman_no_subcommand -a globals -d 'Work with local Postman globals from the command line.'
@@ -37,7 +38,7 @@ complete -c postman -n __postman_no_subcommand -a flows -d 'Manage and interact
37
38
  complete -c postman -n __postman_no_subcommand -a fl -d 'Alias for flows'
38
39
  complete -c postman -n __postman_no_subcommand -a request -d 'Send HTTP requests from the command line with full Postman capabilities including authentication, environment variables, assertions, retries, and detailed output control.'
39
40
  complete -c postman -n __postman_no_subcommand -a sdk -d 'Generate and manage your SDKs directly from the command line.'
40
- complete -c postman -n __postman_no_subcommand -a mock -d 'Run and manage local Postman mock servers.'
41
+ complete -c postman -n __postman_no_subcommand -a mock -d 'Run and manage Postman mocks, locally and in the cloud.'
41
42
  complete -c postman -n __postman_no_subcommand -a application -d 'Application-level commands: initialise config and run tests.'
42
43
  complete -c postman -n __postman_no_subcommand -a app -d 'Alias for application'
43
44
  complete -c postman -n __postman_no_subcommand -a simulate -d 'Start mock servers with simulated failure scenarios.'
@@ -57,6 +58,17 @@ complete -c postman -n '__fish_seen_subcommand_from login' -s h -l help -d 'disp
57
58
  complete -c postman -n '__fish_seen_subcommand_from logout' -l alias -d 'Specify the alias of the API key to fetch your resources using it. (This option is discontinued and will be removed in a future release.)' -x
58
59
  complete -c postman -n '__fish_seen_subcommand_from logout' -s h -l help -d 'display help for command'
59
60
 
61
+ # ---------- init ----------
62
+ complete -c postman -n '__fish_seen_subcommand_from init' -l json -d 'Emit machine-readable output for agents'
63
+ complete -c postman -n '__fish_seen_subcommand_from init' -l dry-run -d 'Report what would happen without writing anything'
64
+ complete -c postman -n '__fish_seen_subcommand_from init' -l no-seed -d 'Do not derive a spec from source'
65
+ complete -c postman -n '__fish_seen_subcommand_from init' -l spec -d 'Which spec is authoritative, when more than one could be' -r
66
+ complete -c postman -n '__fish_seen_subcommand_from init' -l visibility -d 'Create and bind a workspace non-interactively (personal or team)' -x
67
+ complete -c postman -n '__fish_seen_subcommand_from init' -l no-cloud -d 'Skip the workspace step entirely'
68
+ complete -c postman -n '__fish_seen_subcommand_from init' -l report-events -d 'Send init analytics to Postman (requires login)'
69
+ complete -c postman -n '__fish_seen_subcommand_from init' -s h -l help -d 'display help for command'
70
+ complete -c postman -n '__fish_seen_subcommand_from init' -r -k -a '(__fish_complete_suffix .json)'
71
+
60
72
  # ---------- collection ----------
61
73
  complete -c postman -n '__postman_using_subcommand collection migrate lint ai-readiness run' -a migrate -d 'Migrate a v2.1 collection to the v3 format'
62
74
  complete -c postman -n '__postman_using_subcommand collection migrate lint ai-readiness run' -a lint -d 'Run linting on a local v3 collection at the given file or directory path.'
@@ -212,12 +224,13 @@ complete -c postman -n '__fish_seen_subcommand_from monitor; and __fish_seen_sub
212
224
  complete -c postman -n '__fish_seen_subcommand_from monitor; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
213
225
 
214
226
  # ---------- workspace ----------
215
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a list -d 'List all available Postman Workspaces'
216
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a prepare -d 'Prepare local collections and environments for push by validating and regenerating IDs if needed.'
217
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a push -d 'Push local workspace entities (collections, environments, specifications, and more) to Postman workspace.'
218
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a lint -d 'Lint the current local Postman workspace: its configuration (.postman/resources.yaml) plus every discovered entity. Use --meta to lint only the configuration.'
219
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a pull -d 'Pull workspace entities from a Postman workspace into the local git-native folder.'
220
- complete -c postman -n '__postman_using_subcommand workspace list prepare push lint pull connect-git' -a connect-git -d 'Connect a Postman workspace to a local git repository.'
227
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a list -d 'List all available Postman Workspaces'
228
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a prepare -d 'Prepare local collections and environments for push by validating and regenerating IDs if needed.'
229
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a push -d 'Push local workspace entities (collections, environments, specifications, and more) to Postman workspace.'
230
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a lint -d 'Lint the current local Postman workspace: its configuration (.postman/resources.yaml) plus every discovered entity. Use --meta to lint only the configuration.'
231
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a create -d 'Create a Postman workspace and bind it to this git repository.'
232
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a pull -d 'Pull workspace entities from a Postman workspace into the local git-native folder.'
233
+ complete -c postman -n '__postman_using_subcommand workspace list prepare push lint create pull connect-git' -a connect-git -d 'Connect a Postman workspace to a local git repository.'
221
234
  complete -c postman -n '__fish_seen_subcommand_from workspace' -s h -l help -d 'display help for command'
222
235
  # ---------- workspace list ----------
223
236
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from list' -s f -l filter -d 'Filter workspaces by name.' -x
@@ -244,6 +257,14 @@ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_s
244
257
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from lint' -l workspace-id -d 'The workspace ID to use for fetching governance rulesets. Defaults to the id in .postman/resources.yaml.' -x
245
258
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from lint' -l fix -d 'Apply safe autofixes to repairable workspace lint issues.'
246
259
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from lint' -s h -l help -d 'display help for command'
260
+ # ---------- workspace create ----------
261
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l visibility -d 'Required. Workspace visibility, e.g. personal or team' -x
262
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l name -d 'Workspace name (defaults to owner/repo from the git remote)' -x
263
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l summary -d 'Optional workspace summary' -x
264
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l path -d 'Directory to bind (defaults to the current directory)' -r
265
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l no-connect -d 'Create the workspace without binding it to the repository'
266
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -l force -d 'Create even when a workspace is already recorded for this repo'
267
+ complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from create' -s h -l help -d 'display help for command'
247
268
  # ---------- workspace pull ----------
248
269
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from pull' -s y -l yes -d 'Skip all confirmation prompts'
249
270
  complete -c postman -n '__fish_seen_subcommand_from workspace; and __fish_seen_subcommand_from pull' -l source-workspace -d 'Pull from a different source workspace.' -x
@@ -260,6 +281,8 @@ complete -c postman -n '__fish_seen_subcommand_from performance' -s h -l help -d
260
281
  # ---------- performance run ----------
261
282
  complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -s e -l environment -d 'Specify an Id to a Postman Environment' -x
262
283
  complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -s g -l globals -d 'Specify an Id to a Postman Globals' -x
284
+ complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -l setup-collection -d 'Collection UID to run before the Postman Cloud performance test' -x
285
+ complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -l teardown-collection -d 'Collection UID to run after the Postman Cloud performance test' -x
263
286
  complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -l vu-count -d 'Number of virtual users (default: 20)' -x
264
287
  complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -s d -l duration -d 'Duration of the performance test in minutes (default: 1)' -x
265
288
  complete -c postman -n '__fish_seen_subcommand_from performance; and __fish_seen_subcommand_from run' -s p -l load-profile -d 'Load profile type: fixed, ramp-up, spike, peak (default: "ramp-up")' -x
@@ -483,11 +506,13 @@ complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcomm
483
506
  complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connections; and __fish_seen_subcommand_from delete' -s h -l help -d 'display help for command'
484
507
 
485
508
  # ---------- mock ----------
486
- complete -c postman -n '__postman_using_subcommand mock generate run get list delete' -a generate -d '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.'
487
- complete -c postman -n '__postman_using_subcommand mock generate run get list delete' -a run -d 'Start a local mock server given a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.'
488
- complete -c postman -n '__postman_using_subcommand mock generate run get list delete' -a get -d 'Show a local mock\'s details and run status.'
489
- complete -c postman -n '__postman_using_subcommand mock generate run get list delete' -a list -d 'List local mocks found under a directory.'
490
- complete -c postman -n '__postman_using_subcommand mock generate run get list delete' -a delete -d 'Permanently remove a local mock artifact.'
509
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a generate -d '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.'
510
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a run -d '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.'
511
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a deploy -d 'Deploy a cloud mock into a mock server.'
512
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a get -d 'Show a mock\'s details: a cloud mock by id, or a local mock by path.'
513
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a list -d 'List a workspace\'s cloud mocks, or (with a path) local mocks under a directory.'
514
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a log -d 'Browse a deployed mock server\'s request/response logs by its id (see `mock get`).'
515
+ complete -c postman -n '__postman_using_subcommand mock generate run deploy get list log delete' -a delete -d 'Permanently remove a mock: a cloud mock by id, or a local mock artifact by path.'
491
516
  complete -c postman -n '__fish_seen_subcommand_from mock' -s h -l help -d 'display help for command'
492
517
  # ---------- mock generate ----------
493
518
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s o -l output -d 'Output directory for the mock (default: postman/mocks/<slug>)' -r
@@ -495,24 +520,52 @@ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcom
495
520
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l port -d 'Port the mock server should listen on (default: 4500)' -x
496
521
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l force -d 'Overwrite the config.yaml/default.js in the output directory if it already exists'
497
522
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s u -l update -d '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.' -r
523
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s w -l workspace -d 'Create a cloud mock in this Postman workspace instead of a local mock. Cannot be combined with --output/--force/--update.' -x
524
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l api-key -d 'Postman API key for --workspace (defaults to the `postman login` session)' -r
498
525
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s x -l suppress-exit-code -d 'Always exit with code 0, even on failure'
499
526
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s h -l help -d 'display help for command'
500
527
  # ---------- mock run ----------
501
528
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s e -l environment -d 'Path to an environment file (JSON or YAML) for pm.environment' -r
502
529
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s g -l globals -d 'Path to a globals file (JSON or YAML) for pm.globals' -r
503
530
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s p -l port -d 'Mock server port, or "auto" for an ephemeral one (default: configured port, falls back to an ephemeral one if busy).' -x
531
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -l api-key -d 'Postman API key for cloud mock ids (defaults to the `postman login` session)' -r
504
532
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
505
533
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -r -k -a '(__fish_complete_suffix .json)'
534
+ # ---------- mock deploy ----------
535
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -s w -l workspace -d 'Workspace that will own the mock server (defaults to the workspace linked in .postman/resources.yaml)' -x
536
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -s n -l name -d 'Display name for the mock server (prompts when omitted)' -x
537
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -s s -l slug -d 'Slug for the deploy URL (prompts when omitted)' -x
538
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -l public -d 'Deploy as a public mock (default is private; requires an x-api-key header)'
539
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -l auto-deploy -d 'Re-deploy the mock automatically whenever it changes (default off)'
540
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -s y -l yes -d 'Accept defaults and skip all prompts (private, no auto-deploy)'
541
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -l api-key -d 'Postman API key (defaults to the `postman login` session)' -r
542
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -s h -l help -d 'display help for command'
543
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from deploy' -r -k -a '(__fish_complete_suffix .json)'
506
544
  # ---------- mock get ----------
545
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from get' -l api-key -d 'Postman API key (defaults to the `postman login` session)' -r
507
546
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from get' -l json -d 'Output the mock details as JSON instead of a table'
508
547
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from get' -s h -l help -d 'display help for command'
509
548
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from get' -r -k -a '(__fish_complete_suffix .json)'
510
549
  # ---------- mock list ----------
550
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from list' -s w -l workspace -d 'Workspace whose cloud mocks to list (defaults to the workspace linked in .postman/resources.yaml)' -x
551
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from list' -l api-key -d 'Postman API key (defaults to the `postman login` session)' -r
511
552
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from list' -l json -d 'Output the mock list as JSON instead of a table'
512
553
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from list' -s h -l help -d 'display help for command'
513
554
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from list' -r -k -a '(__fish_complete_suffix .json)'
555
+ # ---------- mock log ----------
556
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l limit -d 'Maximum number of log entries to show (default 50 for --json/non-interactive output)' -x
557
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l method -d 'Filter by HTTP method (e.g. GET, POST)' -x
558
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l status -d 'Filter by response status (e.g. 404 or 5xx)' -x
559
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l path -d 'Filter by request path (supports * and ? wildcards)' -x
560
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l since -d 'Show logs from this long ago onward (e.g. 2h = the last 2 hours)' -x
561
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l until -d 'Stop this long ago (e.g. 30m = exclude the most recent 30 minutes)' -x
562
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l api-key -d 'Postman API key (defaults to the `postman login` session)' -r
563
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -l json -d 'Output logs as JSON instead of the interactive pager'
564
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -s h -l help -d 'display help for command'
565
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from log' -r -k -a '(__fish_complete_suffix .json)'
514
566
  # ---------- mock delete ----------
515
567
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from delete' -s y -l yes -d 'Skip the confirmation prompt'
568
+ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from delete' -l api-key -d 'Postman API key for cloud mock ids (defaults to the `postman login` session)' -r
516
569
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from delete' -s h -l help -d 'display help for command'
517
570
  complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from delete' -r -k -a '(__fish_complete_suffix .json)'
518
571
 
@@ -1,6 +1,6 @@
1
1
  #compdef postman
2
2
  compdef _postman postman
3
- # Zsh completion for Postman CLI (postman v1.52.0)
3
+ # Zsh completion for Postman CLI (postman v1.54.2)
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
@@ -22,6 +22,7 @@ _postman() {
22
22
  case $words[1] in
23
23
  login) _postman_login ;;
24
24
  logout) _postman_logout ;;
25
+ init) _postman_init ;;
25
26
  collection) _postman_collection ;;
26
27
  environment) _postman_environment ;;
27
28
  globals) _postman_globals ;;
@@ -51,6 +52,7 @@ _postman_commands() {
51
52
  commands=(
52
53
  'login:Authenticate with Postman to access your resources.'
53
54
  'logout:Delete the stored Postman API key.'
55
+ 'init:Set up Postman artifacts and agent instructions in a repository.'
54
56
  'collection:Run and test your Postman collections directly from the command line.'
55
57
  'environment:Work with local Postman environments from the command line.'
56
58
  'globals:Work with local Postman globals from the command line.'
@@ -65,7 +67,7 @@ _postman_commands() {
65
67
  'fl:Alias for flows'
66
68
  'request:Send HTTP requests from the command line with full Postman capabilities including authentication, environment variables, assertions, retries, and detailed output control.'
67
69
  'sdk:Generate and manage your SDKs directly from the command line.'
68
- 'mock:Run and manage local Postman mock servers.'
70
+ 'mock:Run and manage Postman mocks, locally and in the cloud.'
69
71
  'application:Application-level commands\: initialise config and run tests.'
70
72
  'app:Alias for application'
71
73
  'simulate:Start mock servers with simulated failure scenarios.'
@@ -92,6 +94,19 @@ _postman_logout() {
92
94
  '(-h --help)'{-h,--help}'[display help for command]'
93
95
  }
94
96
 
97
+ _postman_init() {
98
+ _arguments \
99
+ '--json[Emit machine-readable output for agents]' \
100
+ '--dry-run[Report what would happen without writing anything]' \
101
+ '--no-seed[Do not derive a spec from source]' \
102
+ '--spec[Which spec is authoritative, when more than one could be]:path:_files -g "*.(yaml|yml|json)"' \
103
+ '--visibility[Create and bind a workspace non-interactively (personal or team)]:status' \
104
+ '--no-cloud[Skip the workspace step entirely]' \
105
+ '--report-events[Send init analytics to Postman (requires login)]' \
106
+ '(-h --help)'{-h,--help}'[display help for command]' \
107
+ '*:path:_files -g "*.json"'
108
+ }
109
+
95
110
  _postman_collection() {
96
111
  local context state state_descr line
97
112
  typeset -A opt_args
@@ -446,6 +461,7 @@ _postman_workspace() {
446
461
  prepare) _postman_workspace_prepare ;;
447
462
  push) _postman_workspace_push ;;
448
463
  lint) _postman_workspace_lint ;;
464
+ create) _postman_workspace_create ;;
449
465
  pull) _postman_workspace_pull ;;
450
466
  connect-git) _postman_workspace_connect_git ;;
451
467
  esac
@@ -460,6 +476,7 @@ _postman_workspace_commands() {
460
476
  'prepare:Prepare local collections and environments for push by validating and regenerating IDs if needed.'
461
477
  'push:Push local workspace entities (collections, environments, specifications, and more) to Postman workspace.'
462
478
  'lint:Lint the current local Postman workspace\: its configuration (.postman/resources.yaml) plus every discovered entity. Use --meta to lint only the configuration.'
479
+ 'create:Create a Postman workspace and bind it to this git repository.'
463
480
  'pull:Pull workspace entities from a Postman workspace into the local git-native folder.'
464
481
  'connect-git:Connect a Postman workspace to a local git repository.'
465
482
  )
@@ -503,6 +520,17 @@ _postman_workspace_lint() {
503
520
  '(-h --help)'{-h,--help}'[display help for command]'
504
521
  }
505
522
 
523
+ _postman_workspace_create() {
524
+ _arguments \
525
+ '--visibility[Required. Workspace visibility, e.g. personal or team]:status' \
526
+ '--name[Workspace name (defaults to owner/repo from the git remote)]:name' \
527
+ '--summary[Optional workspace summary]:text' \
528
+ '--path[Directory to bind (defaults to the current directory)]:dir:_files -g "*.json"' \
529
+ '--no-connect[Create the workspace without binding it to the repository]' \
530
+ '--force[Create even when a workspace is already recorded for this repo]' \
531
+ '(-h --help)'{-h,--help}'[display help for command]'
532
+ }
533
+
506
534
  _postman_workspace_pull() {
507
535
  _arguments \
508
536
  '(-y --yes)'{-y,--yes}'[Skip all confirmation prompts]' \
@@ -547,6 +575,8 @@ _postman_performance_run() {
547
575
  _arguments \
548
576
  '(-e --environment)'{-e,--environment}'[Specify an Id to a Postman Environment]:id' \
549
577
  '(-g --globals)'{-g,--globals}'[Specify an Id to a Postman Globals]:id' \
578
+ '--setup-collection[Collection UID to run before the Postman Cloud performance test]:id' \
579
+ '--teardown-collection[Collection UID to run after the Postman Cloud performance test]:id' \
550
580
  '--vu-count[Number of virtual users (default\: 20)]:count' \
551
581
  '(-d --duration)'{-d,--duration}'[Duration of the performance test in minutes (default\: 1)]:minutes' \
552
582
  '(-p --load-profile)'{-p,--load-profile}'[Load profile type\: fixed, ramp-up, spike, peak (default\: "ramp-up")]:profile' \
@@ -913,8 +943,10 @@ _postman_mock() {
913
943
  case $words[1] in
914
944
  generate) _postman_mock_generate ;;
915
945
  run) _postman_mock_run ;;
946
+ deploy) _postman_mock_deploy ;;
916
947
  get) _postman_mock_get ;;
917
948
  list) _postman_mock_list ;;
949
+ log) _postman_mock_log ;;
918
950
  delete) _postman_mock_delete ;;
919
951
  esac
920
952
  ;;
@@ -924,11 +956,13 @@ _postman_mock() {
924
956
  _postman_mock_commands() {
925
957
  local -a sub
926
958
  sub=(
927
- 'generate: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.'
928
- 'run:Start a local mock server given a manifest file (JSON or YAML), a mock directory (postman/mocks/<slug>), or a .js handler.'
929
- 'get:Show a local mock'\''s details and run status.'
930
- 'list:List local mocks found under a directory.'
931
- 'delete:Permanently remove a local mock artifact.'
959
+ 'generate: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.'
960
+ 'run: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.'
961
+ 'deploy:Deploy a cloud mock into a mock server.'
962
+ 'get:Show a mock'\''s details\: a cloud mock by id, or a local mock by path.'
963
+ 'list:List a workspace'\''s cloud mocks, or (with a path) local mocks under a directory.'
964
+ 'log:Browse a deployed mock server'\''s request/response logs by its id (see `mock get`).'
965
+ 'delete:Permanently remove a mock\: a cloud mock by id, or a local mock artifact by path.'
932
966
  )
933
967
  _describe -t commands 'mock command' sub
934
968
  }
@@ -940,6 +974,8 @@ _postman_mock_generate() {
940
974
  '--port[Port the mock server should listen on (default\: 4500)]:port' \
941
975
  '--force[Overwrite the config.yaml/default.js in the output directory if it already exists]' \
942
976
  '(-u --update)'{-u,--update}'[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.]:mockPath:_files -g "*.json"' \
977
+ '(-w --workspace)'{-w,--workspace}'[Create a cloud mock in this Postman workspace instead of a local mock. Cannot be combined with --output/--force/--update.]:id' \
978
+ '--api-key[Postman API key for --workspace (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
943
979
  '(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
944
980
  '(-h --help)'{-h,--help}'[display help for command]' \
945
981
  '*:sourcePath:'
@@ -950,29 +986,61 @@ _postman_mock_run() {
950
986
  '(-e --environment)'{-e,--environment}'[Path to an environment file (JSON or YAML) for pm.environment]:path:_files -g "*.json"' \
951
987
  '(-g --globals)'{-g,--globals}'[Path to a globals file (JSON or YAML) for pm.globals]:path:_files -g "*.json"' \
952
988
  '(-p --port)'{-p,--port}'[Mock server port, or "auto" for an ephemeral one (default\: configured port, falls back to an ephemeral one if busy).]:port' \
989
+ '--api-key[Postman API key for cloud mock ids (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
953
990
  '(-h --help)'{-h,--help}'[display help for command]' \
954
- '*:pathOrDir:_files -g "*.json"'
991
+ '*:mockIdOrPath:_files -g "*.json"'
992
+ }
993
+
994
+ _postman_mock_deploy() {
995
+ _arguments \
996
+ '(-w --workspace)'{-w,--workspace}'[Workspace that will own the mock server (defaults to the workspace linked in .postman/resources.yaml)]:id' \
997
+ '(-n --name)'{-n,--name}'[Display name for the mock server (prompts when omitted)]:name' \
998
+ '(-s --slug)'{-s,--slug}'[Slug for the deploy URL (prompts when omitted)]:slug' \
999
+ '--public[Deploy as a public mock (default is private; requires an x-api-key header)]' \
1000
+ '--auto-deploy[Re-deploy the mock automatically whenever it changes (default off)]' \
1001
+ '(-y --yes)'{-y,--yes}'[Accept defaults and skip all prompts (private, no auto-deploy)]' \
1002
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1003
+ '(-h --help)'{-h,--help}'[display help for command]' \
1004
+ '*:mockId:_files -g "*.json"'
955
1005
  }
956
1006
 
957
1007
  _postman_mock_get() {
958
1008
  _arguments \
1009
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
959
1010
  '--json[Output the mock details as JSON instead of a table]' \
960
1011
  '(-h --help)'{-h,--help}'[display help for command]' \
961
- '*:pathOrDir:_files -g "*.json"'
1012
+ '*:mockIdOrPath:_files -g "*.json"'
962
1013
  }
963
1014
 
964
1015
  _postman_mock_list() {
965
1016
  _arguments \
1017
+ '(-w --workspace)'{-w,--workspace}'[Workspace whose cloud mocks to list (defaults to the workspace linked in .postman/resources.yaml)]:id' \
1018
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
966
1019
  '--json[Output the mock list as JSON instead of a table]' \
967
1020
  '(-h --help)'{-h,--help}'[display help for command]' \
968
1021
  '*:pathOrDir:_files -g "*.json"'
969
1022
  }
970
1023
 
1024
+ _postman_mock_log() {
1025
+ _arguments \
1026
+ '--limit[Maximum number of log entries to show (default 50 for --json/non-interactive output)]:n' \
1027
+ '--method[Filter by HTTP method (e.g. GET, POST)]:method' \
1028
+ '--status[Filter by response status (e.g. 404 or 5xx)]:code|range' \
1029
+ '--path[Filter by request path (supports * and ? wildcards)]:pattern' \
1030
+ '--since[Show logs from this long ago onward (e.g. 2h = the last 2 hours)]:duration' \
1031
+ '--until[Stop this long ago (e.g. 30m = exclude the most recent 30 minutes)]:duration' \
1032
+ '--api-key[Postman API key (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
1033
+ '--json[Output logs as JSON instead of the interactive pager]' \
1034
+ '(-h --help)'{-h,--help}'[display help for command]' \
1035
+ '*:mockServerId:_files -g "*.json"'
1036
+ }
1037
+
971
1038
  _postman_mock_delete() {
972
1039
  _arguments \
973
1040
  '(-y --yes)'{-y,--yes}'[Skip the confirmation prompt]' \
1041
+ '--api-key[Postman API key for cloud mock ids (defaults to the `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
974
1042
  '(-h --help)'{-h,--help}'[display help for command]' \
975
- '*:pathOrDir:_files -g "*.json"'
1043
+ '*:mockIdOrPath:_files -g "*.json"'
976
1044
  }
977
1045
 
978
1046
  _postman_application() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postman-cli-completion",
3
- "version": "1.52.0",
3
+ "version": "1.54.2",
4
4
  "description": "Shell completions for the Postman CLI (zsh, bash, fish)",
5
5
  "type": "module",
6
6
  "bin": {