@sonisoft/now-sdk-ext-cli 3.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +500 -164
  2. package/bin/argv-guard.js +25 -0
  3. package/bin/argv-secrets.js +103 -0
  4. package/bin/credstore-boot.js +67 -0
  5. package/bin/dev.js +8 -0
  6. package/bin/run.js +8 -0
  7. package/dist/commands/auth/delete.d.ts +17 -0
  8. package/dist/commands/auth/delete.d.ts.map +1 -0
  9. package/dist/commands/auth/delete.js +34 -0
  10. package/dist/commands/auth/delete.js.map +1 -0
  11. package/dist/commands/auth/doctor.d.ts +23 -0
  12. package/dist/commands/auth/doctor.d.ts.map +1 -0
  13. package/dist/commands/auth/doctor.js +87 -0
  14. package/dist/commands/auth/doctor.js.map +1 -0
  15. package/dist/commands/auth/list.d.ts +15 -0
  16. package/dist/commands/auth/list.d.ts.map +1 -0
  17. package/dist/commands/auth/list.js +42 -0
  18. package/dist/commands/auth/list.js.map +1 -0
  19. package/dist/commands/auth/use.d.ts +16 -0
  20. package/dist/commands/auth/use.d.ts.map +1 -0
  21. package/dist/commands/auth/use.js +20 -0
  22. package/dist/commands/auth/use.js.map +1 -0
  23. package/dist/common/authenticated-command.d.ts +10 -0
  24. package/dist/common/authenticated-command.d.ts.map +1 -1
  25. package/dist/common/authenticated-command.js +65 -12
  26. package/dist/common/authenticated-command.js.map +1 -1
  27. package/dist/common/cred-store-flag.d.ts +17 -0
  28. package/dist/common/cred-store-flag.d.ts.map +1 -0
  29. package/dist/common/cred-store-flag.js +23 -0
  30. package/dist/common/cred-store-flag.js.map +1 -0
  31. package/dist/common/scope-autocomplete.d.ts.map +1 -1
  32. package/dist/common/scope-autocomplete.js +8 -0
  33. package/dist/common/scope-autocomplete.js.map +1 -1
  34. package/oclif.manifest.json +1550 -825
  35. package/package.json +3 -2
@@ -36,6 +36,14 @@
36
36
  "multiple": false,
37
37
  "type": "option"
38
38
  },
39
+ "cred-store": {
40
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
41
+ "helpGroup": "GLOBAL",
42
+ "name": "cred-store",
43
+ "required": false,
44
+ "allowNo": false,
45
+ "type": "boolean"
46
+ },
39
47
  "log-level": {
40
48
  "helpGroup": "GLOBAL",
41
49
  "name": "log-level",
@@ -123,6 +131,14 @@
123
131
  "multiple": false,
124
132
  "type": "option"
125
133
  },
134
+ "cred-store": {
135
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
136
+ "helpGroup": "GLOBAL",
137
+ "name": "cred-store",
138
+ "required": false,
139
+ "allowNo": false,
140
+ "type": "boolean"
141
+ },
126
142
  "log-level": {
127
143
  "helpGroup": "GLOBAL",
128
144
  "name": "log-level",
@@ -275,6 +291,14 @@
275
291
  "multiple": false,
276
292
  "type": "option"
277
293
  },
294
+ "cred-store": {
295
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
296
+ "helpGroup": "GLOBAL",
297
+ "name": "cred-store",
298
+ "required": false,
299
+ "allowNo": false,
300
+ "type": "boolean"
301
+ },
278
302
  "log-level": {
279
303
  "helpGroup": "GLOBAL",
280
304
  "name": "log-level",
@@ -366,191 +390,6 @@
366
390
  "query.js"
367
391
  ]
368
392
  },
369
- "atf": {
370
- "aliases": [],
371
- "args": {},
372
- "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
373
- "examples": [
374
- {
375
- "description": "Execute a single ATF test by sys_id",
376
- "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
377
- },
378
- {
379
- "description": "Execute a test suite by sys_id and wait for completion",
380
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
381
- },
382
- {
383
- "description": "Execute a test suite by name",
384
- "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
385
- },
386
- {
387
- "description": "Execute with specific browser configuration",
388
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
389
- },
390
- {
391
- "description": "Execute as performance test with JSON output for CI/CD",
392
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
393
- },
394
- {
395
- "description": "Execute with custom poll interval (10 seconds)",
396
- "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
397
- }
398
- ],
399
- "flags": {
400
- "json": {
401
- "char": "j",
402
- "description": "Output results as JSON",
403
- "name": "json",
404
- "required": false,
405
- "allowNo": false,
406
- "type": "boolean"
407
- },
408
- "auth": {
409
- "char": "a",
410
- "description": "Auth alias to use.",
411
- "name": "auth",
412
- "required": false,
413
- "hasDynamicHelp": false,
414
- "multiple": false,
415
- "type": "option"
416
- },
417
- "log-level": {
418
- "helpGroup": "GLOBAL",
419
- "name": "log-level",
420
- "summary": "Specify level for logging.",
421
- "default": "info",
422
- "hasDynamicHelp": false,
423
- "multiple": false,
424
- "options": [
425
- "debug",
426
- "warn",
427
- "error",
428
- "info",
429
- "trace"
430
- ],
431
- "type": "option"
432
- },
433
- "test-id": {
434
- "char": "t",
435
- "description": "Test sys_id to execute",
436
- "exclusive": [
437
- "suite-id",
438
- "suite-name"
439
- ],
440
- "name": "test-id",
441
- "required": false,
442
- "hasDynamicHelp": false,
443
- "multiple": false,
444
- "type": "option"
445
- },
446
- "suite-id": {
447
- "char": "s",
448
- "description": "Test Suite sys_id to execute",
449
- "exclusive": [
450
- "test-id",
451
- "suite-name"
452
- ],
453
- "name": "suite-id",
454
- "required": false,
455
- "hasDynamicHelp": false,
456
- "multiple": false,
457
- "type": "option"
458
- },
459
- "suite-name": {
460
- "char": "n",
461
- "description": "Test Suite name to execute",
462
- "exclusive": [
463
- "test-id",
464
- "suite-id"
465
- ],
466
- "name": "suite-name",
467
- "required": false,
468
- "hasDynamicHelp": false,
469
- "multiple": false,
470
- "type": "option"
471
- },
472
- "wait": {
473
- "char": "w",
474
- "description": "Wait for test suite execution to complete and return results",
475
- "name": "wait",
476
- "required": false,
477
- "allowNo": false,
478
- "type": "boolean"
479
- },
480
- "poll-interval": {
481
- "char": "p",
482
- "description": "Polling interval in milliseconds when waiting for completion",
483
- "name": "poll-interval",
484
- "required": false,
485
- "default": 5000,
486
- "hasDynamicHelp": false,
487
- "multiple": false,
488
- "type": "option"
489
- },
490
- "browser": {
491
- "char": "b",
492
- "description": "Browser name for test execution (e.g., chrome, firefox)",
493
- "name": "browser",
494
- "required": false,
495
- "hasDynamicHelp": false,
496
- "multiple": false,
497
- "type": "option"
498
- },
499
- "browser-version": {
500
- "description": "Browser version for test execution",
501
- "name": "browser-version",
502
- "required": false,
503
- "hasDynamicHelp": false,
504
- "multiple": false,
505
- "type": "option"
506
- },
507
- "os-name": {
508
- "description": "Operating system name for test execution",
509
- "name": "os-name",
510
- "required": false,
511
- "hasDynamicHelp": false,
512
- "multiple": false,
513
- "type": "option"
514
- },
515
- "os-version": {
516
- "description": "Operating system version for test execution",
517
- "name": "os-version",
518
- "required": false,
519
- "hasDynamicHelp": false,
520
- "multiple": false,
521
- "type": "option"
522
- },
523
- "performance": {
524
- "description": "Run as performance test",
525
- "name": "performance",
526
- "required": false,
527
- "allowNo": false,
528
- "type": "boolean"
529
- },
530
- "cloud": {
531
- "description": "Run in cloud",
532
- "name": "cloud",
533
- "required": false,
534
- "allowNo": false,
535
- "type": "boolean"
536
- }
537
- },
538
- "hasDynamicHelp": false,
539
- "hiddenAliases": [],
540
- "id": "atf",
541
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
542
- "pluginName": "@sonisoft/now-sdk-ext-cli",
543
- "pluginType": "core",
544
- "strict": true,
545
- "enableJsonFlag": true,
546
- "isESM": true,
547
- "relativePath": [
548
- "dist",
549
- "commands",
550
- "atf",
551
- "index.js"
552
- ]
553
- },
554
393
  "app": {
555
394
  "aliases": [],
556
395
  "args": {},
@@ -586,6 +425,14 @@
586
425
  "multiple": false,
587
426
  "type": "option"
588
427
  },
428
+ "cred-store": {
429
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
430
+ "helpGroup": "GLOBAL",
431
+ "name": "cred-store",
432
+ "required": false,
433
+ "allowNo": false,
434
+ "type": "boolean"
435
+ },
589
436
  "log-level": {
590
437
  "helpGroup": "GLOBAL",
591
438
  "name": "log-level",
@@ -680,6 +527,14 @@
680
527
  "multiple": false,
681
528
  "type": "option"
682
529
  },
530
+ "cred-store": {
531
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
532
+ "helpGroup": "GLOBAL",
533
+ "name": "cred-store",
534
+ "required": false,
535
+ "allowNo": false,
536
+ "type": "boolean"
537
+ },
683
538
  "log-level": {
684
539
  "helpGroup": "GLOBAL",
685
540
  "name": "log-level",
@@ -773,6 +628,14 @@
773
628
  "multiple": false,
774
629
  "type": "option"
775
630
  },
631
+ "cred-store": {
632
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
633
+ "helpGroup": "GLOBAL",
634
+ "name": "cred-store",
635
+ "required": false,
636
+ "allowNo": false,
637
+ "type": "boolean"
638
+ },
776
639
  "log-level": {
777
640
  "helpGroup": "GLOBAL",
778
641
  "name": "log-level",
@@ -895,6 +758,14 @@
895
758
  "multiple": false,
896
759
  "type": "option"
897
760
  },
761
+ "cred-store": {
762
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
763
+ "helpGroup": "GLOBAL",
764
+ "name": "cred-store",
765
+ "required": false,
766
+ "allowNo": false,
767
+ "type": "boolean"
768
+ },
898
769
  "log-level": {
899
770
  "helpGroup": "GLOBAL",
900
771
  "name": "log-level",
@@ -979,6 +850,14 @@
979
850
  "multiple": false,
980
851
  "type": "option"
981
852
  },
853
+ "cred-store": {
854
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
855
+ "helpGroup": "GLOBAL",
856
+ "name": "cred-store",
857
+ "required": false,
858
+ "allowNo": false,
859
+ "type": "boolean"
860
+ },
982
861
  "log-level": {
983
862
  "helpGroup": "GLOBAL",
984
863
  "name": "log-level",
@@ -1030,25 +909,218 @@
1030
909
  "uninstall.js"
1031
910
  ]
1032
911
  },
1033
- "attachment:get": {
912
+ "atf": {
1034
913
  "aliases": [],
1035
914
  "args": {},
1036
- "description": "Get metadata for a specific attachment.",
915
+ "description": "Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.\n\nThis command allows you to run automated tests and test suites remotely, making it perfect for CI/CD pipelines and automated testing workflows. You can execute individual tests, entire test suites, and configure execution parameters such as browser type, OS, and performance mode.\n\nFeatures:\n • Execute individual tests or complete test suites\n • Real-time progress monitoring\n • JSON output for CI/CD integration\n • Detailed test results and summaries\n • Browser and environment configuration\n • Performance testing mode support",
1037
916
  "examples": [
1038
917
  {
1039
- "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1040
- "description": "Get attachment metadata by sys_id"
918
+ "description": "Execute a single ATF test by sys_id",
919
+ "command": "<%= config.bin %> <%= command.id %> --test-id f717a8c783103210621e78c6feaad396 --auth dev-instance"
1041
920
  },
1042
921
  {
1043
- "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1044
- "description": "Get attachment metadata as JSON"
922
+ "description": "Execute a test suite by sys_id and wait for completion",
923
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --auth dev-instance --wait"
924
+ },
925
+ {
926
+ "description": "Execute a test suite by name",
927
+ "command": "<%= config.bin %> <%= command.id %> --suite-name \"Smoke Tests\" --auth dev-instance"
928
+ },
929
+ {
930
+ "description": "Execute with specific browser configuration",
931
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --browser chrome --auth dev-instance"
932
+ },
933
+ {
934
+ "description": "Execute as performance test with JSON output for CI/CD",
935
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --performance --json --auth dev-instance"
936
+ },
937
+ {
938
+ "description": "Execute with custom poll interval (10 seconds)",
939
+ "command": "<%= config.bin %> <%= command.id %> --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance"
1045
940
  }
1046
941
  ],
1047
942
  "flags": {
1048
943
  "json": {
1049
- "description": "Format output as json.",
1050
- "helpGroup": "GLOBAL",
1051
- "name": "json",
944
+ "char": "j",
945
+ "description": "Output results as JSON",
946
+ "name": "json",
947
+ "required": false,
948
+ "allowNo": false,
949
+ "type": "boolean"
950
+ },
951
+ "auth": {
952
+ "char": "a",
953
+ "description": "Auth alias to use.",
954
+ "name": "auth",
955
+ "required": false,
956
+ "hasDynamicHelp": false,
957
+ "multiple": false,
958
+ "type": "option"
959
+ },
960
+ "cred-store": {
961
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
962
+ "helpGroup": "GLOBAL",
963
+ "name": "cred-store",
964
+ "required": false,
965
+ "allowNo": false,
966
+ "type": "boolean"
967
+ },
968
+ "log-level": {
969
+ "helpGroup": "GLOBAL",
970
+ "name": "log-level",
971
+ "summary": "Specify level for logging.",
972
+ "default": "info",
973
+ "hasDynamicHelp": false,
974
+ "multiple": false,
975
+ "options": [
976
+ "debug",
977
+ "warn",
978
+ "error",
979
+ "info",
980
+ "trace"
981
+ ],
982
+ "type": "option"
983
+ },
984
+ "test-id": {
985
+ "char": "t",
986
+ "description": "Test sys_id to execute",
987
+ "exclusive": [
988
+ "suite-id",
989
+ "suite-name"
990
+ ],
991
+ "name": "test-id",
992
+ "required": false,
993
+ "hasDynamicHelp": false,
994
+ "multiple": false,
995
+ "type": "option"
996
+ },
997
+ "suite-id": {
998
+ "char": "s",
999
+ "description": "Test Suite sys_id to execute",
1000
+ "exclusive": [
1001
+ "test-id",
1002
+ "suite-name"
1003
+ ],
1004
+ "name": "suite-id",
1005
+ "required": false,
1006
+ "hasDynamicHelp": false,
1007
+ "multiple": false,
1008
+ "type": "option"
1009
+ },
1010
+ "suite-name": {
1011
+ "char": "n",
1012
+ "description": "Test Suite name to execute",
1013
+ "exclusive": [
1014
+ "test-id",
1015
+ "suite-id"
1016
+ ],
1017
+ "name": "suite-name",
1018
+ "required": false,
1019
+ "hasDynamicHelp": false,
1020
+ "multiple": false,
1021
+ "type": "option"
1022
+ },
1023
+ "wait": {
1024
+ "char": "w",
1025
+ "description": "Wait for test suite execution to complete and return results",
1026
+ "name": "wait",
1027
+ "required": false,
1028
+ "allowNo": false,
1029
+ "type": "boolean"
1030
+ },
1031
+ "poll-interval": {
1032
+ "char": "p",
1033
+ "description": "Polling interval in milliseconds when waiting for completion",
1034
+ "name": "poll-interval",
1035
+ "required": false,
1036
+ "default": 5000,
1037
+ "hasDynamicHelp": false,
1038
+ "multiple": false,
1039
+ "type": "option"
1040
+ },
1041
+ "browser": {
1042
+ "char": "b",
1043
+ "description": "Browser name for test execution (e.g., chrome, firefox)",
1044
+ "name": "browser",
1045
+ "required": false,
1046
+ "hasDynamicHelp": false,
1047
+ "multiple": false,
1048
+ "type": "option"
1049
+ },
1050
+ "browser-version": {
1051
+ "description": "Browser version for test execution",
1052
+ "name": "browser-version",
1053
+ "required": false,
1054
+ "hasDynamicHelp": false,
1055
+ "multiple": false,
1056
+ "type": "option"
1057
+ },
1058
+ "os-name": {
1059
+ "description": "Operating system name for test execution",
1060
+ "name": "os-name",
1061
+ "required": false,
1062
+ "hasDynamicHelp": false,
1063
+ "multiple": false,
1064
+ "type": "option"
1065
+ },
1066
+ "os-version": {
1067
+ "description": "Operating system version for test execution",
1068
+ "name": "os-version",
1069
+ "required": false,
1070
+ "hasDynamicHelp": false,
1071
+ "multiple": false,
1072
+ "type": "option"
1073
+ },
1074
+ "performance": {
1075
+ "description": "Run as performance test",
1076
+ "name": "performance",
1077
+ "required": false,
1078
+ "allowNo": false,
1079
+ "type": "boolean"
1080
+ },
1081
+ "cloud": {
1082
+ "description": "Run in cloud",
1083
+ "name": "cloud",
1084
+ "required": false,
1085
+ "allowNo": false,
1086
+ "type": "boolean"
1087
+ }
1088
+ },
1089
+ "hasDynamicHelp": false,
1090
+ "hiddenAliases": [],
1091
+ "id": "atf",
1092
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1093
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1094
+ "pluginType": "core",
1095
+ "strict": true,
1096
+ "enableJsonFlag": true,
1097
+ "isESM": true,
1098
+ "relativePath": [
1099
+ "dist",
1100
+ "commands",
1101
+ "atf",
1102
+ "index.js"
1103
+ ]
1104
+ },
1105
+ "attachment:get": {
1106
+ "aliases": [],
1107
+ "args": {},
1108
+ "description": "Get metadata for a specific attachment.",
1109
+ "examples": [
1110
+ {
1111
+ "command": "<%= config.bin %> <%= command.id %> --sys-id att123 --auth dev",
1112
+ "description": "Get attachment metadata by sys_id"
1113
+ },
1114
+ {
1115
+ "command": "<%= config.bin %> <%= command.id %> -s att123 --json --auth dev",
1116
+ "description": "Get attachment metadata as JSON"
1117
+ }
1118
+ ],
1119
+ "flags": {
1120
+ "json": {
1121
+ "description": "Format output as json.",
1122
+ "helpGroup": "GLOBAL",
1123
+ "name": "json",
1052
1124
  "allowNo": false,
1053
1125
  "type": "boolean"
1054
1126
  },
@@ -1061,6 +1133,14 @@
1061
1133
  "multiple": false,
1062
1134
  "type": "option"
1063
1135
  },
1136
+ "cred-store": {
1137
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1138
+ "helpGroup": "GLOBAL",
1139
+ "name": "cred-store",
1140
+ "required": false,
1141
+ "allowNo": false,
1142
+ "type": "boolean"
1143
+ },
1064
1144
  "log-level": {
1065
1145
  "helpGroup": "GLOBAL",
1066
1146
  "name": "log-level",
@@ -1134,6 +1214,14 @@
1134
1214
  "multiple": false,
1135
1215
  "type": "option"
1136
1216
  },
1217
+ "cred-store": {
1218
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1219
+ "helpGroup": "GLOBAL",
1220
+ "name": "cred-store",
1221
+ "required": false,
1222
+ "allowNo": false,
1223
+ "type": "boolean"
1224
+ },
1137
1225
  "log-level": {
1138
1226
  "helpGroup": "GLOBAL",
1139
1227
  "name": "log-level",
@@ -1225,6 +1313,14 @@
1225
1313
  "multiple": false,
1226
1314
  "type": "option"
1227
1315
  },
1316
+ "cred-store": {
1317
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1318
+ "helpGroup": "GLOBAL",
1319
+ "name": "cred-store",
1320
+ "required": false,
1321
+ "allowNo": false,
1322
+ "type": "boolean"
1323
+ },
1228
1324
  "log-level": {
1229
1325
  "helpGroup": "GLOBAL",
1230
1326
  "name": "log-level",
@@ -1293,65 +1389,38 @@
1293
1389
  "upload.js"
1294
1390
  ]
1295
1391
  },
1296
- "batch:create": {
1392
+ "auth:delete": {
1297
1393
  "aliases": [],
1298
- "args": {},
1299
- "description": "Batch create records on a ServiceNow instance from a JSON file.",
1394
+ "args": {
1395
+ "alias": {
1396
+ "description": "Alias to remove",
1397
+ "name": "alias",
1398
+ "required": false
1399
+ }
1400
+ },
1401
+ "description": "Remove a credential from the store.\n\nThis does not touch the OS keyring — a copy stored there before migrating remains.",
1300
1402
  "examples": [
1301
1403
  {
1302
- "command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
1303
- "description": "Create records from a JSON file"
1404
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1405
+ "description": "Remove one alias"
1304
1406
  },
1305
1407
  {
1306
- "command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
1307
- "description": "Create records without transactional mode"
1408
+ "command": "<%= config.bin %> <%= command.id %> --all",
1409
+ "description": "Remove every stored credential"
1308
1410
  }
1309
1411
  ],
1310
1412
  "flags": {
1311
- "json": {
1312
- "description": "Format output as json.",
1413
+ "cred-store": {
1414
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1313
1415
  "helpGroup": "GLOBAL",
1314
- "name": "json",
1416
+ "name": "cred-store",
1417
+ "required": false,
1315
1418
  "allowNo": false,
1316
1419
  "type": "boolean"
1317
1420
  },
1318
- "auth": {
1319
- "char": "a",
1320
- "description": "Auth alias to use.",
1321
- "name": "auth",
1322
- "required": false,
1323
- "hasDynamicHelp": false,
1324
- "multiple": false,
1325
- "type": "option"
1326
- },
1327
- "log-level": {
1328
- "helpGroup": "GLOBAL",
1329
- "name": "log-level",
1330
- "summary": "Specify level for logging.",
1331
- "default": "info",
1332
- "hasDynamicHelp": false,
1333
- "multiple": false,
1334
- "options": [
1335
- "debug",
1336
- "warn",
1337
- "error",
1338
- "info",
1339
- "trace"
1340
- ],
1341
- "type": "option"
1342
- },
1343
- "file": {
1344
- "char": "f",
1345
- "description": "Path to JSON file with create operations",
1346
- "name": "file",
1347
- "required": true,
1348
- "hasDynamicHelp": false,
1349
- "multiple": false,
1350
- "type": "option"
1351
- },
1352
- "transaction": {
1353
- "description": "Stop on first error (transactional)",
1354
- "name": "transaction",
1421
+ "all": {
1422
+ "description": "Remove every stored credential",
1423
+ "name": "all",
1355
1424
  "required": false,
1356
1425
  "allowNo": false,
1357
1426
  "type": "boolean"
@@ -1359,32 +1428,32 @@
1359
1428
  },
1360
1429
  "hasDynamicHelp": false,
1361
1430
  "hiddenAliases": [],
1362
- "id": "batch:create",
1431
+ "id": "auth:delete",
1363
1432
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1364
1433
  "pluginName": "@sonisoft/now-sdk-ext-cli",
1365
1434
  "pluginType": "core",
1366
1435
  "strict": true,
1367
- "enableJsonFlag": true,
1436
+ "enableJsonFlag": false,
1368
1437
  "isESM": true,
1369
1438
  "relativePath": [
1370
1439
  "dist",
1371
1440
  "commands",
1372
- "batch",
1373
- "create.js"
1441
+ "auth",
1442
+ "delete.js"
1374
1443
  ]
1375
1444
  },
1376
- "batch:update": {
1445
+ "auth:doctor": {
1377
1446
  "aliases": [],
1378
1447
  "args": {},
1379
- "description": "Batch update records on a ServiceNow instance from a JSON file.",
1448
+ "description": "Diagnose credential storage: whether the SDK shim is active, which backend is in use, and what is stored.",
1380
1449
  "examples": [
1381
1450
  {
1382
- "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --auth dev",
1383
- "description": "Update records from a JSON file"
1451
+ "command": "<%= config.bin %> <%= command.id %>",
1452
+ "description": "Check credential storage health"
1384
1453
  },
1385
1454
  {
1386
- "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
1387
- "description": "Update records and stop on first error"
1455
+ "command": "<%= config.bin %> <%= command.id %> --json",
1456
+ "description": "Machine-readable output for CI"
1388
1457
  }
1389
1458
  ],
1390
1459
  "flags": {
@@ -1395,7 +1464,231 @@
1395
1464
  "allowNo": false,
1396
1465
  "type": "boolean"
1397
1466
  },
1398
- "auth": {
1467
+ "cred-store": {
1468
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1469
+ "helpGroup": "GLOBAL",
1470
+ "name": "cred-store",
1471
+ "required": false,
1472
+ "allowNo": false,
1473
+ "type": "boolean"
1474
+ }
1475
+ },
1476
+ "hasDynamicHelp": false,
1477
+ "hiddenAliases": [],
1478
+ "id": "auth:doctor",
1479
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1480
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1481
+ "pluginType": "core",
1482
+ "strict": true,
1483
+ "enableJsonFlag": true,
1484
+ "isESM": true,
1485
+ "relativePath": [
1486
+ "dist",
1487
+ "commands",
1488
+ "auth",
1489
+ "doctor.js"
1490
+ ]
1491
+ },
1492
+ "auth:list": {
1493
+ "aliases": [],
1494
+ "args": {},
1495
+ "description": "List credentials in the headless-safe credential store.\n\nThese are the credentials the ServiceNow SDK reads via the sn-credstore shim, which works in non-interactive sessions where the OS keyring cannot be unlocked.\n\nSecrets are never printed.",
1496
+ "examples": [
1497
+ {
1498
+ "command": "<%= config.bin %> <%= command.id %>",
1499
+ "description": "List stored credentials"
1500
+ },
1501
+ {
1502
+ "command": "<%= config.bin %> <%= command.id %> --json",
1503
+ "description": "List as JSON for scripting"
1504
+ }
1505
+ ],
1506
+ "flags": {
1507
+ "json": {
1508
+ "description": "Format output as json.",
1509
+ "helpGroup": "GLOBAL",
1510
+ "name": "json",
1511
+ "allowNo": false,
1512
+ "type": "boolean"
1513
+ },
1514
+ "cred-store": {
1515
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1516
+ "helpGroup": "GLOBAL",
1517
+ "name": "cred-store",
1518
+ "required": false,
1519
+ "allowNo": false,
1520
+ "type": "boolean"
1521
+ }
1522
+ },
1523
+ "hasDynamicHelp": false,
1524
+ "hiddenAliases": [],
1525
+ "id": "auth:list",
1526
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1527
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1528
+ "pluginType": "core",
1529
+ "strict": true,
1530
+ "enableJsonFlag": true,
1531
+ "isESM": true,
1532
+ "relativePath": [
1533
+ "dist",
1534
+ "commands",
1535
+ "auth",
1536
+ "list.js"
1537
+ ]
1538
+ },
1539
+ "auth:use": {
1540
+ "aliases": [],
1541
+ "args": {
1542
+ "alias": {
1543
+ "description": "Alias to make the default",
1544
+ "name": "alias",
1545
+ "required": true
1546
+ }
1547
+ },
1548
+ "description": "Set the default credential alias.\n\nCommands run without --auth use this alias.",
1549
+ "examples": [
1550
+ {
1551
+ "command": "<%= config.bin %> <%= command.id %> dev206299",
1552
+ "description": "Make dev206299 the default"
1553
+ }
1554
+ ],
1555
+ "flags": {
1556
+ "cred-store": {
1557
+ "description": "Accepted for symmetry with other commands and ignored — the auth commands always use @sonisoft/sn-credstore.",
1558
+ "helpGroup": "GLOBAL",
1559
+ "name": "cred-store",
1560
+ "required": false,
1561
+ "allowNo": false,
1562
+ "type": "boolean"
1563
+ }
1564
+ },
1565
+ "hasDynamicHelp": false,
1566
+ "hiddenAliases": [],
1567
+ "id": "auth:use",
1568
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1569
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1570
+ "pluginType": "core",
1571
+ "strict": true,
1572
+ "enableJsonFlag": false,
1573
+ "isESM": true,
1574
+ "relativePath": [
1575
+ "dist",
1576
+ "commands",
1577
+ "auth",
1578
+ "use.js"
1579
+ ]
1580
+ },
1581
+ "batch:create": {
1582
+ "aliases": [],
1583
+ "args": {},
1584
+ "description": "Batch create records on a ServiceNow instance from a JSON file.",
1585
+ "examples": [
1586
+ {
1587
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.json --auth dev",
1588
+ "description": "Create records from a JSON file"
1589
+ },
1590
+ {
1591
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.json --no-transaction --auth dev",
1592
+ "description": "Create records without transactional mode"
1593
+ }
1594
+ ],
1595
+ "flags": {
1596
+ "json": {
1597
+ "description": "Format output as json.",
1598
+ "helpGroup": "GLOBAL",
1599
+ "name": "json",
1600
+ "allowNo": false,
1601
+ "type": "boolean"
1602
+ },
1603
+ "auth": {
1604
+ "char": "a",
1605
+ "description": "Auth alias to use.",
1606
+ "name": "auth",
1607
+ "required": false,
1608
+ "hasDynamicHelp": false,
1609
+ "multiple": false,
1610
+ "type": "option"
1611
+ },
1612
+ "cred-store": {
1613
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1614
+ "helpGroup": "GLOBAL",
1615
+ "name": "cred-store",
1616
+ "required": false,
1617
+ "allowNo": false,
1618
+ "type": "boolean"
1619
+ },
1620
+ "log-level": {
1621
+ "helpGroup": "GLOBAL",
1622
+ "name": "log-level",
1623
+ "summary": "Specify level for logging.",
1624
+ "default": "info",
1625
+ "hasDynamicHelp": false,
1626
+ "multiple": false,
1627
+ "options": [
1628
+ "debug",
1629
+ "warn",
1630
+ "error",
1631
+ "info",
1632
+ "trace"
1633
+ ],
1634
+ "type": "option"
1635
+ },
1636
+ "file": {
1637
+ "char": "f",
1638
+ "description": "Path to JSON file with create operations",
1639
+ "name": "file",
1640
+ "required": true,
1641
+ "hasDynamicHelp": false,
1642
+ "multiple": false,
1643
+ "type": "option"
1644
+ },
1645
+ "transaction": {
1646
+ "description": "Stop on first error (transactional)",
1647
+ "name": "transaction",
1648
+ "required": false,
1649
+ "allowNo": false,
1650
+ "type": "boolean"
1651
+ }
1652
+ },
1653
+ "hasDynamicHelp": false,
1654
+ "hiddenAliases": [],
1655
+ "id": "batch:create",
1656
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
1657
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
1658
+ "pluginType": "core",
1659
+ "strict": true,
1660
+ "enableJsonFlag": true,
1661
+ "isESM": true,
1662
+ "relativePath": [
1663
+ "dist",
1664
+ "commands",
1665
+ "batch",
1666
+ "create.js"
1667
+ ]
1668
+ },
1669
+ "batch:update": {
1670
+ "aliases": [],
1671
+ "args": {},
1672
+ "description": "Batch update records on a ServiceNow instance from a JSON file.",
1673
+ "examples": [
1674
+ {
1675
+ "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --auth dev",
1676
+ "description": "Update records from a JSON file"
1677
+ },
1678
+ {
1679
+ "command": "<%= config.bin %> <%= command.id %> --file ./updates.json --stop-on-error --auth dev",
1680
+ "description": "Update records and stop on first error"
1681
+ }
1682
+ ],
1683
+ "flags": {
1684
+ "json": {
1685
+ "description": "Format output as json.",
1686
+ "helpGroup": "GLOBAL",
1687
+ "name": "json",
1688
+ "allowNo": false,
1689
+ "type": "boolean"
1690
+ },
1691
+ "auth": {
1399
1692
  "char": "a",
1400
1693
  "description": "Auth alias to use.",
1401
1694
  "name": "auth",
@@ -1404,6 +1697,14 @@
1404
1697
  "multiple": false,
1405
1698
  "type": "option"
1406
1699
  },
1700
+ "cred-store": {
1701
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1702
+ "helpGroup": "GLOBAL",
1703
+ "name": "cred-store",
1704
+ "required": false,
1705
+ "allowNo": false,
1706
+ "type": "boolean"
1707
+ },
1407
1708
  "log-level": {
1408
1709
  "helpGroup": "GLOBAL",
1409
1710
  "name": "log-level",
@@ -1493,6 +1794,14 @@
1493
1794
  "multiple": false,
1494
1795
  "type": "option"
1495
1796
  },
1797
+ "cred-store": {
1798
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1799
+ "helpGroup": "GLOBAL",
1800
+ "name": "cred-store",
1801
+ "required": false,
1802
+ "allowNo": false,
1803
+ "type": "boolean"
1804
+ },
1496
1805
  "log-level": {
1497
1806
  "helpGroup": "GLOBAL",
1498
1807
  "name": "log-level",
@@ -1601,6 +1910,14 @@
1601
1910
  "multiple": false,
1602
1911
  "type": "option"
1603
1912
  },
1913
+ "cred-store": {
1914
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
1915
+ "helpGroup": "GLOBAL",
1916
+ "name": "cred-store",
1917
+ "required": false,
1918
+ "allowNo": false,
1919
+ "type": "boolean"
1920
+ },
1604
1921
  "log-level": {
1605
1922
  "helpGroup": "GLOBAL",
1606
1923
  "name": "log-level",
@@ -1752,6 +2069,14 @@
1752
2069
  "multiple": false,
1753
2070
  "type": "option"
1754
2071
  },
2072
+ "cred-store": {
2073
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2074
+ "helpGroup": "GLOBAL",
2075
+ "name": "cred-store",
2076
+ "required": false,
2077
+ "allowNo": false,
2078
+ "type": "boolean"
2079
+ },
1755
2080
  "log-level": {
1756
2081
  "helpGroup": "GLOBAL",
1757
2082
  "name": "log-level",
@@ -1823,6 +2148,14 @@
1823
2148
  "multiple": false,
1824
2149
  "type": "option"
1825
2150
  },
2151
+ "cred-store": {
2152
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2153
+ "helpGroup": "GLOBAL",
2154
+ "name": "cred-store",
2155
+ "required": false,
2156
+ "allowNo": false,
2157
+ "type": "boolean"
2158
+ },
1826
2159
  "log-level": {
1827
2160
  "helpGroup": "GLOBAL",
1828
2161
  "name": "log-level",
@@ -1935,6 +2268,14 @@
1935
2268
  "multiple": false,
1936
2269
  "type": "option"
1937
2270
  },
2271
+ "cred-store": {
2272
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2273
+ "helpGroup": "GLOBAL",
2274
+ "name": "cred-store",
2275
+ "required": false,
2276
+ "allowNo": false,
2277
+ "type": "boolean"
2278
+ },
1938
2279
  "log-level": {
1939
2280
  "helpGroup": "GLOBAL",
1940
2281
  "name": "log-level",
@@ -2030,6 +2371,14 @@
2030
2371
  "multiple": false,
2031
2372
  "type": "option"
2032
2373
  },
2374
+ "cred-store": {
2375
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2376
+ "helpGroup": "GLOBAL",
2377
+ "name": "cred-store",
2378
+ "required": false,
2379
+ "allowNo": false,
2380
+ "type": "boolean"
2381
+ },
2033
2382
  "log-level": {
2034
2383
  "helpGroup": "GLOBAL",
2035
2384
  "name": "log-level",
@@ -2126,6 +2475,14 @@
2126
2475
  "multiple": false,
2127
2476
  "type": "option"
2128
2477
  },
2478
+ "cred-store": {
2479
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2480
+ "helpGroup": "GLOBAL",
2481
+ "name": "cred-store",
2482
+ "required": false,
2483
+ "allowNo": false,
2484
+ "type": "boolean"
2485
+ },
2129
2486
  "log-level": {
2130
2487
  "helpGroup": "GLOBAL",
2131
2488
  "name": "log-level",
@@ -2212,6 +2569,14 @@
2212
2569
  "multiple": false,
2213
2570
  "type": "option"
2214
2571
  },
2572
+ "cred-store": {
2573
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2574
+ "helpGroup": "GLOBAL",
2575
+ "name": "cred-store",
2576
+ "required": false,
2577
+ "allowNo": false,
2578
+ "type": "boolean"
2579
+ },
2215
2580
  "log-level": {
2216
2581
  "helpGroup": "GLOBAL",
2217
2582
  "name": "log-level",
@@ -2298,6 +2663,14 @@
2298
2663
  "multiple": false,
2299
2664
  "type": "option"
2300
2665
  },
2666
+ "cred-store": {
2667
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2668
+ "helpGroup": "GLOBAL",
2669
+ "name": "cred-store",
2670
+ "required": false,
2671
+ "allowNo": false,
2672
+ "type": "boolean"
2673
+ },
2301
2674
  "log-level": {
2302
2675
  "helpGroup": "GLOBAL",
2303
2676
  "name": "log-level",
@@ -2396,6 +2769,14 @@
2396
2769
  "multiple": false,
2397
2770
  "type": "option"
2398
2771
  },
2772
+ "cred-store": {
2773
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2774
+ "helpGroup": "GLOBAL",
2775
+ "name": "cred-store",
2776
+ "required": false,
2777
+ "allowNo": false,
2778
+ "type": "boolean"
2779
+ },
2399
2780
  "log-level": {
2400
2781
  "helpGroup": "GLOBAL",
2401
2782
  "name": "log-level",
@@ -2496,6 +2877,14 @@
2496
2877
  "multiple": false,
2497
2878
  "type": "option"
2498
2879
  },
2880
+ "cred-store": {
2881
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2882
+ "helpGroup": "GLOBAL",
2883
+ "name": "cred-store",
2884
+ "required": false,
2885
+ "allowNo": false,
2886
+ "type": "boolean"
2887
+ },
2499
2888
  "log-level": {
2500
2889
  "helpGroup": "GLOBAL",
2501
2890
  "name": "log-level",
@@ -2582,6 +2971,14 @@
2582
2971
  "multiple": false,
2583
2972
  "type": "option"
2584
2973
  },
2974
+ "cred-store": {
2975
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
2976
+ "helpGroup": "GLOBAL",
2977
+ "name": "cred-store",
2978
+ "required": false,
2979
+ "allowNo": false,
2980
+ "type": "boolean"
2981
+ },
2585
2982
  "log-level": {
2586
2983
  "helpGroup": "GLOBAL",
2587
2984
  "name": "log-level",
@@ -2690,6 +3087,14 @@
2690
3087
  "multiple": false,
2691
3088
  "type": "option"
2692
3089
  },
3090
+ "cred-store": {
3091
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3092
+ "helpGroup": "GLOBAL",
3093
+ "name": "cred-store",
3094
+ "required": false,
3095
+ "allowNo": false,
3096
+ "type": "boolean"
3097
+ },
2693
3098
  "log-level": {
2694
3099
  "helpGroup": "GLOBAL",
2695
3100
  "name": "log-level",
@@ -2772,6 +3177,14 @@
2772
3177
  "multiple": false,
2773
3178
  "type": "option"
2774
3179
  },
3180
+ "cred-store": {
3181
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3182
+ "helpGroup": "GLOBAL",
3183
+ "name": "cred-store",
3184
+ "required": false,
3185
+ "allowNo": false,
3186
+ "type": "boolean"
3187
+ },
2775
3188
  "log-level": {
2776
3189
  "helpGroup": "GLOBAL",
2777
3190
  "name": "log-level",
@@ -2888,6 +3301,14 @@
2888
3301
  "multiple": false,
2889
3302
  "type": "option"
2890
3303
  },
3304
+ "cred-store": {
3305
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3306
+ "helpGroup": "GLOBAL",
3307
+ "name": "cred-store",
3308
+ "required": false,
3309
+ "allowNo": false,
3310
+ "type": "boolean"
3311
+ },
2891
3312
  "log-level": {
2892
3313
  "helpGroup": "GLOBAL",
2893
3314
  "name": "log-level",
@@ -2994,6 +3415,14 @@
2994
3415
  "multiple": false,
2995
3416
  "type": "option"
2996
3417
  },
3418
+ "cred-store": {
3419
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3420
+ "helpGroup": "GLOBAL",
3421
+ "name": "cred-store",
3422
+ "required": false,
3423
+ "allowNo": false,
3424
+ "type": "boolean"
3425
+ },
2997
3426
  "log-level": {
2998
3427
  "helpGroup": "GLOBAL",
2999
3428
  "name": "log-level",
@@ -3126,6 +3555,14 @@
3126
3555
  "multiple": false,
3127
3556
  "type": "option"
3128
3557
  },
3558
+ "cred-store": {
3559
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3560
+ "helpGroup": "GLOBAL",
3561
+ "name": "cred-store",
3562
+ "required": false,
3563
+ "allowNo": false,
3564
+ "type": "boolean"
3565
+ },
3129
3566
  "log-level": {
3130
3567
  "helpGroup": "GLOBAL",
3131
3568
  "name": "log-level",
@@ -3226,6 +3663,14 @@
3226
3663
  "multiple": false,
3227
3664
  "type": "option"
3228
3665
  },
3666
+ "cred-store": {
3667
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3668
+ "helpGroup": "GLOBAL",
3669
+ "name": "cred-store",
3670
+ "required": false,
3671
+ "allowNo": false,
3672
+ "type": "boolean"
3673
+ },
3229
3674
  "log-level": {
3230
3675
  "helpGroup": "GLOBAL",
3231
3676
  "name": "log-level",
@@ -3322,6 +3767,14 @@
3322
3767
  "multiple": false,
3323
3768
  "type": "option"
3324
3769
  },
3770
+ "cred-store": {
3771
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3772
+ "helpGroup": "GLOBAL",
3773
+ "name": "cred-store",
3774
+ "required": false,
3775
+ "allowNo": false,
3776
+ "type": "boolean"
3777
+ },
3325
3778
  "log-level": {
3326
3779
  "helpGroup": "GLOBAL",
3327
3780
  "name": "log-level",
@@ -3409,6 +3862,14 @@
3409
3862
  "multiple": false,
3410
3863
  "type": "option"
3411
3864
  },
3865
+ "cred-store": {
3866
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3867
+ "helpGroup": "GLOBAL",
3868
+ "name": "cred-store",
3869
+ "required": false,
3870
+ "allowNo": false,
3871
+ "type": "boolean"
3872
+ },
3412
3873
  "log-level": {
3413
3874
  "helpGroup": "GLOBAL",
3414
3875
  "name": "log-level",
@@ -3524,6 +3985,14 @@
3524
3985
  "multiple": false,
3525
3986
  "type": "option"
3526
3987
  },
3988
+ "cred-store": {
3989
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
3990
+ "helpGroup": "GLOBAL",
3991
+ "name": "cred-store",
3992
+ "required": false,
3993
+ "allowNo": false,
3994
+ "type": "boolean"
3995
+ },
3527
3996
  "log-level": {
3528
3997
  "helpGroup": "GLOBAL",
3529
3998
  "name": "log-level",
@@ -3608,6 +4077,14 @@
3608
4077
  "multiple": false,
3609
4078
  "type": "option"
3610
4079
  },
4080
+ "cred-store": {
4081
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4082
+ "helpGroup": "GLOBAL",
4083
+ "name": "cred-store",
4084
+ "required": false,
4085
+ "allowNo": false,
4086
+ "type": "boolean"
4087
+ },
3611
4088
  "log-level": {
3612
4089
  "helpGroup": "GLOBAL",
3613
4090
  "name": "log-level",
@@ -3691,6 +4168,14 @@
3691
4168
  "multiple": false,
3692
4169
  "type": "option"
3693
4170
  },
4171
+ "cred-store": {
4172
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4173
+ "helpGroup": "GLOBAL",
4174
+ "name": "cred-store",
4175
+ "required": false,
4176
+ "allowNo": false,
4177
+ "type": "boolean"
4178
+ },
3694
4179
  "log-level": {
3695
4180
  "helpGroup": "GLOBAL",
3696
4181
  "name": "log-level",
@@ -3793,6 +4278,14 @@
3793
4278
  "multiple": false,
3794
4279
  "type": "option"
3795
4280
  },
4281
+ "cred-store": {
4282
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4283
+ "helpGroup": "GLOBAL",
4284
+ "name": "cred-store",
4285
+ "required": false,
4286
+ "allowNo": false,
4287
+ "type": "boolean"
4288
+ },
3796
4289
  "log-level": {
3797
4290
  "helpGroup": "GLOBAL",
3798
4291
  "name": "log-level",
@@ -3870,6 +4363,14 @@
3870
4363
  "multiple": false,
3871
4364
  "type": "option"
3872
4365
  },
4366
+ "cred-store": {
4367
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4368
+ "helpGroup": "GLOBAL",
4369
+ "name": "cred-store",
4370
+ "required": false,
4371
+ "allowNo": false,
4372
+ "type": "boolean"
4373
+ },
3873
4374
  "log-level": {
3874
4375
  "helpGroup": "GLOBAL",
3875
4376
  "name": "log-level",
@@ -3942,6 +4443,14 @@
3942
4443
  "multiple": false,
3943
4444
  "type": "option"
3944
4445
  },
4446
+ "cred-store": {
4447
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4448
+ "helpGroup": "GLOBAL",
4449
+ "name": "cred-store",
4450
+ "required": false,
4451
+ "allowNo": false,
4452
+ "type": "boolean"
4453
+ },
3945
4454
  "log-level": {
3946
4455
  "helpGroup": "GLOBAL",
3947
4456
  "name": "log-level",
@@ -3984,22 +4493,22 @@
3984
4493
  "set.js"
3985
4494
  ]
3986
4495
  },
3987
- "script-sync:pull": {
4496
+ "search:add-table": {
3988
4497
  "aliases": [],
3989
4498
  "args": {},
3990
- "description": "Pull a script from a ServiceNow instance to a local file.\n\nThis command downloads a script record from your ServiceNow instance and saves it as a local file. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Download scripts by name and type\n • Custom output file path support\n • Auto-generated file names based on script name and type\n • JSON output for CI/CD integration",
4499
+ "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
3991
4500
  "examples": [
3992
4501
  {
3993
- "description": "Pull a Script Include to auto-generated file name",
3994
- "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --auth dev-instance"
4502
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
4503
+ "description": "Add a table to a search group"
3995
4504
  },
3996
4505
  {
3997
- "description": "Pull a Business Rule to a specific file",
3998
- "command": "<%= config.bin %> <%= command.id %> --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance"
4506
+ "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
4507
+ "description": "Add a table with multiple search fields"
3999
4508
  },
4000
4509
  {
4001
- "description": "Pull a Client Script with JSON output",
4002
- "command": "<%= config.bin %> <%= command.id %> -n MyClientScript -t sys_script_client --json --auth dev-instance"
4510
+ "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
4511
+ "description": "Add a table with JSON output"
4003
4512
  }
4004
4513
  ],
4005
4514
  "flags": {
@@ -4019,6 +4528,14 @@
4019
4528
  "multiple": false,
4020
4529
  "type": "option"
4021
4530
  },
4531
+ "cred-store": {
4532
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4533
+ "helpGroup": "GLOBAL",
4534
+ "name": "cred-store",
4535
+ "required": false,
4536
+ "allowNo": false,
4537
+ "type": "boolean"
4538
+ },
4022
4539
  "log-level": {
4023
4540
  "helpGroup": "GLOBAL",
4024
4541
  "name": "log-level",
@@ -4035,36 +4552,29 @@
4035
4552
  ],
4036
4553
  "type": "option"
4037
4554
  },
4038
- "name": {
4039
- "char": "n",
4040
- "description": "Name of the script to pull",
4041
- "name": "name",
4555
+ "search-fields": {
4556
+ "char": "f",
4557
+ "description": "Comma-separated list of fields to index for search",
4558
+ "name": "search-fields",
4042
4559
  "required": true,
4043
4560
  "hasDynamicHelp": false,
4044
4561
  "multiple": false,
4045
4562
  "type": "option"
4046
4563
  },
4047
- "type": {
4048
- "char": "t",
4049
- "description": "Type of script to pull",
4050
- "name": "type",
4564
+ "search-group": {
4565
+ "char": "g",
4566
+ "description": "Search group to add the table to",
4567
+ "name": "search-group",
4051
4568
  "required": true,
4052
4569
  "hasDynamicHelp": false,
4053
4570
  "multiple": false,
4054
- "options": [
4055
- "sys_script_include",
4056
- "sys_script",
4057
- "sys_ui_script",
4058
- "sys_ui_action",
4059
- "sys_script_client"
4060
- ],
4061
4571
  "type": "option"
4062
4572
  },
4063
- "output": {
4064
- "char": "o",
4065
- "description": "Output file path. If not specified, a file name is auto-generated.",
4066
- "name": "output",
4067
- "required": false,
4573
+ "table": {
4574
+ "char": "t",
4575
+ "description": "Table name to add to the search group",
4576
+ "name": "table",
4577
+ "required": true,
4068
4578
  "hasDynamicHelp": false,
4069
4579
  "multiple": false,
4070
4580
  "type": "option"
@@ -4072,7 +4582,7 @@
4072
4582
  },
4073
4583
  "hasDynamicHelp": false,
4074
4584
  "hiddenAliases": [],
4075
- "id": "script-sync:pull",
4585
+ "id": "search:add-table",
4076
4586
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4077
4587
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4078
4588
  "pluginType": "core",
@@ -4082,26 +4592,22 @@
4082
4592
  "relativePath": [
4083
4593
  "dist",
4084
4594
  "commands",
4085
- "script-sync",
4086
- "pull.js"
4595
+ "search",
4596
+ "add-table.js"
4087
4597
  ]
4088
4598
  },
4089
- "script-sync:push": {
4599
+ "search:groups": {
4090
4600
  "aliases": [],
4091
4601
  "args": {},
4092
- "description": "Push a local script file to a ServiceNow instance.\n\nThis command uploads a local script file to your ServiceNow instance, updating the corresponding script record. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Upload scripts by name and type\n • Specify the local file to push\n • JSON output for CI/CD integration\n • Detailed push result reporting",
4602
+ "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
4093
4603
  "examples": [
4094
4604
  {
4095
- "description": "Push a Script Include from a local file",
4096
- "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js --auth dev-instance"
4097
- },
4098
- {
4099
- "description": "Push a Business Rule with short flags",
4100
- "command": "<%= config.bin %> <%= command.id %> -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance"
4605
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
4606
+ "description": "List all search groups"
4101
4607
  },
4102
4608
  {
4103
- "description": "Push a UI Script with JSON output",
4104
- "command": "<%= config.bin %> <%= command.id %> -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance"
4609
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
4610
+ "description": "List search groups with JSON output"
4105
4611
  }
4106
4612
  ],
4107
4613
  "flags": {
@@ -4121,6 +4627,14 @@
4121
4627
  "multiple": false,
4122
4628
  "type": "option"
4123
4629
  },
4630
+ "cred-store": {
4631
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4632
+ "helpGroup": "GLOBAL",
4633
+ "name": "cred-store",
4634
+ "required": false,
4635
+ "allowNo": false,
4636
+ "type": "boolean"
4637
+ },
4124
4638
  "log-level": {
4125
4639
  "helpGroup": "GLOBAL",
4126
4640
  "name": "log-level",
@@ -4136,45 +4650,11 @@
4136
4650
  "trace"
4137
4651
  ],
4138
4652
  "type": "option"
4139
- },
4140
- "name": {
4141
- "char": "n",
4142
- "description": "Name of the script to push",
4143
- "name": "name",
4144
- "required": true,
4145
- "hasDynamicHelp": false,
4146
- "multiple": false,
4147
- "type": "option"
4148
- },
4149
- "type": {
4150
- "char": "t",
4151
- "description": "Type of script to push",
4152
- "name": "type",
4153
- "required": true,
4154
- "hasDynamicHelp": false,
4155
- "multiple": false,
4156
- "options": [
4157
- "sys_script_include",
4158
- "sys_script",
4159
- "sys_ui_script",
4160
- "sys_ui_action",
4161
- "sys_script_client"
4162
- ],
4163
- "type": "option"
4164
- },
4165
- "file": {
4166
- "char": "f",
4167
- "description": "Path to the local script file to push",
4168
- "name": "file",
4169
- "required": true,
4170
- "hasDynamicHelp": false,
4171
- "multiple": false,
4172
- "type": "option"
4173
4653
  }
4174
4654
  },
4175
4655
  "hasDynamicHelp": false,
4176
4656
  "hiddenAliases": [],
4177
- "id": "script-sync:push",
4657
+ "id": "search:groups",
4178
4658
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4179
4659
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4180
4660
  "pluginType": "core",
@@ -4184,26 +4664,30 @@
4184
4664
  "relativePath": [
4185
4665
  "dist",
4186
4666
  "commands",
4187
- "script-sync",
4188
- "push.js"
4667
+ "search",
4668
+ "groups.js"
4189
4669
  ]
4190
4670
  },
4191
- "script-sync:sync": {
4671
+ "search": {
4192
4672
  "aliases": [],
4193
4673
  "args": {},
4194
- "description": "Synchronize all scripts in a directory with a ServiceNow instance.\n\nThis command scans a local directory for script files and synchronizes them with the corresponding records on your ServiceNow instance. You can optionally filter by script types to synchronize only specific kinds of scripts.\n\nFeatures:\n • Batch synchronization of all scripts in a directory\n • Filter by one or more script types\n • Summary report with success/failure counts\n • JSON output for CI/CD integration",
4674
+ "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
4195
4675
  "examples": [
4196
4676
  {
4197
- "description": "Sync all scripts in a directory",
4198
- "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --auth dev-instance"
4677
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
4678
+ "description": "Search for a term across the entire instance"
4199
4679
  },
4200
4680
  {
4201
- "description": "Sync only Script Includes and Business Rules",
4202
- "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance"
4681
+ "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
4682
+ "description": "Search within a specific application scope"
4203
4683
  },
4204
4684
  {
4205
- "description": "Sync with JSON output for CI/CD",
4206
- "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
4685
+ "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
4686
+ "description": "Search within a specific table and search group"
4687
+ },
4688
+ {
4689
+ "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
4690
+ "description": "Search with a result limit and JSON output"
4207
4691
  }
4208
4692
  ],
4209
4693
  "flags": {
@@ -4223,6 +4707,14 @@
4223
4707
  "multiple": false,
4224
4708
  "type": "option"
4225
4709
  },
4710
+ "cred-store": {
4711
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4712
+ "helpGroup": "GLOBAL",
4713
+ "name": "cred-store",
4714
+ "required": false,
4715
+ "allowNo": false,
4716
+ "type": "boolean"
4717
+ },
4226
4718
  "log-level": {
4227
4719
  "helpGroup": "GLOBAL",
4228
4720
  "name": "log-level",
@@ -4239,64 +4731,79 @@
4239
4731
  ],
4240
4732
  "type": "option"
4241
4733
  },
4242
- "directory": {
4243
- "char": "d",
4244
- "description": "Directory containing script files to synchronize",
4245
- "name": "directory",
4246
- "required": true,
4734
+ "limit": {
4735
+ "char": "l",
4736
+ "description": "Maximum number of results to return",
4737
+ "name": "limit",
4738
+ "required": false,
4247
4739
  "hasDynamicHelp": false,
4248
4740
  "multiple": false,
4249
4741
  "type": "option"
4250
4742
  },
4251
- "types": {
4252
- "char": "t",
4253
- "description": "Script types to synchronize. Can be specified multiple times to include multiple types.",
4254
- "name": "types",
4743
+ "scope": {
4744
+ "char": "s",
4745
+ "description": "Application scope to search within",
4746
+ "name": "scope",
4255
4747
  "required": false,
4256
4748
  "hasDynamicHelp": false,
4257
- "multiple": true,
4258
- "options": [
4259
- "sys_script_include",
4260
- "sys_script",
4261
- "sys_ui_script",
4262
- "sys_ui_action",
4263
- "sys_script_client"
4264
- ],
4749
+ "multiple": false,
4265
4750
  "type": "option"
4266
- }
4267
- },
4268
- "hasDynamicHelp": false,
4269
- "hiddenAliases": [],
4270
- "id": "script-sync:sync",
4271
- "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4272
- "pluginName": "@sonisoft/now-sdk-ext-cli",
4273
- "pluginType": "core",
4274
- "strict": true,
4275
- "enableJsonFlag": true,
4276
- "isESM": true,
4277
- "relativePath": [
4278
- "dist",
4751
+ },
4752
+ "search-group": {
4753
+ "char": "g",
4754
+ "description": "Search group to search within (required when using --table)",
4755
+ "name": "search-group",
4756
+ "required": false,
4757
+ "hasDynamicHelp": false,
4758
+ "multiple": false,
4759
+ "type": "option"
4760
+ },
4761
+ "table": {
4762
+ "description": "Table name to search within (requires --search-group)",
4763
+ "name": "table",
4764
+ "required": false,
4765
+ "hasDynamicHelp": false,
4766
+ "multiple": false,
4767
+ "type": "option"
4768
+ },
4769
+ "term": {
4770
+ "char": "t",
4771
+ "description": "Search term to look for in platform code",
4772
+ "name": "term",
4773
+ "required": true,
4774
+ "hasDynamicHelp": false,
4775
+ "multiple": false,
4776
+ "type": "option"
4777
+ }
4778
+ },
4779
+ "hasDynamicHelp": false,
4780
+ "hiddenAliases": [],
4781
+ "id": "search",
4782
+ "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4783
+ "pluginName": "@sonisoft/now-sdk-ext-cli",
4784
+ "pluginType": "core",
4785
+ "strict": true,
4786
+ "enableJsonFlag": true,
4787
+ "isESM": true,
4788
+ "relativePath": [
4789
+ "dist",
4279
4790
  "commands",
4280
- "script-sync",
4281
- "sync.js"
4791
+ "search",
4792
+ "index.js"
4282
4793
  ]
4283
4794
  },
4284
- "store:install": {
4795
+ "search:tables": {
4285
4796
  "aliases": [],
4286
4797
  "args": {},
4287
- "description": "Install an application from the ServiceNow Store.",
4798
+ "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
4288
4799
  "examples": [
4289
4800
  {
4290
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
4291
- "description": "Install a store application and wait for completion"
4292
- },
4293
- {
4294
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
4295
- "description": "Install without waiting for completion"
4801
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
4802
+ "description": "List tables in a search group"
4296
4803
  },
4297
4804
  {
4298
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
4299
- "description": "Install with demo data"
4805
+ "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
4806
+ "description": "List tables with JSON output"
4300
4807
  }
4301
4808
  ],
4302
4809
  "flags": {
@@ -4316,6 +4823,14 @@
4316
4823
  "multiple": false,
4317
4824
  "type": "option"
4318
4825
  },
4826
+ "cred-store": {
4827
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4828
+ "helpGroup": "GLOBAL",
4829
+ "name": "cred-store",
4830
+ "required": false,
4831
+ "allowNo": false,
4832
+ "type": "boolean"
4833
+ },
4319
4834
  "log-level": {
4320
4835
  "helpGroup": "GLOBAL",
4321
4836
  "name": "log-level",
@@ -4332,51 +4847,10 @@
4332
4847
  ],
4333
4848
  "type": "option"
4334
4849
  },
4335
- "app-id": {
4336
- "char": "a",
4337
- "description": "Store application sys_id",
4338
- "name": "app-id",
4339
- "required": true,
4340
- "hasDynamicHelp": false,
4341
- "multiple": false,
4342
- "type": "option"
4343
- },
4344
- "demo-data": {
4345
- "description": "Load demo data during installation",
4346
- "name": "demo-data",
4347
- "required": false,
4348
- "allowNo": false,
4349
- "type": "boolean"
4350
- },
4351
- "no-wait": {
4352
- "description": "Do not wait for installation to complete",
4353
- "name": "no-wait",
4354
- "required": false,
4355
- "allowNo": false,
4356
- "type": "boolean"
4357
- },
4358
- "poll-interval": {
4359
- "description": "Polling interval in milliseconds",
4360
- "name": "poll-interval",
4361
- "required": false,
4362
- "default": 5000,
4363
- "hasDynamicHelp": false,
4364
- "multiple": false,
4365
- "type": "option"
4366
- },
4367
- "timeout": {
4368
- "description": "Installation timeout in milliseconds",
4369
- "name": "timeout",
4370
- "required": false,
4371
- "default": 1800000,
4372
- "hasDynamicHelp": false,
4373
- "multiple": false,
4374
- "type": "option"
4375
- },
4376
- "version": {
4377
- "char": "v",
4378
- "description": "Application version to install",
4379
- "name": "version",
4850
+ "search-group": {
4851
+ "char": "g",
4852
+ "description": "Search group name to list tables for",
4853
+ "name": "search-group",
4380
4854
  "required": true,
4381
4855
  "hasDynamicHelp": false,
4382
4856
  "multiple": false,
@@ -4385,7 +4859,7 @@
4385
4859
  },
4386
4860
  "hasDynamicHelp": false,
4387
4861
  "hiddenAliases": [],
4388
- "id": "store:install",
4862
+ "id": "search:tables",
4389
4863
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4390
4864
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4391
4865
  "pluginType": "core",
@@ -4395,26 +4869,26 @@
4395
4869
  "relativePath": [
4396
4870
  "dist",
4397
4871
  "commands",
4398
- "store",
4399
- "install.js"
4872
+ "search",
4873
+ "tables.js"
4400
4874
  ]
4401
4875
  },
4402
- "store:search": {
4876
+ "script-sync:pull": {
4403
4877
  "aliases": [],
4404
4878
  "args": {},
4405
- "description": "Search for applications in the ServiceNow Store.",
4879
+ "description": "Pull a script from a ServiceNow instance to a local file.\n\nThis command downloads a script record from your ServiceNow instance and saves it as a local file. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Download scripts by name and type\n • Custom output file path support\n • Auto-generated file names based on script name and type\n • JSON output for CI/CD integration",
4406
4880
  "examples": [
4407
4881
  {
4408
- "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
4409
- "description": "Search for applications matching a term"
4882
+ "description": "Pull a Script Include to auto-generated file name",
4883
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --auth dev-instance"
4410
4884
  },
4411
4885
  {
4412
- "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
4413
- "description": "List installed applications"
4886
+ "description": "Pull a Business Rule to a specific file",
4887
+ "command": "<%= config.bin %> <%= command.id %> --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance"
4414
4888
  },
4415
4889
  {
4416
- "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
4417
- "description": "List applications with available updates"
4890
+ "description": "Pull a Client Script with JSON output",
4891
+ "command": "<%= config.bin %> <%= command.id %> -n MyClientScript -t sys_script_client --json --auth dev-instance"
4418
4892
  }
4419
4893
  ],
4420
4894
  "flags": {
@@ -4434,6 +4908,14 @@
4434
4908
  "multiple": false,
4435
4909
  "type": "option"
4436
4910
  },
4911
+ "cred-store": {
4912
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
4913
+ "helpGroup": "GLOBAL",
4914
+ "name": "cred-store",
4915
+ "required": false,
4916
+ "allowNo": false,
4917
+ "type": "boolean"
4918
+ },
4437
4919
  "log-level": {
4438
4920
  "helpGroup": "GLOBAL",
4439
4921
  "name": "log-level",
@@ -4450,33 +4932,35 @@
4450
4932
  ],
4451
4933
  "type": "option"
4452
4934
  },
4453
- "limit": {
4454
- "description": "Maximum number of results to return",
4455
- "name": "limit",
4456
- "required": false,
4457
- "default": 20,
4935
+ "name": {
4936
+ "char": "n",
4937
+ "description": "Name of the script to pull",
4938
+ "name": "name",
4939
+ "required": true,
4458
4940
  "hasDynamicHelp": false,
4459
4941
  "multiple": false,
4460
4942
  "type": "option"
4461
4943
  },
4462
- "tab": {
4463
- "description": "Store tab context to search",
4464
- "name": "tab",
4465
- "required": false,
4466
- "default": "available_for_you",
4944
+ "type": {
4945
+ "char": "t",
4946
+ "description": "Type of script to pull",
4947
+ "name": "type",
4948
+ "required": true,
4467
4949
  "hasDynamicHelp": false,
4468
4950
  "multiple": false,
4469
4951
  "options": [
4470
- "available_for_you",
4471
- "installed",
4472
- "updates"
4952
+ "sys_script_include",
4953
+ "sys_script",
4954
+ "sys_ui_script",
4955
+ "sys_ui_action",
4956
+ "sys_script_client"
4473
4957
  ],
4474
4958
  "type": "option"
4475
4959
  },
4476
- "term": {
4477
- "char": "t",
4478
- "description": "Search term",
4479
- "name": "term",
4960
+ "output": {
4961
+ "char": "o",
4962
+ "description": "Output file path. If not specified, a file name is auto-generated.",
4963
+ "name": "output",
4480
4964
  "required": false,
4481
4965
  "hasDynamicHelp": false,
4482
4966
  "multiple": false,
@@ -4485,7 +4969,7 @@
4485
4969
  },
4486
4970
  "hasDynamicHelp": false,
4487
4971
  "hiddenAliases": [],
4488
- "id": "store:search",
4972
+ "id": "script-sync:pull",
4489
4973
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4490
4974
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4491
4975
  "pluginType": "core",
@@ -4495,26 +4979,26 @@
4495
4979
  "relativePath": [
4496
4980
  "dist",
4497
4981
  "commands",
4498
- "store",
4499
- "search.js"
4982
+ "script-sync",
4983
+ "pull.js"
4500
4984
  ]
4501
4985
  },
4502
- "store:update": {
4986
+ "script-sync:push": {
4503
4987
  "aliases": [],
4504
4988
  "args": {},
4505
- "description": "Update a ServiceNow Store application to a new version.",
4989
+ "description": "Push a local script file to a ServiceNow instance.\n\nThis command uploads a local script file to your ServiceNow instance, updating the corresponding script record. Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.\n\nFeatures:\n • Upload scripts by name and type\n • Specify the local file to push\n • JSON output for CI/CD integration\n • Detailed push result reporting",
4506
4990
  "examples": [
4507
4991
  {
4508
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
4509
- "description": "Update a store application and wait for completion"
4992
+ "description": "Push a Script Include from a local file",
4993
+ "command": "<%= config.bin %> <%= command.id %> --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js --auth dev-instance"
4510
4994
  },
4511
4995
  {
4512
- "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
4513
- "description": "Update without waiting for completion"
4996
+ "description": "Push a Business Rule with short flags",
4997
+ "command": "<%= config.bin %> <%= command.id %> -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance"
4514
4998
  },
4515
4999
  {
4516
- "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
4517
- "description": "Update with custom timeout (1 hour)"
5000
+ "description": "Push a UI Script with JSON output",
5001
+ "command": "<%= config.bin %> <%= command.id %> -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance"
4518
5002
  }
4519
5003
  ],
4520
5004
  "flags": {
@@ -4534,6 +5018,14 @@
4534
5018
  "multiple": false,
4535
5019
  "type": "option"
4536
5020
  },
5021
+ "cred-store": {
5022
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5023
+ "helpGroup": "GLOBAL",
5024
+ "name": "cred-store",
5025
+ "required": false,
5026
+ "allowNo": false,
5027
+ "type": "boolean"
5028
+ },
4537
5029
  "log-level": {
4538
5030
  "helpGroup": "GLOBAL",
4539
5031
  "name": "log-level",
@@ -4550,44 +5042,35 @@
4550
5042
  ],
4551
5043
  "type": "option"
4552
5044
  },
4553
- "app-id": {
4554
- "char": "a",
4555
- "description": "Store application sys_id",
4556
- "name": "app-id",
5045
+ "name": {
5046
+ "char": "n",
5047
+ "description": "Name of the script to push",
5048
+ "name": "name",
4557
5049
  "required": true,
4558
5050
  "hasDynamicHelp": false,
4559
5051
  "multiple": false,
4560
5052
  "type": "option"
4561
5053
  },
4562
- "no-wait": {
4563
- "description": "Do not wait for update to complete",
4564
- "name": "no-wait",
4565
- "required": false,
4566
- "allowNo": false,
4567
- "type": "boolean"
4568
- },
4569
- "poll-interval": {
4570
- "description": "Polling interval in milliseconds",
4571
- "name": "poll-interval",
4572
- "required": false,
4573
- "default": 5000,
4574
- "hasDynamicHelp": false,
4575
- "multiple": false,
4576
- "type": "option"
4577
- },
4578
- "timeout": {
4579
- "description": "Update timeout in milliseconds",
4580
- "name": "timeout",
4581
- "required": false,
4582
- "default": 1800000,
5054
+ "type": {
5055
+ "char": "t",
5056
+ "description": "Type of script to push",
5057
+ "name": "type",
5058
+ "required": true,
4583
5059
  "hasDynamicHelp": false,
4584
5060
  "multiple": false,
5061
+ "options": [
5062
+ "sys_script_include",
5063
+ "sys_script",
5064
+ "sys_ui_script",
5065
+ "sys_ui_action",
5066
+ "sys_script_client"
5067
+ ],
4585
5068
  "type": "option"
4586
5069
  },
4587
- "version": {
4588
- "char": "v",
4589
- "description": "Target application version",
4590
- "name": "version",
5070
+ "file": {
5071
+ "char": "f",
5072
+ "description": "Path to the local script file to push",
5073
+ "name": "file",
4591
5074
  "required": true,
4592
5075
  "hasDynamicHelp": false,
4593
5076
  "multiple": false,
@@ -4596,7 +5079,7 @@
4596
5079
  },
4597
5080
  "hasDynamicHelp": false,
4598
5081
  "hiddenAliases": [],
4599
- "id": "store:update",
5082
+ "id": "script-sync:push",
4600
5083
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4601
5084
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4602
5085
  "pluginType": "core",
@@ -4606,18 +5089,26 @@
4606
5089
  "relativePath": [
4607
5090
  "dist",
4608
5091
  "commands",
4609
- "store",
4610
- "update.js"
5092
+ "script-sync",
5093
+ "push.js"
4611
5094
  ]
4612
5095
  },
4613
- "store:validate": {
5096
+ "script-sync:sync": {
4614
5097
  "aliases": [],
4615
5098
  "args": {},
4616
- "description": "Validate a batch installation definition file.",
5099
+ "description": "Synchronize all scripts in a directory with a ServiceNow instance.\n\nThis command scans a local directory for script files and synchronizes them with the corresponding records on your ServiceNow instance. You can optionally filter by script types to synchronize only specific kinds of scripts.\n\nFeatures:\n • Batch synchronization of all scripts in a directory\n • Filter by one or more script types\n • Summary report with success/failure counts\n • JSON output for CI/CD integration",
4617
5100
  "examples": [
4618
5101
  {
4619
- "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
4620
- "description": "Validate a batch definition file"
5102
+ "description": "Sync all scripts in a directory",
5103
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --auth dev-instance"
5104
+ },
5105
+ {
5106
+ "description": "Sync only Script Includes and Business Rules",
5107
+ "command": "<%= config.bin %> <%= command.id %> --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance"
5108
+ },
5109
+ {
5110
+ "description": "Sync with JSON output for CI/CD",
5111
+ "command": "<%= config.bin %> <%= command.id %> -d ./scripts --json --auth dev-instance"
4621
5112
  }
4622
5113
  ],
4623
5114
  "flags": {
@@ -4637,6 +5128,14 @@
4637
5128
  "multiple": false,
4638
5129
  "type": "option"
4639
5130
  },
5131
+ "cred-store": {
5132
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5133
+ "helpGroup": "GLOBAL",
5134
+ "name": "cred-store",
5135
+ "required": false,
5136
+ "allowNo": false,
5137
+ "type": "boolean"
5138
+ },
4640
5139
  "log-level": {
4641
5140
  "helpGroup": "GLOBAL",
4642
5141
  "name": "log-level",
@@ -4653,19 +5152,35 @@
4653
5152
  ],
4654
5153
  "type": "option"
4655
5154
  },
4656
- "file": {
4657
- "char": "f",
4658
- "description": "Path to batch definition JSON file",
4659
- "name": "file",
5155
+ "directory": {
5156
+ "char": "d",
5157
+ "description": "Directory containing script files to synchronize",
5158
+ "name": "directory",
4660
5159
  "required": true,
4661
5160
  "hasDynamicHelp": false,
4662
5161
  "multiple": false,
4663
5162
  "type": "option"
5163
+ },
5164
+ "types": {
5165
+ "char": "t",
5166
+ "description": "Script types to synchronize. Can be specified multiple times to include multiple types.",
5167
+ "name": "types",
5168
+ "required": false,
5169
+ "hasDynamicHelp": false,
5170
+ "multiple": true,
5171
+ "options": [
5172
+ "sys_script_include",
5173
+ "sys_script",
5174
+ "sys_ui_script",
5175
+ "sys_ui_action",
5176
+ "sys_script_client"
5177
+ ],
5178
+ "type": "option"
4664
5179
  }
4665
5180
  },
4666
5181
  "hasDynamicHelp": false,
4667
5182
  "hiddenAliases": [],
4668
- "id": "store:validate",
5183
+ "id": "script-sync:sync",
4669
5184
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
4670
5185
  "pluginName": "@sonisoft/now-sdk-ext-cli",
4671
5186
  "pluginType": "core",
@@ -4675,8 +5190,8 @@
4675
5190
  "relativePath": [
4676
5191
  "dist",
4677
5192
  "commands",
4678
- "store",
4679
- "validate.js"
5193
+ "script-sync",
5194
+ "sync.js"
4680
5195
  ]
4681
5196
  },
4682
5197
  "task:approve": {
@@ -4710,6 +5225,14 @@
4710
5225
  "multiple": false,
4711
5226
  "type": "option"
4712
5227
  },
5228
+ "cred-store": {
5229
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5230
+ "helpGroup": "GLOBAL",
5231
+ "name": "cred-store",
5232
+ "required": false,
5233
+ "allowNo": false,
5234
+ "type": "boolean"
5235
+ },
4713
5236
  "log-level": {
4714
5237
  "helpGroup": "GLOBAL",
4715
5238
  "name": "log-level",
@@ -4796,6 +5319,14 @@
4796
5319
  "multiple": false,
4797
5320
  "type": "option"
4798
5321
  },
5322
+ "cred-store": {
5323
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5324
+ "helpGroup": "GLOBAL",
5325
+ "name": "cred-store",
5326
+ "required": false,
5327
+ "allowNo": false,
5328
+ "type": "boolean"
5329
+ },
4799
5330
  "log-level": {
4800
5331
  "helpGroup": "GLOBAL",
4801
5332
  "name": "log-level",
@@ -4896,6 +5427,14 @@
4896
5427
  "multiple": false,
4897
5428
  "type": "option"
4898
5429
  },
5430
+ "cred-store": {
5431
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5432
+ "helpGroup": "GLOBAL",
5433
+ "name": "cred-store",
5434
+ "required": false,
5435
+ "allowNo": false,
5436
+ "type": "boolean"
5437
+ },
4899
5438
  "log-level": {
4900
5439
  "helpGroup": "GLOBAL",
4901
5440
  "name": "log-level",
@@ -4989,6 +5528,14 @@
4989
5528
  "multiple": false,
4990
5529
  "type": "option"
4991
5530
  },
5531
+ "cred-store": {
5532
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5533
+ "helpGroup": "GLOBAL",
5534
+ "name": "cred-store",
5535
+ "required": false,
5536
+ "allowNo": false,
5537
+ "type": "boolean"
5538
+ },
4992
5539
  "log-level": {
4993
5540
  "helpGroup": "GLOBAL",
4994
5541
  "name": "log-level",
@@ -5091,6 +5638,14 @@
5091
5638
  "multiple": false,
5092
5639
  "type": "option"
5093
5640
  },
5641
+ "cred-store": {
5642
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5643
+ "helpGroup": "GLOBAL",
5644
+ "name": "cred-store",
5645
+ "required": false,
5646
+ "allowNo": false,
5647
+ "type": "boolean"
5648
+ },
5094
5649
  "log-level": {
5095
5650
  "helpGroup": "GLOBAL",
5096
5651
  "name": "log-level",
@@ -5173,6 +5728,14 @@
5173
5728
  "multiple": false,
5174
5729
  "type": "option"
5175
5730
  },
5731
+ "cred-store": {
5732
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5733
+ "helpGroup": "GLOBAL",
5734
+ "name": "cred-store",
5735
+ "required": false,
5736
+ "allowNo": false,
5737
+ "type": "boolean"
5738
+ },
5176
5739
  "log-level": {
5177
5740
  "helpGroup": "GLOBAL",
5178
5741
  "name": "log-level",
@@ -5231,18 +5794,22 @@
5231
5794
  "resolve.js"
5232
5795
  ]
5233
5796
  },
5234
- "update-set:clone": {
5797
+ "store:install": {
5235
5798
  "aliases": [],
5236
5799
  "args": {},
5237
- "description": "Clone an update set and its records.",
5800
+ "description": "Install an application from the ServiceNow Store.",
5238
5801
  "examples": [
5239
5802
  {
5240
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
5241
- "description": "Clone an update set"
5803
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --auth dev",
5804
+ "description": "Install a store application and wait for completion"
5242
5805
  },
5243
5806
  {
5244
- "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
5245
- "description": "Clone with JSON output"
5807
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 1.0.0 --no-wait --auth dev",
5808
+ "description": "Install without waiting for completion"
5809
+ },
5810
+ {
5811
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 1.0.0 --demo-data --auth dev",
5812
+ "description": "Install with demo data"
5246
5813
  }
5247
5814
  ],
5248
5815
  "flags": {
@@ -5262,6 +5829,14 @@
5262
5829
  "multiple": false,
5263
5830
  "type": "option"
5264
5831
  },
5832
+ "cred-store": {
5833
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5834
+ "helpGroup": "GLOBAL",
5835
+ "name": "cred-store",
5836
+ "required": false,
5837
+ "allowNo": false,
5838
+ "type": "boolean"
5839
+ },
5265
5840
  "log-level": {
5266
5841
  "helpGroup": "GLOBAL",
5267
5842
  "name": "log-level",
@@ -5278,19 +5853,51 @@
5278
5853
  ],
5279
5854
  "type": "option"
5280
5855
  },
5281
- "name": {
5282
- "char": "n",
5283
- "description": "Name for the cloned update set",
5284
- "name": "name",
5856
+ "app-id": {
5857
+ "char": "a",
5858
+ "description": "Store application sys_id",
5859
+ "name": "app-id",
5285
5860
  "required": true,
5286
5861
  "hasDynamicHelp": false,
5287
5862
  "multiple": false,
5288
5863
  "type": "option"
5289
5864
  },
5290
- "source": {
5291
- "char": "s",
5292
- "description": "Source update set sys_id",
5293
- "name": "source",
5865
+ "demo-data": {
5866
+ "description": "Load demo data during installation",
5867
+ "name": "demo-data",
5868
+ "required": false,
5869
+ "allowNo": false,
5870
+ "type": "boolean"
5871
+ },
5872
+ "no-wait": {
5873
+ "description": "Do not wait for installation to complete",
5874
+ "name": "no-wait",
5875
+ "required": false,
5876
+ "allowNo": false,
5877
+ "type": "boolean"
5878
+ },
5879
+ "poll-interval": {
5880
+ "description": "Polling interval in milliseconds",
5881
+ "name": "poll-interval",
5882
+ "required": false,
5883
+ "default": 5000,
5884
+ "hasDynamicHelp": false,
5885
+ "multiple": false,
5886
+ "type": "option"
5887
+ },
5888
+ "timeout": {
5889
+ "description": "Installation timeout in milliseconds",
5890
+ "name": "timeout",
5891
+ "required": false,
5892
+ "default": 1800000,
5893
+ "hasDynamicHelp": false,
5894
+ "multiple": false,
5895
+ "type": "option"
5896
+ },
5897
+ "version": {
5898
+ "char": "v",
5899
+ "description": "Application version to install",
5900
+ "name": "version",
5294
5901
  "required": true,
5295
5902
  "hasDynamicHelp": false,
5296
5903
  "multiple": false,
@@ -5299,7 +5906,7 @@
5299
5906
  },
5300
5907
  "hasDynamicHelp": false,
5301
5908
  "hiddenAliases": [],
5302
- "id": "update-set:clone",
5909
+ "id": "store:install",
5303
5910
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5304
5911
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5305
5912
  "pluginType": "core",
@@ -5309,26 +5916,26 @@
5309
5916
  "relativePath": [
5310
5917
  "dist",
5311
5918
  "commands",
5312
- "update-set",
5313
- "clone.js"
5919
+ "store",
5920
+ "install.js"
5314
5921
  ]
5315
5922
  },
5316
- "update-set:create": {
5923
+ "store:search": {
5317
5924
  "aliases": [],
5318
5925
  "args": {},
5319
- "description": "Create a new update set.",
5926
+ "description": "Search for applications in the ServiceNow Store.",
5320
5927
  "examples": [
5321
5928
  {
5322
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
5323
- "description": "Create a new update set with a name"
5929
+ "command": "<%= config.bin %> <%= command.id %> --term \"ITSM\" --auth dev",
5930
+ "description": "Search for applications matching a term"
5324
5931
  },
5325
5932
  {
5326
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
5327
- "description": "Create with name and description"
5933
+ "command": "<%= config.bin %> <%= command.id %> --tab installed --auth dev",
5934
+ "description": "List installed applications"
5328
5935
  },
5329
5936
  {
5330
- "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
5331
- "description": "Create within a specific application scope"
5937
+ "command": "<%= config.bin %> <%= command.id %> --tab updates --limit 10 --auth dev",
5938
+ "description": "List applications with available updates"
5332
5939
  }
5333
5940
  ],
5334
5941
  "flags": {
@@ -5348,6 +5955,14 @@
5348
5955
  "multiple": false,
5349
5956
  "type": "option"
5350
5957
  },
5958
+ "cred-store": {
5959
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
5960
+ "helpGroup": "GLOBAL",
5961
+ "name": "cred-store",
5962
+ "required": false,
5963
+ "allowNo": false,
5964
+ "type": "boolean"
5965
+ },
5351
5966
  "log-level": {
5352
5967
  "helpGroup": "GLOBAL",
5353
5968
  "name": "log-level",
@@ -5364,28 +5979,34 @@
5364
5979
  ],
5365
5980
  "type": "option"
5366
5981
  },
5367
- "application": {
5368
- "description": "Application scope for the new update set",
5369
- "name": "application",
5982
+ "limit": {
5983
+ "description": "Maximum number of results to return",
5984
+ "name": "limit",
5370
5985
  "required": false,
5986
+ "default": 20,
5371
5987
  "hasDynamicHelp": false,
5372
5988
  "multiple": false,
5373
5989
  "type": "option"
5374
5990
  },
5375
- "description": {
5376
- "char": "d",
5377
- "description": "Description for the new update set",
5378
- "name": "description",
5991
+ "tab": {
5992
+ "description": "Store tab context to search",
5993
+ "name": "tab",
5379
5994
  "required": false,
5995
+ "default": "available_for_you",
5380
5996
  "hasDynamicHelp": false,
5381
5997
  "multiple": false,
5998
+ "options": [
5999
+ "available_for_you",
6000
+ "installed",
6001
+ "updates"
6002
+ ],
5382
6003
  "type": "option"
5383
6004
  },
5384
- "name": {
5385
- "char": "n",
5386
- "description": "Name for the new update set",
5387
- "name": "name",
5388
- "required": true,
6005
+ "term": {
6006
+ "char": "t",
6007
+ "description": "Search term",
6008
+ "name": "term",
6009
+ "required": false,
5389
6010
  "hasDynamicHelp": false,
5390
6011
  "multiple": false,
5391
6012
  "type": "option"
@@ -5393,7 +6014,7 @@
5393
6014
  },
5394
6015
  "hasDynamicHelp": false,
5395
6016
  "hiddenAliases": [],
5396
- "id": "update-set:create",
6017
+ "id": "store:search",
5397
6018
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5398
6019
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5399
6020
  "pluginType": "core",
@@ -5403,26 +6024,26 @@
5403
6024
  "relativePath": [
5404
6025
  "dist",
5405
6026
  "commands",
5406
- "update-set",
5407
- "create.js"
6027
+ "store",
6028
+ "search.js"
5408
6029
  ]
5409
6030
  },
5410
- "update-set:current": {
6031
+ "store:update": {
5411
6032
  "aliases": [],
5412
6033
  "args": {},
5413
- "description": "Get or set the current update set.",
6034
+ "description": "Update a ServiceNow Store application to a new version.",
5414
6035
  "examples": [
5415
6036
  {
5416
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5417
- "description": "Get the current update set"
6037
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --auth dev",
6038
+ "description": "Update a store application and wait for completion"
5418
6039
  },
5419
6040
  {
5420
- "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
5421
- "description": "Set the current update set by sys_id"
6041
+ "command": "<%= config.bin %> <%= command.id %> --app-id abc123 --version 2.0.0 --no-wait --auth dev",
6042
+ "description": "Update without waiting for completion"
5422
6043
  },
5423
6044
  {
5424
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5425
- "description": "Get the current update set as JSON"
6045
+ "command": "<%= config.bin %> <%= command.id %> -a abc123 -v 2.0.0 --timeout 3600000 --auth dev",
6046
+ "description": "Update with custom timeout (1 hour)"
5426
6047
  }
5427
6048
  ],
5428
6049
  "flags": {
@@ -5442,6 +6063,14 @@
5442
6063
  "multiple": false,
5443
6064
  "type": "option"
5444
6065
  },
6066
+ "cred-store": {
6067
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6068
+ "helpGroup": "GLOBAL",
6069
+ "name": "cred-store",
6070
+ "required": false,
6071
+ "allowNo": false,
6072
+ "type": "boolean"
6073
+ },
5445
6074
  "log-level": {
5446
6075
  "helpGroup": "GLOBAL",
5447
6076
  "name": "log-level",
@@ -5458,11 +6087,45 @@
5458
6087
  ],
5459
6088
  "type": "option"
5460
6089
  },
5461
- "set": {
5462
- "char": "s",
5463
- "description": "sys_id of update set to make current",
5464
- "name": "set",
6090
+ "app-id": {
6091
+ "char": "a",
6092
+ "description": "Store application sys_id",
6093
+ "name": "app-id",
6094
+ "required": true,
6095
+ "hasDynamicHelp": false,
6096
+ "multiple": false,
6097
+ "type": "option"
6098
+ },
6099
+ "no-wait": {
6100
+ "description": "Do not wait for update to complete",
6101
+ "name": "no-wait",
6102
+ "required": false,
6103
+ "allowNo": false,
6104
+ "type": "boolean"
6105
+ },
6106
+ "poll-interval": {
6107
+ "description": "Polling interval in milliseconds",
6108
+ "name": "poll-interval",
6109
+ "required": false,
6110
+ "default": 5000,
6111
+ "hasDynamicHelp": false,
6112
+ "multiple": false,
6113
+ "type": "option"
6114
+ },
6115
+ "timeout": {
6116
+ "description": "Update timeout in milliseconds",
6117
+ "name": "timeout",
5465
6118
  "required": false,
6119
+ "default": 1800000,
6120
+ "hasDynamicHelp": false,
6121
+ "multiple": false,
6122
+ "type": "option"
6123
+ },
6124
+ "version": {
6125
+ "char": "v",
6126
+ "description": "Target application version",
6127
+ "name": "version",
6128
+ "required": true,
5466
6129
  "hasDynamicHelp": false,
5467
6130
  "multiple": false,
5468
6131
  "type": "option"
@@ -5470,7 +6133,7 @@
5470
6133
  },
5471
6134
  "hasDynamicHelp": false,
5472
6135
  "hiddenAliases": [],
5473
- "id": "update-set:current",
6136
+ "id": "store:update",
5474
6137
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5475
6138
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5476
6139
  "pluginType": "core",
@@ -5480,26 +6143,18 @@
5480
6143
  "relativePath": [
5481
6144
  "dist",
5482
6145
  "commands",
5483
- "update-set",
5484
- "current.js"
6146
+ "store",
6147
+ "update.js"
5485
6148
  ]
5486
6149
  },
5487
- "update-set": {
6150
+ "store:validate": {
5488
6151
  "aliases": [],
5489
6152
  "args": {},
5490
- "description": "List update sets on a ServiceNow instance.",
6153
+ "description": "Validate a batch installation definition file.",
5491
6154
  "examples": [
5492
6155
  {
5493
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
5494
- "description": "List update sets with default limit"
5495
- },
5496
- {
5497
- "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
5498
- "description": "List update sets with a custom query filter"
5499
- },
5500
- {
5501
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
5502
- "description": "List update sets with JSON output"
6156
+ "command": "<%= config.bin %> <%= command.id %> --file ./batch-definition.json --auth dev",
6157
+ "description": "Validate a batch definition file"
5503
6158
  }
5504
6159
  ],
5505
6160
  "flags": {
@@ -5519,6 +6174,14 @@
5519
6174
  "multiple": false,
5520
6175
  "type": "option"
5521
6176
  },
6177
+ "cred-store": {
6178
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6179
+ "helpGroup": "GLOBAL",
6180
+ "name": "cred-store",
6181
+ "required": false,
6182
+ "allowNo": false,
6183
+ "type": "boolean"
6184
+ },
5522
6185
  "log-level": {
5523
6186
  "helpGroup": "GLOBAL",
5524
6187
  "name": "log-level",
@@ -5535,20 +6198,11 @@
5535
6198
  ],
5536
6199
  "type": "option"
5537
6200
  },
5538
- "limit": {
5539
- "description": "Maximum number of update sets to return",
5540
- "name": "limit",
5541
- "required": false,
5542
- "default": 20,
5543
- "hasDynamicHelp": false,
5544
- "multiple": false,
5545
- "type": "option"
5546
- },
5547
- "query": {
5548
- "char": "q",
5549
- "description": "Encoded query filter",
5550
- "name": "query",
5551
- "required": false,
6201
+ "file": {
6202
+ "char": "f",
6203
+ "description": "Path to batch definition JSON file",
6204
+ "name": "file",
6205
+ "required": true,
5552
6206
  "hasDynamicHelp": false,
5553
6207
  "multiple": false,
5554
6208
  "type": "option"
@@ -5556,7 +6210,7 @@
5556
6210
  },
5557
6211
  "hasDynamicHelp": false,
5558
6212
  "hiddenAliases": [],
5559
- "id": "update-set",
6213
+ "id": "store:validate",
5560
6214
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5561
6215
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5562
6216
  "pluginType": "core",
@@ -5566,22 +6220,22 @@
5566
6220
  "relativePath": [
5567
6221
  "dist",
5568
6222
  "commands",
5569
- "update-set",
5570
- "index.js"
6223
+ "store",
6224
+ "validate.js"
5571
6225
  ]
5572
6226
  },
5573
- "update-set:inspect": {
6227
+ "workflow:create": {
5574
6228
  "aliases": [],
5575
6229
  "args": {},
5576
- "description": "Inspect the components of an update set.",
6230
+ "description": "Create a complete workflow from a JSON specification file.",
5577
6231
  "examples": [
5578
6232
  {
5579
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
5580
- "description": "Inspect an update set by sys_id"
6233
+ "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
6234
+ "description": "Create a workflow from a JSON spec file"
5581
6235
  },
5582
6236
  {
5583
- "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
5584
- "description": "Inspect with JSON output"
6237
+ "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
6238
+ "description": "Create a workflow and output result as JSON"
5585
6239
  }
5586
6240
  ],
5587
6241
  "flags": {
@@ -5601,6 +6255,14 @@
5601
6255
  "multiple": false,
5602
6256
  "type": "option"
5603
6257
  },
6258
+ "cred-store": {
6259
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6260
+ "helpGroup": "GLOBAL",
6261
+ "name": "cred-store",
6262
+ "required": false,
6263
+ "allowNo": false,
6264
+ "type": "boolean"
6265
+ },
5604
6266
  "log-level": {
5605
6267
  "helpGroup": "GLOBAL",
5606
6268
  "name": "log-level",
@@ -5617,10 +6279,10 @@
5617
6279
  ],
5618
6280
  "type": "option"
5619
6281
  },
5620
- "sys-id": {
6282
+ "spec": {
5621
6283
  "char": "s",
5622
- "description": "sys_id of the update set to inspect",
5623
- "name": "sys-id",
6284
+ "description": "Path to workflow JSON specification file",
6285
+ "name": "spec",
5624
6286
  "required": true,
5625
6287
  "hasDynamicHelp": false,
5626
6288
  "multiple": false,
@@ -5629,7 +6291,7 @@
5629
6291
  },
5630
6292
  "hasDynamicHelp": false,
5631
6293
  "hiddenAliases": [],
5632
- "id": "update-set:inspect",
6294
+ "id": "workflow:create",
5633
6295
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5634
6296
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5635
6297
  "pluginType": "core",
@@ -5639,26 +6301,22 @@
5639
6301
  "relativePath": [
5640
6302
  "dist",
5641
6303
  "commands",
5642
- "update-set",
5643
- "inspect.js"
6304
+ "workflow",
6305
+ "create.js"
5644
6306
  ]
5645
6307
  },
5646
- "update-set:move": {
6308
+ "workflow:publish": {
5647
6309
  "aliases": [],
5648
6310
  "args": {},
5649
- "description": "Move records between update sets.",
6311
+ "description": "Publish a workflow version.",
5650
6312
  "examples": [
5651
6313
  {
5652
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
5653
- "description": "Move all records from one update set to another"
5654
- },
5655
- {
5656
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
5657
- "description": "Move specific records to a target update set"
6314
+ "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
6315
+ "description": "Publish a workflow version"
5658
6316
  },
5659
6317
  {
5660
- "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
5661
- "description": "Move records with JSON output"
6318
+ "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
6319
+ "description": "Publish a workflow version and output as JSON"
5662
6320
  }
5663
6321
  ],
5664
6322
  "flags": {
@@ -5678,6 +6336,14 @@
5678
6336
  "multiple": false,
5679
6337
  "type": "option"
5680
6338
  },
6339
+ "cred-store": {
6340
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6341
+ "helpGroup": "GLOBAL",
6342
+ "name": "cred-store",
6343
+ "required": false,
6344
+ "allowNo": false,
6345
+ "type": "boolean"
6346
+ },
5681
6347
  "log-level": {
5682
6348
  "helpGroup": "GLOBAL",
5683
6349
  "name": "log-level",
@@ -5694,25 +6360,19 @@
5694
6360
  ],
5695
6361
  "type": "option"
5696
6362
  },
5697
- "records": {
5698
- "description": "Comma-separated sys_ids of records to move",
5699
- "name": "records",
5700
- "required": false,
5701
- "hasDynamicHelp": false,
5702
- "multiple": false,
5703
- "type": "option"
5704
- },
5705
- "source": {
5706
- "description": "Source update set sys_id",
5707
- "name": "source",
5708
- "required": false,
6363
+ "start-activity": {
6364
+ "char": "s",
6365
+ "description": "Sys ID of the start activity",
6366
+ "name": "start-activity",
6367
+ "required": true,
5709
6368
  "hasDynamicHelp": false,
5710
6369
  "multiple": false,
5711
6370
  "type": "option"
5712
6371
  },
5713
- "target": {
5714
- "description": "Target update set sys_id",
5715
- "name": "target",
6372
+ "version-id": {
6373
+ "char": "v",
6374
+ "description": "Sys ID of the workflow version to publish",
6375
+ "name": "version-id",
5716
6376
  "required": true,
5717
6377
  "hasDynamicHelp": false,
5718
6378
  "multiple": false,
@@ -5721,7 +6381,7 @@
5721
6381
  },
5722
6382
  "hasDynamicHelp": false,
5723
6383
  "hiddenAliases": [],
5724
- "id": "update-set:move",
6384
+ "id": "workflow:publish",
5725
6385
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5726
6386
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5727
6387
  "pluginType": "core",
@@ -5731,22 +6391,22 @@
5731
6391
  "relativePath": [
5732
6392
  "dist",
5733
6393
  "commands",
5734
- "update-set",
5735
- "move.js"
6394
+ "workflow",
6395
+ "publish.js"
5736
6396
  ]
5737
6397
  },
5738
- "workflow:create": {
6398
+ "update-set:clone": {
5739
6399
  "aliases": [],
5740
6400
  "args": {},
5741
- "description": "Create a complete workflow from a JSON specification file.",
6401
+ "description": "Clone an update set and its records.",
5742
6402
  "examples": [
5743
6403
  {
5744
- "command": "<%= config.bin %> <%= command.id %> --spec ./workflow.json --auth dev",
5745
- "description": "Create a workflow from a JSON spec file"
6404
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --auth dev-instance",
6405
+ "description": "Clone an update set"
5746
6406
  },
5747
6407
  {
5748
- "command": "<%= config.bin %> <%= command.id %> -s ./workflow.json --json --auth dev",
5749
- "description": "Create a workflow and output result as JSON"
6408
+ "command": "<%= config.bin %> <%= command.id %> --source us-001 --name \"Cloned Set\" --json --auth dev-instance",
6409
+ "description": "Clone with JSON output"
5750
6410
  }
5751
6411
  ],
5752
6412
  "flags": {
@@ -5766,6 +6426,14 @@
5766
6426
  "multiple": false,
5767
6427
  "type": "option"
5768
6428
  },
6429
+ "cred-store": {
6430
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6431
+ "helpGroup": "GLOBAL",
6432
+ "name": "cred-store",
6433
+ "required": false,
6434
+ "allowNo": false,
6435
+ "type": "boolean"
6436
+ },
5769
6437
  "log-level": {
5770
6438
  "helpGroup": "GLOBAL",
5771
6439
  "name": "log-level",
@@ -5782,10 +6450,19 @@
5782
6450
  ],
5783
6451
  "type": "option"
5784
6452
  },
5785
- "spec": {
6453
+ "name": {
6454
+ "char": "n",
6455
+ "description": "Name for the cloned update set",
6456
+ "name": "name",
6457
+ "required": true,
6458
+ "hasDynamicHelp": false,
6459
+ "multiple": false,
6460
+ "type": "option"
6461
+ },
6462
+ "source": {
5786
6463
  "char": "s",
5787
- "description": "Path to workflow JSON specification file",
5788
- "name": "spec",
6464
+ "description": "Source update set sys_id",
6465
+ "name": "source",
5789
6466
  "required": true,
5790
6467
  "hasDynamicHelp": false,
5791
6468
  "multiple": false,
@@ -5794,7 +6471,7 @@
5794
6471
  },
5795
6472
  "hasDynamicHelp": false,
5796
6473
  "hiddenAliases": [],
5797
- "id": "workflow:create",
6474
+ "id": "update-set:clone",
5798
6475
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5799
6476
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5800
6477
  "pluginType": "core",
@@ -5804,22 +6481,26 @@
5804
6481
  "relativePath": [
5805
6482
  "dist",
5806
6483
  "commands",
5807
- "workflow",
5808
- "create.js"
6484
+ "update-set",
6485
+ "clone.js"
5809
6486
  ]
5810
6487
  },
5811
- "workflow:publish": {
6488
+ "update-set:create": {
5812
6489
  "aliases": [],
5813
6490
  "args": {},
5814
- "description": "Publish a workflow version.",
6491
+ "description": "Create a new update set.",
5815
6492
  "examples": [
5816
6493
  {
5817
- "command": "<%= config.bin %> <%= command.id %> --version-id wfv-001 --start-activity act-001 --auth dev",
5818
- "description": "Publish a workflow version"
6494
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --auth dev-instance",
6495
+ "description": "Create a new update set with a name"
5819
6496
  },
5820
6497
  {
5821
- "command": "<%= config.bin %> <%= command.id %> -v wfv-001 -s act-001 --json --auth dev",
5822
- "description": "Publish a workflow version and output as JSON"
6498
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --description \"Update set for feature X\" --auth dev-instance",
6499
+ "description": "Create with name and description"
6500
+ },
6501
+ {
6502
+ "command": "<%= config.bin %> <%= command.id %> --name \"My Feature Set\" --application x_my_app --auth dev-instance",
6503
+ "description": "Create within a specific application scope"
5823
6504
  }
5824
6505
  ],
5825
6506
  "flags": {
@@ -5839,6 +6520,14 @@
5839
6520
  "multiple": false,
5840
6521
  "type": "option"
5841
6522
  },
6523
+ "cred-store": {
6524
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6525
+ "helpGroup": "GLOBAL",
6526
+ "name": "cred-store",
6527
+ "required": false,
6528
+ "allowNo": false,
6529
+ "type": "boolean"
6530
+ },
5842
6531
  "log-level": {
5843
6532
  "helpGroup": "GLOBAL",
5844
6533
  "name": "log-level",
@@ -5855,19 +6544,27 @@
5855
6544
  ],
5856
6545
  "type": "option"
5857
6546
  },
5858
- "start-activity": {
5859
- "char": "s",
5860
- "description": "Sys ID of the start activity",
5861
- "name": "start-activity",
5862
- "required": true,
6547
+ "application": {
6548
+ "description": "Application scope for the new update set",
6549
+ "name": "application",
6550
+ "required": false,
5863
6551
  "hasDynamicHelp": false,
5864
6552
  "multiple": false,
5865
6553
  "type": "option"
5866
6554
  },
5867
- "version-id": {
5868
- "char": "v",
5869
- "description": "Sys ID of the workflow version to publish",
5870
- "name": "version-id",
6555
+ "description": {
6556
+ "char": "d",
6557
+ "description": "Description for the new update set",
6558
+ "name": "description",
6559
+ "required": false,
6560
+ "hasDynamicHelp": false,
6561
+ "multiple": false,
6562
+ "type": "option"
6563
+ },
6564
+ "name": {
6565
+ "char": "n",
6566
+ "description": "Name for the new update set",
6567
+ "name": "name",
5871
6568
  "required": true,
5872
6569
  "hasDynamicHelp": false,
5873
6570
  "multiple": false,
@@ -5876,7 +6573,7 @@
5876
6573
  },
5877
6574
  "hasDynamicHelp": false,
5878
6575
  "hiddenAliases": [],
5879
- "id": "workflow:publish",
6576
+ "id": "update-set:create",
5880
6577
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5881
6578
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5882
6579
  "pluginType": "core",
@@ -5886,34 +6583,33 @@
5886
6583
  "relativePath": [
5887
6584
  "dist",
5888
6585
  "commands",
5889
- "workflow",
5890
- "publish.js"
6586
+ "update-set",
6587
+ "create.js"
5891
6588
  ]
5892
6589
  },
5893
- "xml:export": {
6590
+ "update-set:current": {
5894
6591
  "aliases": [],
5895
6592
  "args": {},
5896
- "description": "Export a single ServiceNow record as XML.\n\nDownloads the XML representation of a specific record from a ServiceNow table. Without --output, the XML is printed to stdout. With --output, the XML is written to the specified file path.\n\nFeatures:\n • Export any record by table and sys_id\n • Print XML to stdout for piping to other tools\n • Save directly to a file with --output\n • JSON output mode for CI/CD integration",
6593
+ "description": "Get or set the current update set.",
5897
6594
  "examples": [
5898
6595
  {
5899
- "description": "Export a record to stdout",
5900
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6596
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6597
+ "description": "Get the current update set"
5901
6598
  },
5902
6599
  {
5903
- "description": "Export and save to a file",
5904
- "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6600
+ "command": "<%= config.bin %> <%= command.id %> --set us-001 --auth dev-instance",
6601
+ "description": "Set the current update set by sys_id"
5905
6602
  },
5906
6603
  {
5907
- "description": "Export as JSON metadata",
5908
- "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6604
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6605
+ "description": "Get the current update set as JSON"
5909
6606
  }
5910
6607
  ],
5911
6608
  "flags": {
5912
6609
  "json": {
5913
- "char": "j",
5914
- "description": "Output results as JSON",
6610
+ "description": "Format output as json.",
6611
+ "helpGroup": "GLOBAL",
5915
6612
  "name": "json",
5916
- "required": false,
5917
6613
  "allowNo": false,
5918
6614
  "type": "boolean"
5919
6615
  },
@@ -5926,6 +6622,14 @@
5926
6622
  "multiple": false,
5927
6623
  "type": "option"
5928
6624
  },
6625
+ "cred-store": {
6626
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6627
+ "helpGroup": "GLOBAL",
6628
+ "name": "cred-store",
6629
+ "required": false,
6630
+ "allowNo": false,
6631
+ "type": "boolean"
6632
+ },
5929
6633
  "log-level": {
5930
6634
  "helpGroup": "GLOBAL",
5931
6635
  "name": "log-level",
@@ -5942,28 +6646,10 @@
5942
6646
  ],
5943
6647
  "type": "option"
5944
6648
  },
5945
- "table": {
5946
- "char": "t",
5947
- "description": "Table name of the record to export",
5948
- "name": "table",
5949
- "required": true,
5950
- "hasDynamicHelp": false,
5951
- "multiple": false,
5952
- "type": "option"
5953
- },
5954
- "sys-id": {
6649
+ "set": {
5955
6650
  "char": "s",
5956
- "description": "Sys ID of the record to export",
5957
- "name": "sys-id",
5958
- "required": true,
5959
- "hasDynamicHelp": false,
5960
- "multiple": false,
5961
- "type": "option"
5962
- },
5963
- "output": {
5964
- "char": "o",
5965
- "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
5966
- "name": "output",
6651
+ "description": "sys_id of update set to make current",
6652
+ "name": "set",
5967
6653
  "required": false,
5968
6654
  "hasDynamicHelp": false,
5969
6655
  "multiple": false,
@@ -5972,7 +6658,7 @@
5972
6658
  },
5973
6659
  "hasDynamicHelp": false,
5974
6660
  "hiddenAliases": [],
5975
- "id": "xml:export",
6661
+ "id": "update-set:current",
5976
6662
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
5977
6663
  "pluginName": "@sonisoft/now-sdk-ext-cli",
5978
6664
  "pluginType": "core",
@@ -5982,30 +6668,33 @@
5982
6668
  "relativePath": [
5983
6669
  "dist",
5984
6670
  "commands",
5985
- "xml",
5986
- "export.js"
6671
+ "update-set",
6672
+ "current.js"
5987
6673
  ]
5988
6674
  },
5989
- "xml:import": {
6675
+ "update-set": {
5990
6676
  "aliases": [],
5991
6677
  "args": {},
5992
- "description": "Import XML records into a ServiceNow instance.\n\nReads an XML file and imports its contents into the specified target table. The XML should be in ServiceNow unload format.\n\nFeatures:\n • Import from local XML files\n • Target a specific table\n • JSON output mode for CI/CD integration",
6678
+ "description": "List update sets on a ServiceNow instance.",
5993
6679
  "examples": [
5994
6680
  {
5995
- "description": "Import records from an XML file",
5996
- "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
6681
+ "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6682
+ "description": "List update sets with default limit"
5997
6683
  },
5998
6684
  {
5999
- "description": "Import with JSON output",
6000
- "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
6685
+ "command": "<%= config.bin %> <%= command.id %> --query \"state=in progress\" --limit 50 --auth dev-instance",
6686
+ "description": "List update sets with a custom query filter"
6687
+ },
6688
+ {
6689
+ "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6690
+ "description": "List update sets with JSON output"
6001
6691
  }
6002
6692
  ],
6003
6693
  "flags": {
6004
6694
  "json": {
6005
- "char": "j",
6006
- "description": "Output results as JSON",
6695
+ "description": "Format output as json.",
6696
+ "helpGroup": "GLOBAL",
6007
6697
  "name": "json",
6008
- "required": false,
6009
6698
  "allowNo": false,
6010
6699
  "type": "boolean"
6011
6700
  },
@@ -6018,6 +6707,14 @@
6018
6707
  "multiple": false,
6019
6708
  "type": "option"
6020
6709
  },
6710
+ "cred-store": {
6711
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6712
+ "helpGroup": "GLOBAL",
6713
+ "name": "cred-store",
6714
+ "required": false,
6715
+ "allowNo": false,
6716
+ "type": "boolean"
6717
+ },
6021
6718
  "log-level": {
6022
6719
  "helpGroup": "GLOBAL",
6023
6720
  "name": "log-level",
@@ -6034,20 +6731,20 @@
6034
6731
  ],
6035
6732
  "type": "option"
6036
6733
  },
6037
- "file": {
6038
- "char": "f",
6039
- "description": "Path to the XML file to import",
6040
- "name": "file",
6041
- "required": true,
6734
+ "limit": {
6735
+ "description": "Maximum number of update sets to return",
6736
+ "name": "limit",
6737
+ "required": false,
6738
+ "default": 20,
6042
6739
  "hasDynamicHelp": false,
6043
6740
  "multiple": false,
6044
6741
  "type": "option"
6045
6742
  },
6046
- "table": {
6047
- "char": "t",
6048
- "description": "Target table to import records into",
6049
- "name": "table",
6050
- "required": true,
6743
+ "query": {
6744
+ "char": "q",
6745
+ "description": "Encoded query filter",
6746
+ "name": "query",
6747
+ "required": false,
6051
6748
  "hasDynamicHelp": false,
6052
6749
  "multiple": false,
6053
6750
  "type": "option"
@@ -6055,7 +6752,7 @@
6055
6752
  },
6056
6753
  "hasDynamicHelp": false,
6057
6754
  "hiddenAliases": [],
6058
- "id": "xml:import",
6755
+ "id": "update-set",
6059
6756
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6060
6757
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6061
6758
  "pluginType": "core",
@@ -6065,26 +6762,22 @@
6065
6762
  "relativePath": [
6066
6763
  "dist",
6067
6764
  "commands",
6068
- "xml",
6069
- "import.js"
6765
+ "update-set",
6766
+ "index.js"
6070
6767
  ]
6071
6768
  },
6072
- "search:add-table": {
6769
+ "update-set:inspect": {
6073
6770
  "aliases": [],
6074
6771
  "args": {},
6075
- "description": "Add a table to a code search group on a ServiceNow instance.\n\nThis command registers a new table and its searchable fields with a search group, making the table's records discoverable through code search. This is useful when you need to include custom tables in code search results.\n\nFeatures:\n • Add custom tables to search groups\n • Specify which fields should be indexed\n • JSON output for scripting and automation",
6772
+ "description": "Inspect the components of an update set.",
6076
6773
  "examples": [
6077
6774
  {
6078
- "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --search-fields script --search-group \"Script Includes\" --auth dev-instance",
6079
- "description": "Add a table to a search group"
6080
- },
6081
- {
6082
- "command": "<%= config.bin %> <%= command.id %> --table sys_ui_page --search-fields \"html,client_script,processing_script\" --search-group \"UI Pages\" --auth dev-instance",
6083
- "description": "Add a table with multiple search fields"
6775
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --auth dev-instance",
6776
+ "description": "Inspect an update set by sys_id"
6084
6777
  },
6085
6778
  {
6086
- "command": "<%= config.bin %> <%= command.id %> --table u_custom_script --search-fields script --search-group \"Custom\" --json --auth dev-instance",
6087
- "description": "Add a table with JSON output"
6779
+ "command": "<%= config.bin %> <%= command.id %> --sys-id us-001 --json --auth dev-instance",
6780
+ "description": "Inspect with JSON output"
6088
6781
  }
6089
6782
  ],
6090
6783
  "flags": {
@@ -6104,6 +6797,14 @@
6104
6797
  "multiple": false,
6105
6798
  "type": "option"
6106
6799
  },
6800
+ "cred-store": {
6801
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6802
+ "helpGroup": "GLOBAL",
6803
+ "name": "cred-store",
6804
+ "required": false,
6805
+ "allowNo": false,
6806
+ "type": "boolean"
6807
+ },
6107
6808
  "log-level": {
6108
6809
  "helpGroup": "GLOBAL",
6109
6810
  "name": "log-level",
@@ -6120,28 +6821,10 @@
6120
6821
  ],
6121
6822
  "type": "option"
6122
6823
  },
6123
- "search-fields": {
6124
- "char": "f",
6125
- "description": "Comma-separated list of fields to index for search",
6126
- "name": "search-fields",
6127
- "required": true,
6128
- "hasDynamicHelp": false,
6129
- "multiple": false,
6130
- "type": "option"
6131
- },
6132
- "search-group": {
6133
- "char": "g",
6134
- "description": "Search group to add the table to",
6135
- "name": "search-group",
6136
- "required": true,
6137
- "hasDynamicHelp": false,
6138
- "multiple": false,
6139
- "type": "option"
6140
- },
6141
- "table": {
6142
- "char": "t",
6143
- "description": "Table name to add to the search group",
6144
- "name": "table",
6824
+ "sys-id": {
6825
+ "char": "s",
6826
+ "description": "sys_id of the update set to inspect",
6827
+ "name": "sys-id",
6145
6828
  "required": true,
6146
6829
  "hasDynamicHelp": false,
6147
6830
  "multiple": false,
@@ -6150,7 +6833,7 @@
6150
6833
  },
6151
6834
  "hasDynamicHelp": false,
6152
6835
  "hiddenAliases": [],
6153
- "id": "search:add-table",
6836
+ "id": "update-set:inspect",
6154
6837
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6155
6838
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6156
6839
  "pluginType": "core",
@@ -6160,22 +6843,26 @@
6160
6843
  "relativePath": [
6161
6844
  "dist",
6162
6845
  "commands",
6163
- "search",
6164
- "add-table.js"
6846
+ "update-set",
6847
+ "inspect.js"
6165
6848
  ]
6166
6849
  },
6167
- "search:groups": {
6850
+ "update-set:move": {
6168
6851
  "aliases": [],
6169
6852
  "args": {},
6170
- "description": "List all available code search groups on a ServiceNow instance.\n\nSearch groups organize searchable tables into logical categories. Use this command to discover which search groups are configured, then use the group names with other search commands to narrow your search scope.\n\nFeatures:\n • List all configured search groups\n • JSON output for scripting and automation",
6853
+ "description": "Move records between update sets.",
6171
6854
  "examples": [
6172
6855
  {
6173
- "command": "<%= config.bin %> <%= command.id %> --auth dev-instance",
6174
- "description": "List all search groups"
6856
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --auth dev-instance",
6857
+ "description": "Move all records from one update set to another"
6175
6858
  },
6176
6859
  {
6177
- "command": "<%= config.bin %> <%= command.id %> --json --auth dev-instance",
6178
- "description": "List search groups with JSON output"
6860
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --records \"rec-001,rec-002,rec-003\" --auth dev-instance",
6861
+ "description": "Move specific records to a target update set"
6862
+ },
6863
+ {
6864
+ "command": "<%= config.bin %> <%= command.id %> --target us-002 --source us-001 --json --auth dev-instance",
6865
+ "description": "Move records with JSON output"
6179
6866
  }
6180
6867
  ],
6181
6868
  "flags": {
@@ -6195,6 +6882,14 @@
6195
6882
  "multiple": false,
6196
6883
  "type": "option"
6197
6884
  },
6885
+ "cred-store": {
6886
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6887
+ "helpGroup": "GLOBAL",
6888
+ "name": "cred-store",
6889
+ "required": false,
6890
+ "allowNo": false,
6891
+ "type": "boolean"
6892
+ },
6198
6893
  "log-level": {
6199
6894
  "helpGroup": "GLOBAL",
6200
6895
  "name": "log-level",
@@ -6210,11 +6905,35 @@
6210
6905
  "trace"
6211
6906
  ],
6212
6907
  "type": "option"
6908
+ },
6909
+ "records": {
6910
+ "description": "Comma-separated sys_ids of records to move",
6911
+ "name": "records",
6912
+ "required": false,
6913
+ "hasDynamicHelp": false,
6914
+ "multiple": false,
6915
+ "type": "option"
6916
+ },
6917
+ "source": {
6918
+ "description": "Source update set sys_id",
6919
+ "name": "source",
6920
+ "required": false,
6921
+ "hasDynamicHelp": false,
6922
+ "multiple": false,
6923
+ "type": "option"
6924
+ },
6925
+ "target": {
6926
+ "description": "Target update set sys_id",
6927
+ "name": "target",
6928
+ "required": true,
6929
+ "hasDynamicHelp": false,
6930
+ "multiple": false,
6931
+ "type": "option"
6213
6932
  }
6214
6933
  },
6215
6934
  "hasDynamicHelp": false,
6216
6935
  "hiddenAliases": [],
6217
- "id": "search:groups",
6936
+ "id": "update-set:move",
6218
6937
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6219
6938
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6220
6939
  "pluginType": "core",
@@ -6224,37 +6943,34 @@
6224
6943
  "relativePath": [
6225
6944
  "dist",
6226
6945
  "commands",
6227
- "search",
6228
- "groups.js"
6946
+ "update-set",
6947
+ "move.js"
6229
6948
  ]
6230
6949
  },
6231
- "search": {
6950
+ "xml:export": {
6232
6951
  "aliases": [],
6233
6952
  "args": {},
6234
- "description": "Search platform code across a ServiceNow instance.\n\nThis command allows you to search through code stored on the platform, including scripts, business rules, UI pages, and other scriptable records. You can search globally, within a specific application scope, or within a specific table and search group.\n\nFeatures:\n • Full-text code search across the platform\n • Scope-specific search within application boundaries\n • Table-specific search within a search group\n • JSON output for CI/CD integration\n • Configurable result limits",
6953
+ "description": "Export a single ServiceNow record as XML.\n\nDownloads the XML representation of a specific record from a ServiceNow table. Without --output, the XML is printed to stdout. With --output, the XML is written to the specified file path.\n\nFeatures:\n • Export any record by table and sys_id\n • Print XML to stdout for piping to other tools\n • Save directly to a file with --output\n • JSON output mode for CI/CD integration",
6235
6954
  "examples": [
6236
6955
  {
6237
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --auth dev-instance",
6238
- "description": "Search for a term across the entire instance"
6239
- },
6240
- {
6241
- "command": "<%= config.bin %> <%= command.id %> --term \"getValue\" --scope x_my_app --auth dev-instance",
6242
- "description": "Search within a specific application scope"
6956
+ "description": "Export a record to stdout",
6957
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script_include --sys-id abc123def456 --auth dev"
6243
6958
  },
6244
6959
  {
6245
- "command": "<%= config.bin %> <%= command.id %> --term \"initialize\" --search-group \"Script Includes\" --table sys_script_include --auth dev-instance",
6246
- "description": "Search within a specific table and search group"
6960
+ "description": "Export and save to a file",
6961
+ "command": "<%= config.bin %> <%= command.id %> --table incident --sys-id abc123 --output ./export.xml --auth dev"
6247
6962
  },
6248
6963
  {
6249
- "command": "<%= config.bin %> <%= command.id %> --term \"GlideRecord\" --limit 10 --json --auth dev-instance",
6250
- "description": "Search with a result limit and JSON output"
6964
+ "description": "Export as JSON metadata",
6965
+ "command": "<%= config.bin %> <%= command.id %> --table sys_script --sys-id abc123 --json --auth dev"
6251
6966
  }
6252
6967
  ],
6253
6968
  "flags": {
6254
6969
  "json": {
6255
- "description": "Format output as json.",
6256
- "helpGroup": "GLOBAL",
6970
+ "char": "j",
6971
+ "description": "Output results as JSON",
6257
6972
  "name": "json",
6973
+ "required": false,
6258
6974
  "allowNo": false,
6259
6975
  "type": "boolean"
6260
6976
  },
@@ -6267,6 +6983,14 @@
6267
6983
  "multiple": false,
6268
6984
  "type": "option"
6269
6985
  },
6986
+ "cred-store": {
6987
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
6988
+ "helpGroup": "GLOBAL",
6989
+ "name": "cred-store",
6990
+ "required": false,
6991
+ "allowNo": false,
6992
+ "type": "boolean"
6993
+ },
6270
6994
  "log-level": {
6271
6995
  "helpGroup": "GLOBAL",
6272
6996
  "name": "log-level",
@@ -6283,54 +7007,37 @@
6283
7007
  ],
6284
7008
  "type": "option"
6285
7009
  },
6286
- "limit": {
6287
- "char": "l",
6288
- "description": "Maximum number of results to return",
6289
- "name": "limit",
6290
- "required": false,
7010
+ "table": {
7011
+ "char": "t",
7012
+ "description": "Table name of the record to export",
7013
+ "name": "table",
7014
+ "required": true,
6291
7015
  "hasDynamicHelp": false,
6292
7016
  "multiple": false,
6293
7017
  "type": "option"
6294
7018
  },
6295
- "scope": {
7019
+ "sys-id": {
6296
7020
  "char": "s",
6297
- "description": "Application scope to search within",
6298
- "name": "scope",
6299
- "required": false,
6300
- "hasDynamicHelp": false,
6301
- "multiple": false,
6302
- "type": "option"
6303
- },
6304
- "search-group": {
6305
- "char": "g",
6306
- "description": "Search group to search within (required when using --table)",
6307
- "name": "search-group",
6308
- "required": false,
7021
+ "description": "Sys ID of the record to export",
7022
+ "name": "sys-id",
7023
+ "required": true,
6309
7024
  "hasDynamicHelp": false,
6310
7025
  "multiple": false,
6311
7026
  "type": "option"
6312
7027
  },
6313
- "table": {
6314
- "description": "Table name to search within (requires --search-group)",
6315
- "name": "table",
7028
+ "output": {
7029
+ "char": "o",
7030
+ "description": "File path to write the exported XML to. If omitted, XML is printed to stdout.",
7031
+ "name": "output",
6316
7032
  "required": false,
6317
7033
  "hasDynamicHelp": false,
6318
7034
  "multiple": false,
6319
7035
  "type": "option"
6320
- },
6321
- "term": {
6322
- "char": "t",
6323
- "description": "Search term to look for in platform code",
6324
- "name": "term",
6325
- "required": true,
6326
- "hasDynamicHelp": false,
6327
- "multiple": false,
6328
- "type": "option"
6329
7036
  }
6330
7037
  },
6331
7038
  "hasDynamicHelp": false,
6332
7039
  "hiddenAliases": [],
6333
- "id": "search",
7040
+ "id": "xml:export",
6334
7041
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6335
7042
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6336
7043
  "pluginType": "core",
@@ -6340,29 +7047,30 @@
6340
7047
  "relativePath": [
6341
7048
  "dist",
6342
7049
  "commands",
6343
- "search",
6344
- "index.js"
7050
+ "xml",
7051
+ "export.js"
6345
7052
  ]
6346
7053
  },
6347
- "search:tables": {
7054
+ "xml:import": {
6348
7055
  "aliases": [],
6349
7056
  "args": {},
6350
- "description": "List tables configured for a specific code search group.\n\nEach search group contains one or more tables that are indexed for code search. Use this command to discover which tables belong to a search group, including the fields that are searchable on each table.\n\nFeatures:\n • List all tables in a search group\n • View searchable fields per table\n • JSON output for scripting and automation",
7057
+ "description": "Import XML records into a ServiceNow instance.\n\nReads an XML file and imports its contents into the specified target table. The XML should be in ServiceNow unload format.\n\nFeatures:\n • Import from local XML files\n • Target a specific table\n • JSON output mode for CI/CD integration",
6351
7058
  "examples": [
6352
7059
  {
6353
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Script Includes\" --auth dev-instance",
6354
- "description": "List tables in a search group"
7060
+ "description": "Import records from an XML file",
7061
+ "command": "<%= config.bin %> <%= command.id %> --file ./export.xml --table sys_script_include --auth dev"
6355
7062
  },
6356
7063
  {
6357
- "command": "<%= config.bin %> <%= command.id %> --search-group \"Business Rules\" --json --auth dev-instance",
6358
- "description": "List tables with JSON output"
7064
+ "description": "Import with JSON output",
7065
+ "command": "<%= config.bin %> <%= command.id %> --file ./records.xml --table incident --json --auth dev"
6359
7066
  }
6360
7067
  ],
6361
7068
  "flags": {
6362
7069
  "json": {
6363
- "description": "Format output as json.",
6364
- "helpGroup": "GLOBAL",
7070
+ "char": "j",
7071
+ "description": "Output results as JSON",
6365
7072
  "name": "json",
7073
+ "required": false,
6366
7074
  "allowNo": false,
6367
7075
  "type": "boolean"
6368
7076
  },
@@ -6375,6 +7083,14 @@
6375
7083
  "multiple": false,
6376
7084
  "type": "option"
6377
7085
  },
7086
+ "cred-store": {
7087
+ "description": "Read credentials from @sonisoft/sn-credstore instead of the OS keyring. Use this in headless sessions (SSH, systemd, CI, agents) where the keyring cannot be unlocked.",
7088
+ "helpGroup": "GLOBAL",
7089
+ "name": "cred-store",
7090
+ "required": false,
7091
+ "allowNo": false,
7092
+ "type": "boolean"
7093
+ },
6378
7094
  "log-level": {
6379
7095
  "helpGroup": "GLOBAL",
6380
7096
  "name": "log-level",
@@ -6391,10 +7107,19 @@
6391
7107
  ],
6392
7108
  "type": "option"
6393
7109
  },
6394
- "search-group": {
6395
- "char": "g",
6396
- "description": "Search group name to list tables for",
6397
- "name": "search-group",
7110
+ "file": {
7111
+ "char": "f",
7112
+ "description": "Path to the XML file to import",
7113
+ "name": "file",
7114
+ "required": true,
7115
+ "hasDynamicHelp": false,
7116
+ "multiple": false,
7117
+ "type": "option"
7118
+ },
7119
+ "table": {
7120
+ "char": "t",
7121
+ "description": "Target table to import records into",
7122
+ "name": "table",
6398
7123
  "required": true,
6399
7124
  "hasDynamicHelp": false,
6400
7125
  "multiple": false,
@@ -6403,7 +7128,7 @@
6403
7128
  },
6404
7129
  "hasDynamicHelp": false,
6405
7130
  "hiddenAliases": [],
6406
- "id": "search:tables",
7131
+ "id": "xml:import",
6407
7132
  "pluginAlias": "@sonisoft/now-sdk-ext-cli",
6408
7133
  "pluginName": "@sonisoft/now-sdk-ext-cli",
6409
7134
  "pluginType": "core",
@@ -6413,10 +7138,10 @@
6413
7138
  "relativePath": [
6414
7139
  "dist",
6415
7140
  "commands",
6416
- "search",
6417
- "tables.js"
7141
+ "xml",
7142
+ "import.js"
6418
7143
  ]
6419
7144
  }
6420
7145
  },
6421
- "version": "3.0.0"
7146
+ "version": "5.0.1"
6422
7147
  }