@sonisoft/now-sdk-ext-cli 2.0.0-alpha.0 → 2.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 (353) hide show
  1. package/README.md +2912 -313
  2. package/dist/commands/aggregate/count.d.ts +16 -0
  3. package/dist/commands/aggregate/count.d.ts.map +1 -0
  4. package/dist/commands/aggregate/count.js +67 -0
  5. package/dist/commands/aggregate/count.js.map +1 -0
  6. package/dist/commands/aggregate/group.d.ts +24 -0
  7. package/dist/commands/aggregate/group.d.ts.map +1 -0
  8. package/dist/commands/aggregate/group.js +120 -0
  9. package/dist/commands/aggregate/group.js.map +1 -0
  10. package/dist/commands/aggregate/query.d.ts +21 -0
  11. package/dist/commands/aggregate/query.d.ts.map +1 -0
  12. package/dist/commands/aggregate/query.js +100 -0
  13. package/dist/commands/aggregate/query.js.map +1 -0
  14. package/dist/commands/app/index.d.ts +0 -1
  15. package/dist/commands/app/index.d.ts.map +1 -1
  16. package/dist/commands/app/index.js +2 -2
  17. package/dist/commands/app/index.js.map +1 -1
  18. package/dist/commands/app/install.d.ts +0 -1
  19. package/dist/commands/app/install.d.ts.map +1 -1
  20. package/dist/commands/app/install.js +1 -2
  21. package/dist/commands/app/install.js.map +1 -1
  22. package/dist/commands/app/repo-install.d.ts +0 -1
  23. package/dist/commands/app/repo-install.d.ts.map +1 -1
  24. package/dist/commands/app/repo-install.js +1 -3
  25. package/dist/commands/app/repo-install.js.map +1 -1
  26. package/dist/commands/app/repo-list.d.ts +0 -1
  27. package/dist/commands/app/repo-list.d.ts.map +1 -1
  28. package/dist/commands/app/repo-list.js +1 -3
  29. package/dist/commands/app/repo-list.js.map +1 -1
  30. package/dist/commands/app/uninstall.d.ts +0 -1
  31. package/dist/commands/app/uninstall.d.ts.map +1 -1
  32. package/dist/commands/app/uninstall.js +1 -2
  33. package/dist/commands/app/uninstall.js.map +1 -1
  34. package/dist/commands/atf/index.d.ts +0 -46
  35. package/dist/commands/atf/index.d.ts.map +1 -1
  36. package/dist/commands/atf/index.js +48 -121
  37. package/dist/commands/atf/index.js.map +1 -1
  38. package/dist/commands/attachment/get.d.ts +14 -0
  39. package/dist/commands/attachment/get.d.ts.map +1 -0
  40. package/dist/commands/attachment/get.js +44 -0
  41. package/dist/commands/attachment/get.js.map +1 -0
  42. package/dist/commands/attachment/list.d.ts +16 -0
  43. package/dist/commands/attachment/list.d.ts.map +1 -0
  44. package/dist/commands/attachment/list.js +60 -0
  45. package/dist/commands/attachment/list.js.map +1 -0
  46. package/dist/commands/attachment/upload.d.ts +17 -0
  47. package/dist/commands/attachment/upload.d.ts.map +1 -0
  48. package/dist/commands/attachment/upload.js +71 -0
  49. package/dist/commands/attachment/upload.js.map +1 -0
  50. package/dist/commands/batch/create.d.ts +15 -0
  51. package/dist/commands/batch/create.d.ts.map +1 -0
  52. package/dist/commands/batch/create.js +56 -0
  53. package/dist/commands/batch/create.js.map +1 -0
  54. package/dist/commands/batch/update.d.ts +15 -0
  55. package/dist/commands/batch/update.d.ts.map +1 -0
  56. package/dist/commands/batch/update.js +56 -0
  57. package/dist/commands/batch/update.js.map +1 -0
  58. package/dist/commands/bulk/delete.d.ts +18 -0
  59. package/dist/commands/bulk/delete.d.ts.map +1 -0
  60. package/dist/commands/bulk/delete.js +95 -0
  61. package/dist/commands/bulk/delete.js.map +1 -0
  62. package/dist/commands/bulk/update.d.ts +19 -0
  63. package/dist/commands/bulk/update.d.ts.map +1 -0
  64. package/dist/commands/bulk/update.js +110 -0
  65. package/dist/commands/bulk/update.js.map +1 -0
  66. package/dist/commands/exec/index.d.ts +0 -1
  67. package/dist/commands/exec/index.d.ts.map +1 -1
  68. package/dist/commands/exec/index.js +12 -22
  69. package/dist/commands/exec/index.js.map +1 -1
  70. package/dist/commands/flow/action.d.ts +19 -0
  71. package/dist/commands/flow/action.d.ts.map +1 -0
  72. package/dist/commands/flow/action.js +88 -0
  73. package/dist/commands/flow/action.js.map +1 -0
  74. package/dist/commands/flow/cancel.d.ts +17 -0
  75. package/dist/commands/flow/cancel.d.ts.map +1 -0
  76. package/dist/commands/flow/cancel.js +60 -0
  77. package/dist/commands/flow/cancel.js.map +1 -0
  78. package/dist/commands/flow/error.d.ts +16 -0
  79. package/dist/commands/flow/error.d.ts.map +1 -0
  80. package/dist/commands/flow/error.js +51 -0
  81. package/dist/commands/flow/error.js.map +1 -0
  82. package/dist/commands/flow/message.d.ts +18 -0
  83. package/dist/commands/flow/message.d.ts.map +1 -0
  84. package/dist/commands/flow/message.js +66 -0
  85. package/dist/commands/flow/message.js.map +1 -0
  86. package/dist/commands/flow/outputs.d.ts +16 -0
  87. package/dist/commands/flow/outputs.d.ts.map +1 -0
  88. package/dist/commands/flow/outputs.js +55 -0
  89. package/dist/commands/flow/outputs.js.map +1 -0
  90. package/dist/commands/flow/run.d.ts +19 -0
  91. package/dist/commands/flow/run.d.ts.map +1 -0
  92. package/dist/commands/flow/run.js +98 -0
  93. package/dist/commands/flow/run.js.map +1 -0
  94. package/dist/commands/flow/status.d.ts +16 -0
  95. package/dist/commands/flow/status.d.ts.map +1 -0
  96. package/dist/commands/flow/status.js +52 -0
  97. package/dist/commands/flow/status.js.map +1 -0
  98. package/dist/commands/flow/subflow.d.ts +19 -0
  99. package/dist/commands/flow/subflow.d.ts.map +1 -0
  100. package/dist/commands/flow/subflow.js +92 -0
  101. package/dist/commands/flow/subflow.js.map +1 -0
  102. package/dist/commands/health/check.d.ts +20 -0
  103. package/dist/commands/health/check.d.ts.map +1 -0
  104. package/dist/commands/health/check.js +105 -0
  105. package/dist/commands/health/check.js.map +1 -0
  106. package/dist/commands/log/index.d.ts +2 -26
  107. package/dist/commands/log/index.d.ts.map +1 -1
  108. package/dist/commands/log/index.js +23 -251
  109. package/dist/commands/log/index.js.map +1 -1
  110. package/dist/commands/query/app.d.ts +17 -0
  111. package/dist/commands/query/app.d.ts.map +1 -0
  112. package/dist/commands/query/app.js +81 -0
  113. package/dist/commands/query/app.js.map +1 -0
  114. package/dist/commands/query/columns.d.ts +16 -0
  115. package/dist/commands/query/columns.d.ts.map +1 -0
  116. package/dist/commands/query/columns.js +76 -0
  117. package/dist/commands/query/columns.js.map +1 -0
  118. package/dist/commands/query/index.d.ts +19 -0
  119. package/dist/commands/query/index.d.ts.map +1 -0
  120. package/dist/commands/query/index.js +94 -0
  121. package/dist/commands/query/index.js.map +1 -0
  122. package/dist/commands/query/syslog.d.ts +16 -0
  123. package/dist/commands/query/syslog.d.ts.map +1 -0
  124. package/dist/commands/query/syslog.js +67 -0
  125. package/dist/commands/query/syslog.js.map +1 -0
  126. package/dist/commands/schema/field.d.ts +16 -0
  127. package/dist/commands/schema/field.d.ts.map +1 -0
  128. package/dist/commands/schema/field.js +62 -0
  129. package/dist/commands/schema/field.js.map +1 -0
  130. package/dist/commands/schema/index.d.ts +19 -0
  131. package/dist/commands/schema/index.d.ts.map +1 -0
  132. package/dist/commands/schema/index.js +90 -0
  133. package/dist/commands/schema/index.js.map +1 -0
  134. package/dist/commands/schema/validate-catalog.d.ts +15 -0
  135. package/dist/commands/schema/validate-catalog.d.ts.map +1 -0
  136. package/dist/commands/schema/validate-catalog.js +58 -0
  137. package/dist/commands/schema/validate-catalog.js.map +1 -0
  138. package/dist/commands/scope/index.d.ts +14 -0
  139. package/dist/commands/scope/index.d.ts.map +1 -0
  140. package/dist/commands/scope/index.js +58 -0
  141. package/dist/commands/scope/index.js.map +1 -0
  142. package/dist/commands/scope/set.d.ts +14 -0
  143. package/dist/commands/scope/set.d.ts.map +1 -0
  144. package/dist/commands/scope/set.js +44 -0
  145. package/dist/commands/scope/set.js.map +1 -0
  146. package/dist/commands/script-sync/pull.d.ts +16 -0
  147. package/dist/commands/script-sync/pull.d.ts.map +1 -0
  148. package/dist/commands/script-sync/pull.js +74 -0
  149. package/dist/commands/script-sync/pull.js.map +1 -0
  150. package/dist/commands/script-sync/push.d.ts +16 -0
  151. package/dist/commands/script-sync/push.d.ts.map +1 -0
  152. package/dist/commands/script-sync/push.js +73 -0
  153. package/dist/commands/script-sync/push.js.map +1 -0
  154. package/dist/commands/script-sync/sync.d.ts +15 -0
  155. package/dist/commands/script-sync/sync.d.ts.map +1 -0
  156. package/dist/commands/script-sync/sync.js +71 -0
  157. package/dist/commands/script-sync/sync.js.map +1 -0
  158. package/dist/commands/search/add-table.d.ts +16 -0
  159. package/dist/commands/search/add-table.d.ts.map +1 -0
  160. package/dist/commands/search/add-table.js +68 -0
  161. package/dist/commands/search/add-table.js.map +1 -0
  162. package/dist/commands/search/groups.d.ts +12 -0
  163. package/dist/commands/search/groups.d.ts.map +1 -0
  164. package/dist/commands/search/groups.js +42 -0
  165. package/dist/commands/search/groups.js.map +1 -0
  166. package/dist/commands/search/index.d.ts +18 -0
  167. package/dist/commands/search/index.d.ts.map +1 -0
  168. package/dist/commands/search/index.js +103 -0
  169. package/dist/commands/search/index.js.map +1 -0
  170. package/dist/commands/search/tables.d.ts +14 -0
  171. package/dist/commands/search/tables.d.ts.map +1 -0
  172. package/dist/commands/search/tables.js +50 -0
  173. package/dist/commands/search/tables.js.map +1 -0
  174. package/dist/commands/store/install.d.ts +19 -0
  175. package/dist/commands/store/install.d.ts.map +1 -0
  176. package/dist/commands/store/install.js +90 -0
  177. package/dist/commands/store/install.js.map +1 -0
  178. package/dist/commands/store/search.d.ts +16 -0
  179. package/dist/commands/store/search.d.ts.map +1 -0
  180. package/dist/commands/store/search.js +67 -0
  181. package/dist/commands/store/search.js.map +1 -0
  182. package/dist/commands/store/update.d.ts +18 -0
  183. package/dist/commands/store/update.d.ts.map +1 -0
  184. package/dist/commands/store/update.js +83 -0
  185. package/dist/commands/store/update.js.map +1 -0
  186. package/dist/commands/store/validate.d.ts +14 -0
  187. package/dist/commands/store/validate.d.ts.map +1 -0
  188. package/dist/commands/store/validate.js +43 -0
  189. package/dist/commands/store/validate.js.map +1 -0
  190. package/dist/commands/task/approve.d.ts +15 -0
  191. package/dist/commands/task/approve.d.ts.map +1 -0
  192. package/dist/commands/task/approve.js +66 -0
  193. package/dist/commands/task/approve.js.map +1 -0
  194. package/dist/commands/task/assign.d.ts +17 -0
  195. package/dist/commands/task/assign.d.ts.map +1 -0
  196. package/dist/commands/task/assign.js +86 -0
  197. package/dist/commands/task/assign.js.map +1 -0
  198. package/dist/commands/task/close.d.ts +16 -0
  199. package/dist/commands/task/close.d.ts.map +1 -0
  200. package/dist/commands/task/close.js +71 -0
  201. package/dist/commands/task/close.js.map +1 -0
  202. package/dist/commands/task/comment.d.ts +17 -0
  203. package/dist/commands/task/comment.d.ts.map +1 -0
  204. package/dist/commands/task/comment.js +86 -0
  205. package/dist/commands/task/comment.js.map +1 -0
  206. package/dist/commands/task/find.d.ts +15 -0
  207. package/dist/commands/task/find.d.ts.map +1 -0
  208. package/dist/commands/task/find.js +65 -0
  209. package/dist/commands/task/find.js.map +1 -0
  210. package/dist/commands/task/resolve.d.ts +16 -0
  211. package/dist/commands/task/resolve.d.ts.map +1 -0
  212. package/dist/commands/task/resolve.js +71 -0
  213. package/dist/commands/task/resolve.js.map +1 -0
  214. package/dist/commands/update-set/clone.d.ts +15 -0
  215. package/dist/commands/update-set/clone.d.ts.map +1 -0
  216. package/dist/commands/update-set/clone.js +50 -0
  217. package/dist/commands/update-set/clone.js.map +1 -0
  218. package/dist/commands/update-set/create.d.ts +16 -0
  219. package/dist/commands/update-set/create.d.ts.map +1 -0
  220. package/dist/commands/update-set/create.js +60 -0
  221. package/dist/commands/update-set/create.js.map +1 -0
  222. package/dist/commands/update-set/current.d.ts +14 -0
  223. package/dist/commands/update-set/current.d.ts.map +1 -0
  224. package/dist/commands/update-set/current.js +55 -0
  225. package/dist/commands/update-set/current.js.map +1 -0
  226. package/dist/commands/update-set/index.d.ts +15 -0
  227. package/dist/commands/update-set/index.d.ts.map +1 -0
  228. package/dist/commands/update-set/index.js +56 -0
  229. package/dist/commands/update-set/index.js.map +1 -0
  230. package/dist/commands/update-set/inspect.d.ts +14 -0
  231. package/dist/commands/update-set/inspect.d.ts.map +1 -0
  232. package/dist/commands/update-set/inspect.js +43 -0
  233. package/dist/commands/update-set/inspect.js.map +1 -0
  234. package/dist/commands/update-set/move.d.ts +16 -0
  235. package/dist/commands/update-set/move.d.ts.map +1 -0
  236. package/dist/commands/update-set/move.js +57 -0
  237. package/dist/commands/update-set/move.js.map +1 -0
  238. package/dist/commands/workflow/create.d.ts +14 -0
  239. package/dist/commands/workflow/create.d.ts.map +1 -0
  240. package/dist/commands/workflow/create.js +50 -0
  241. package/dist/commands/workflow/create.js.map +1 -0
  242. package/dist/commands/workflow/publish.d.ts +15 -0
  243. package/dist/commands/workflow/publish.d.ts.map +1 -0
  244. package/dist/commands/workflow/publish.js +53 -0
  245. package/dist/commands/workflow/publish.js.map +1 -0
  246. package/dist/commands/xml/export.d.ts +17 -0
  247. package/dist/commands/xml/export.d.ts.map +1 -0
  248. package/dist/commands/xml/export.js +87 -0
  249. package/dist/commands/xml/export.js.map +1 -0
  250. package/dist/commands/xml/import.d.ts +16 -0
  251. package/dist/commands/xml/import.d.ts.map +1 -0
  252. package/dist/commands/xml/import.js +69 -0
  253. package/dist/commands/xml/import.js.map +1 -0
  254. package/dist/common/authenticated-command.d.ts +5 -2
  255. package/dist/common/authenticated-command.d.ts.map +1 -1
  256. package/dist/common/authenticated-command.js +12 -3
  257. package/dist/common/authenticated-command.js.map +1 -1
  258. package/dist/common/base-command.d.ts +2 -2
  259. package/dist/common/base-command.d.ts.map +1 -1
  260. package/dist/common/base-command.js +0 -1
  261. package/dist/common/base-command.js.map +1 -1
  262. package/dist/common/scope-autocomplete.js +0 -1
  263. package/dist/common/scope-autocomplete.js.map +1 -1
  264. package/dist/services/aggregate-display.service.d.ts +18 -0
  265. package/dist/services/aggregate-display.service.d.ts.map +1 -0
  266. package/dist/services/aggregate-display.service.js +83 -0
  267. package/dist/services/aggregate-display.service.js.map +1 -0
  268. package/dist/services/app-display.service.d.ts +36 -0
  269. package/dist/services/app-display.service.d.ts.map +1 -0
  270. package/dist/services/app-display.service.js +101 -0
  271. package/dist/services/app-display.service.js.map +1 -0
  272. package/dist/services/atf-result-formatter.service.d.ts +64 -0
  273. package/dist/services/atf-result-formatter.service.d.ts.map +1 -0
  274. package/dist/services/atf-result-formatter.service.js +83 -0
  275. package/dist/services/atf-result-formatter.service.js.map +1 -0
  276. package/dist/services/attachment-display.service.d.ts +18 -0
  277. package/dist/services/attachment-display.service.d.ts.map +1 -0
  278. package/dist/services/attachment-display.service.js +93 -0
  279. package/dist/services/attachment-display.service.js.map +1 -0
  280. package/dist/services/batch-display.service.d.ts +11 -0
  281. package/dist/services/batch-display.service.d.ts.map +1 -0
  282. package/dist/services/batch-display.service.js +75 -0
  283. package/dist/services/batch-display.service.js.map +1 -0
  284. package/dist/services/bulk-display.service.d.ts +11 -0
  285. package/dist/services/bulk-display.service.d.ts.map +1 -0
  286. package/dist/services/bulk-display.service.js +85 -0
  287. package/dist/services/bulk-display.service.js.map +1 -0
  288. package/dist/services/code-search-display.service.d.ts +23 -0
  289. package/dist/services/code-search-display.service.d.ts.map +1 -0
  290. package/dist/services/code-search-display.service.js +130 -0
  291. package/dist/services/code-search-display.service.js.map +1 -0
  292. package/dist/services/flow-display.service.d.ts +10 -0
  293. package/dist/services/flow-display.service.d.ts.map +1 -0
  294. package/dist/services/flow-display.service.js +164 -0
  295. package/dist/services/flow-display.service.js.map +1 -0
  296. package/dist/services/health-display.service.d.ts +8 -0
  297. package/dist/services/health-display.service.d.ts.map +1 -0
  298. package/dist/services/health-display.service.js +91 -0
  299. package/dist/services/health-display.service.js.map +1 -0
  300. package/dist/services/log-filter.service.d.ts +31 -0
  301. package/dist/services/log-filter.service.d.ts.map +1 -0
  302. package/dist/services/log-filter.service.js +117 -0
  303. package/dist/services/log-filter.service.js.map +1 -0
  304. package/dist/services/log-formatter.service.d.ts +30 -0
  305. package/dist/services/log-formatter.service.d.ts.map +1 -0
  306. package/dist/services/log-formatter.service.js +122 -0
  307. package/dist/services/log-formatter.service.js.map +1 -0
  308. package/dist/services/query-display.service.d.ts +23 -0
  309. package/dist/services/query-display.service.d.ts.map +1 -0
  310. package/dist/services/query-display.service.js +152 -0
  311. package/dist/services/query-display.service.js.map +1 -0
  312. package/dist/services/schema-display.service.d.ts +18 -0
  313. package/dist/services/schema-display.service.d.ts.map +1 -0
  314. package/dist/services/schema-display.service.js +106 -0
  315. package/dist/services/schema-display.service.js.map +1 -0
  316. package/dist/services/scope-display.service.d.ts +18 -0
  317. package/dist/services/scope-display.service.d.ts.map +1 -0
  318. package/dist/services/scope-display.service.js +83 -0
  319. package/dist/services/scope-display.service.js.map +1 -0
  320. package/dist/services/script-parameter.service.d.ts +16 -0
  321. package/dist/services/script-parameter.service.d.ts.map +1 -0
  322. package/dist/services/script-parameter.service.js +34 -0
  323. package/dist/services/script-parameter.service.js.map +1 -0
  324. package/dist/services/script-sync-display.service.d.ts +13 -0
  325. package/dist/services/script-sync-display.service.d.ts.map +1 -0
  326. package/dist/services/script-sync-display.service.js +71 -0
  327. package/dist/services/script-sync-display.service.js.map +1 -0
  328. package/dist/services/store-app-display.service.d.ts +16 -0
  329. package/dist/services/store-app-display.service.d.ts.map +1 -0
  330. package/dist/services/store-app-display.service.js +114 -0
  331. package/dist/services/store-app-display.service.js.map +1 -0
  332. package/dist/services/task-display.service.d.ts +14 -0
  333. package/dist/services/task-display.service.d.ts.map +1 -0
  334. package/dist/services/task-display.service.js +86 -0
  335. package/dist/services/task-display.service.js.map +1 -0
  336. package/dist/services/update-set-display.service.d.ts +28 -0
  337. package/dist/services/update-set-display.service.d.ts.map +1 -0
  338. package/dist/services/update-set-display.service.js +150 -0
  339. package/dist/services/update-set-display.service.js.map +1 -0
  340. package/dist/services/workflow-display.service.d.ts +13 -0
  341. package/dist/services/workflow-display.service.d.ts.map +1 -0
  342. package/dist/services/workflow-display.service.js +53 -0
  343. package/dist/services/workflow-display.service.js.map +1 -0
  344. package/dist/services/xml-display.service.d.ts +11 -0
  345. package/dist/services/xml-display.service.d.ts.map +1 -0
  346. package/dist/services/xml-display.service.js +55 -0
  347. package/dist/services/xml-display.service.js.map +1 -0
  348. package/dist/util/log-factory.d.ts +5 -0
  349. package/dist/util/log-factory.d.ts.map +1 -0
  350. package/dist/util/log-factory.js +8 -0
  351. package/dist/util/log-factory.js.map +1 -0
  352. package/oclif.manifest.json +5506 -387
  353. package/package.json +83 -23
package/README.md CHANGED
@@ -34,10 +34,46 @@ Execute individual ATF tests or entire test suites with detailed results, perfec
34
34
  - **Parameterization**: Template scripts with `{placeholder}` replacement
35
35
  - **Scope-Aware**: Execute in global or custom application scopes
36
36
 
37
+ #### 🔍 Query & Search
38
+ - **Table Queries**: Query any ServiceNow table with encoded queries, field selection, and display values
39
+ - **Application Search**: Find applications by name across your instance
40
+ - **Column Discovery**: List and search table columns/fields
41
+ - **Syslog Reader**: Query system logs with filtering
42
+ - **Code Search**: Search scripts across the platform
43
+
44
+ #### 📊 Aggregate & Analytics
45
+ - **Record Counts**: Count records with optional filters
46
+ - **Aggregate Statistics**: Run AVG, MIN, MAX, SUM across table fields
47
+ - **Grouped Aggregation**: Group-by queries with multiple fields and HAVING clauses
48
+
49
+ #### 🏥 Instance Health & Diagnostics
50
+ - **Health Check**: Consolidated instance diagnostics — version info, cluster status, stuck jobs, semaphore counts, operational record counts
51
+ - **Color-coded** status indicators for quick visual assessment
52
+ - **JSON output** for CI/CD monitoring and alerting
53
+
54
+ #### 🔀 Flow Designer Operations
55
+ - **Execute Flows**: Run flows, subflows, and actions in foreground or background mode
56
+ - **Monitor Status**: Check flow context status, retrieve outputs, and inspect errors
57
+ - **Flow Control**: Cancel running flows and send messages to waiting flows
58
+ - **JSON inputs/outputs**: Pass structured inputs and capture flow outputs programmatically
59
+
60
+ #### 🗑️ Bulk Record Operations
61
+ - **Bulk Update**: Update all records matching an encoded query with dry-run safety
62
+ - **Bulk Delete**: Delete records matching a query with confirmation and limits
63
+ - **Dry-run by default**: Preview affected records before committing changes
64
+ - **Progress callbacks**: Real-time progress updates during bulk operations
65
+
37
66
  #### 🎨 Advanced Features
38
67
  - **Dynamic Autocomplete**: Tab completion that queries your ServiceNow instance for scopes
39
- - **Batch Operations**: Install multiple applications from JSON definitions
68
+ - **Batch Operations**: Install multiple applications from JSON definitions or batch create/update records
40
69
  - **Progress Monitoring**: Real-time progress for long-running operations
70
+ - **Schema Discovery**: Inspect table schemas and field definitions
71
+ - **Script Sync**: Pull and push scripts between local files and ServiceNow
72
+ - **Task Management**: Comment, assign, resolve, and close incidents and changes
73
+ - **Update Sets**: Create, inspect, clone, and manage update sets
74
+ - **Workflow Creation**: Create workflows with activities, transitions, and conditions
75
+ - **Scope Management**: Switch application scopes programmatically
76
+ - **Store Integration**: Search, install, and update apps from the ServiceNow Store
41
77
  - **JSON Output**: Perfect for parsing and automation
42
78
 
43
79
  #### 🔄 CI/CD Integration
@@ -56,6 +92,11 @@ Execute individual ATF tests or entire test suites with detailed results, perfec
56
92
  - [Application Management](#application-management)
57
93
  - [Script Execution with REPL](#script-execution-with-repl)
58
94
  - [Company Repository](#company-repository-integration)
95
+ - [Query & Search](#query--search)
96
+ - [Aggregate & Analytics](#aggregate--analytics)
97
+ - [Instance Health Check](#instance-health-check)
98
+ - [Flow Designer](#flow-designer-operations)
99
+ - [Bulk Operations](#bulk-record-operations)
59
100
  - [All Commands](#-commands)
60
101
  - [Authentication](#-authentication)
61
102
  - [Advanced Features](#-advanced-features)
@@ -68,6 +109,32 @@ Execute individual ATF tests or entire test suites with detailed results, perfec
68
109
  - [Documentation](#-documentation)
69
110
  - [Support & Contributing](#-support--contributing)
70
111
 
112
+ ## ⚠️ Breaking Change — v2.0.0 (ServiceNow SDK 4.3.0)
113
+
114
+ > **If you are upgrading from v1.x, read this first.**
115
+ >
116
+ > This version upgrades the underlying ServiceNow SDK dependencies from **4.2.x to 4.3.0** and the core library to **@sonisoft/now-sdk-ext-core 3.4.0**. ServiceNow 4.3.0 **changed how credential aliases are stored**, replacing the previous `keytar`-based credential store with a new implementation.
117
+ >
118
+ > **What this means for you:**
119
+ > - Credential aliases created with ServiceNow SDK 4.2.x **cannot be read** by SDK 4.3.x
120
+ > - You **must re-create all instance aliases** after upgrading
121
+ >
122
+ > **Migration steps:**
123
+ > ```bash
124
+ > # 1. Update the global CLI
125
+ > npm install -g @servicenow/sdk@4.3.0
126
+ >
127
+ > # 2. Re-add each instance alias
128
+ > snc configure profile set
129
+ > # — or —
130
+ > npx @servicenow/sdk auth --add <your-alias>
131
+ >
132
+ > # 3. Verify your aliases work
133
+ > npx @servicenow/sdk auth --list
134
+ > ```
135
+ >
136
+ > All CLI commands and API surfaces remain unchanged — only the underlying authentication storage has changed.
137
+
71
138
  ## 💾 Installation
72
139
 
73
140
  ### Global Installation (Recommended)
@@ -114,7 +181,7 @@ now-sdk --version
114
181
  ### Node.js
115
182
 
116
183
  - **Minimum Version**: Node.js 18.0.0 or higher
117
- - **Recommended**: Node.js 20.x or later
184
+ - **Recommended**: Node.js 22.x (LTS) or later
118
185
 
119
186
  ### ServiceNow Instance
120
187
 
@@ -294,6 +361,138 @@ nex app:repo-install --scope x_custom_app --no-wait --auth prod
294
361
  - Wait for completion or run async
295
362
  - Post-installation verification
296
363
 
364
+ ### Query & Search
365
+
366
+ Query ServiceNow tables, applications, columns, and system logs directly from the CLI.
367
+
368
+ ```bash
369
+ # Query any table with encoded queries
370
+ nex query --table incident --query "active=true^priority=1" --fields number,short_description --limit 10 --auth dev
371
+
372
+ # Search applications by name
373
+ nex query app --name "ITSM" --auth dev
374
+
375
+ # List columns for a table
376
+ nex query columns --table incident --search "description" --auth dev
377
+
378
+ # Query system logs
379
+ nex query syslog --query "level=error" --limit 50 --auth dev
380
+
381
+ # Search platform code
382
+ nex search code --term "GlideRecord" --auth dev
383
+ ```
384
+
385
+ ### Aggregate & Analytics
386
+
387
+ Run aggregate statistics on ServiceNow tables without downloading individual records.
388
+
389
+ ```bash
390
+ # Count records
391
+ nex aggregate count --table incident --query "active=true" --auth dev
392
+
393
+ # Run aggregate statistics (AVG, MIN, MAX, SUM)
394
+ nex aggregate query --table incident --avg reassignment_count --min reassignment_count --max reassignment_count --auth dev
395
+
396
+ # Grouped aggregation with display values
397
+ nex aggregate group --table incident --group-by priority --count --auth dev --display-value all
398
+
399
+ # Multiple group-by fields with HAVING clause
400
+ nex aggregate group --table incident --group-by priority --group-by state --count --having "COUNT>5" --auth dev
401
+ ```
402
+
403
+ ### Instance Health Check
404
+
405
+ Run consolidated health diagnostics on your ServiceNow instance.
406
+
407
+ ```bash
408
+ # Full health check
409
+ nex health check --auth dev
410
+
411
+ # Check only version and stuck jobs
412
+ nex health check --include-version --include-stuck-jobs --no-include-cluster --no-include-semaphores --no-include-operational-counts --auth dev
413
+
414
+ # Health check with custom stuck job threshold (60 minutes)
415
+ nex health check --stuck-job-threshold 60 --auth dev
416
+
417
+ # JSON output for monitoring/alerting
418
+ nex health check --json --auth dev
419
+ ```
420
+
421
+ **Includes:**
422
+ - Instance version and build information
423
+ - Cluster node status (online/offline)
424
+ - Stuck job detection with configurable threshold
425
+ - Active semaphore count
426
+ - Operational counts (open incidents, changes, problems)
427
+ - Color-coded status indicators
428
+
429
+ ### Flow Designer Operations
430
+
431
+ Execute and manage Flow Designer flows, subflows, and actions from the CLI.
432
+
433
+ ```bash
434
+ # Execute a flow in foreground (waits for completion)
435
+ nex flow run --name global.my_flow --auth dev
436
+
437
+ # Execute with inputs
438
+ nex flow run --name global.my_flow --inputs '{"priority":"1","category":"network"}' --auth dev
439
+
440
+ # Execute a subflow
441
+ nex flow subflow --name global.my_subflow --inputs '{"record_id":"abc123"}' --auth dev
442
+
443
+ # Execute an action
444
+ nex flow action --name global.my_action --inputs '{"table":"incident"}' --auth dev
445
+
446
+ # Check flow status
447
+ nex flow status --context-id ctx-abc123 --auth dev
448
+
449
+ # Retrieve flow outputs
450
+ nex flow outputs --context-id ctx-abc123 --json --auth dev
451
+
452
+ # Check for errors
453
+ nex flow error --context-id ctx-abc123 --auth dev
454
+
455
+ # Cancel a running flow
456
+ nex flow cancel --context-id ctx-abc123 --reason "No longer needed" --auth dev
457
+
458
+ # Send a message to a waiting flow (e.g., approval)
459
+ nex flow message --context-id ctx-abc123 --message approved --payload '{"approver":"admin"}' --auth dev
460
+ ```
461
+
462
+ **Features:**
463
+ - Execute flows, subflows, and actions with structured inputs
464
+ - Foreground (wait) or background execution modes
465
+ - Query flow context status, outputs, and errors
466
+ - Cancel running flows and send messages to paused flows
467
+ - JSON output for automation and CI/CD
468
+
469
+ ### Bulk Record Operations
470
+
471
+ Perform bulk updates and deletes on ServiceNow records matching a query.
472
+
473
+ ```bash
474
+ # Dry-run: preview which records would be updated (safe default)
475
+ nex bulk update --table incident --query "active=true^priority=4" --data '{"priority":"3"}' --auth dev
476
+
477
+ # Confirm bulk update (actually modifies records)
478
+ nex bulk update --table incident --query "active=true^priority=4" --data '{"priority":"3"}' --confirm --auth dev
479
+
480
+ # Dry-run: preview which records would be deleted
481
+ nex bulk delete --table u_temp_records --query "sys_created_on<2024-01-01" --auth dev
482
+
483
+ # Confirm bulk delete with limit
484
+ nex bulk delete --table u_temp_records --query "sys_created_on<2024-01-01" --confirm --limit 500 --auth dev
485
+
486
+ # JSON output for scripting
487
+ nex bulk update --table incident --query "state=7" --data '{"active":"false"}' --confirm --json --auth dev
488
+ ```
489
+
490
+ **Safety Features:**
491
+ - **Dry-run by default**: Always previews affected records before modifying
492
+ - **Explicit confirmation**: Must pass `--confirm` to execute changes
493
+ - **Record limits**: Cap the number of affected records with `--limit`
494
+ - **Progress updates**: Real-time feedback during bulk operations
495
+
297
496
  ## 📖 Commands
298
497
 
299
498
  <!-- toc -->
@@ -320,6 +519,33 @@ nex app:repo-install --scope x_custom_app --no-wait --auth prod
320
519
  * [Install by scope (automatic lookup)](#install-by-scope-automatic-lookup)
321
520
  * [Install specific version](#install-specific-version)
322
521
  * [Background installation](#background-installation)
522
+ * [Query any table with encoded queries](#query-any-table-with-encoded-queries)
523
+ * [Search applications by name](#search-applications-by-name)
524
+ * [List columns for a table](#list-columns-for-a-table)
525
+ * [Query system logs](#query-system-logs)
526
+ * [Search platform code](#search-platform-code)
527
+ * [Count records](#count-records)
528
+ * [Run aggregate statistics (AVG, MIN, MAX, SUM)](#run-aggregate-statistics-avg-min-max-sum)
529
+ * [Grouped aggregation with display values](#grouped-aggregation-with-display-values)
530
+ * [Multiple group-by fields with HAVING clause](#multiple-group-by-fields-with-having-clause)
531
+ * [Full health check](#full-health-check)
532
+ * [Check only version and stuck jobs](#check-only-version-and-stuck-jobs)
533
+ * [Health check with custom stuck job threshold (60 minutes)](#health-check-with-custom-stuck-job-threshold-60-minutes)
534
+ * [JSON output for monitoring/alerting](#json-output-for-monitoringalerting)
535
+ * [Execute a flow in foreground (waits for completion)](#execute-a-flow-in-foreground-waits-for-completion)
536
+ * [Execute with inputs](#execute-with-inputs)
537
+ * [Execute a subflow](#execute-a-subflow)
538
+ * [Execute an action](#execute-an-action)
539
+ * [Check flow status](#check-flow-status)
540
+ * [Retrieve flow outputs](#retrieve-flow-outputs)
541
+ * [Check for errors](#check-for-errors)
542
+ * [Cancel a running flow](#cancel-a-running-flow)
543
+ * [Send a message to a waiting flow (e.g., approval)](#send-a-message-to-a-waiting-flow-eg-approval)
544
+ * [Dry-run: preview which records would be updated (safe default)](#dry-run-preview-which-records-would-be-updated-safe-default)
545
+ * [Confirm bulk update (actually modifies records)](#confirm-bulk-update-actually-modifies-records)
546
+ * [Dry-run: preview which records would be deleted](#dry-run-preview-which-records-would-be-deleted)
547
+ * [Confirm bulk delete with limit](#confirm-bulk-delete-with-limit)
548
+ * [JSON output for scripting](#json-output-for-scripting)
323
549
  * [Usage](#usage)
324
550
  * [Commands](#commands)
325
551
  * [Global scope](#global-scope)
@@ -398,7 +624,7 @@ nex app:repo-install --scope x_custom_app --no-wait --auth prod
398
624
  * [Clone the repository](#clone-the-repository)
399
625
  * [Install dependencies](#install-dependencies)
400
626
  * [Build](#build)
401
- * [Run tests (48 unit tests)](#run-tests-48-unit-tests)
627
+ * [Run tests (960+ tests)](#run-tests-960-tests)
402
628
  * [Run linter](#run-linter)
403
629
  * [Test locally](#test-locally)
404
630
  * [All tests](#all-tests)
@@ -413,7 +639,7 @@ $ npm install -g @sonisoft/now-sdk-ext-cli
413
639
  $ nex COMMAND
414
640
  running command...
415
641
  $ nex (--version)
416
- @sonisoft/now-sdk-ext-cli/2.0.0-alpha.0 darwin-arm64 node-v22.6.0
642
+ @sonisoft/now-sdk-ext-cli/2.0.1 linux-x64 node-v22.22.0
417
643
  $ nex --help [COMMAND]
418
644
  USAGE
419
645
  $ nex COMMAND
@@ -423,14 +649,33 @@ USAGE
423
649
 
424
650
  # Commands
425
651
  <!-- commands -->
652
+ * [`nex aggregate count`](#nex-aggregate-count)
653
+ * [`nex aggregate group`](#nex-aggregate-group)
654
+ * [`nex aggregate query`](#nex-aggregate-query)
426
655
  * [`nex app`](#nex-app)
427
656
  * [`nex app install`](#nex-app-install)
428
657
  * [`nex app repo-install`](#nex-app-repo-install)
429
658
  * [`nex app repo-list`](#nex-app-repo-list)
430
659
  * [`nex app uninstall`](#nex-app-uninstall)
431
660
  * [`nex atf`](#nex-atf)
661
+ * [`nex attachment get`](#nex-attachment-get)
662
+ * [`nex attachment list`](#nex-attachment-list)
663
+ * [`nex attachment upload`](#nex-attachment-upload)
432
664
  * [`nex autocomplete [SHELL]`](#nex-autocomplete-shell)
665
+ * [`nex batch create`](#nex-batch-create)
666
+ * [`nex batch update`](#nex-batch-update)
667
+ * [`nex bulk delete`](#nex-bulk-delete)
668
+ * [`nex bulk update`](#nex-bulk-update)
433
669
  * [`nex exec SCOPE [FILE]`](#nex-exec-scope-file)
670
+ * [`nex flow action`](#nex-flow-action)
671
+ * [`nex flow cancel`](#nex-flow-cancel)
672
+ * [`nex flow error`](#nex-flow-error)
673
+ * [`nex flow message`](#nex-flow-message)
674
+ * [`nex flow outputs`](#nex-flow-outputs)
675
+ * [`nex flow run`](#nex-flow-run)
676
+ * [`nex flow status`](#nex-flow-status)
677
+ * [`nex flow subflow`](#nex-flow-subflow)
678
+ * [`nex health check`](#nex-health-check)
434
679
  * [`nex help [COMMAND]`](#nex-help-command)
435
680
  * [`nex log`](#nex-log)
436
681
  * [`nex plugins`](#nex-plugins)
@@ -443,6 +688,195 @@ USAGE
443
688
  * [`nex plugins uninstall [PLUGIN]`](#nex-plugins-uninstall-plugin)
444
689
  * [`nex plugins unlink [PLUGIN]`](#nex-plugins-unlink-plugin)
445
690
  * [`nex plugins update`](#nex-plugins-update)
691
+ * [`nex query`](#nex-query)
692
+ * [`nex query app`](#nex-query-app)
693
+ * [`nex query columns`](#nex-query-columns)
694
+ * [`nex query syslog`](#nex-query-syslog)
695
+ * [`nex schema`](#nex-schema)
696
+ * [`nex schema field`](#nex-schema-field)
697
+ * [`nex schema validate-catalog`](#nex-schema-validate-catalog)
698
+ * [`nex scope`](#nex-scope)
699
+ * [`nex scope set`](#nex-scope-set)
700
+ * [`nex script-sync pull`](#nex-script-sync-pull)
701
+ * [`nex script-sync push`](#nex-script-sync-push)
702
+ * [`nex script-sync sync`](#nex-script-sync-sync)
703
+ * [`nex search`](#nex-search)
704
+ * [`nex search add-table`](#nex-search-add-table)
705
+ * [`nex search groups`](#nex-search-groups)
706
+ * [`nex search tables`](#nex-search-tables)
707
+ * [`nex store install`](#nex-store-install)
708
+ * [`nex store search`](#nex-store-search)
709
+ * [`nex store update`](#nex-store-update)
710
+ * [`nex store validate`](#nex-store-validate)
711
+ * [`nex task approve`](#nex-task-approve)
712
+ * [`nex task assign`](#nex-task-assign)
713
+ * [`nex task close`](#nex-task-close)
714
+ * [`nex task comment`](#nex-task-comment)
715
+ * [`nex task find`](#nex-task-find)
716
+ * [`nex task resolve`](#nex-task-resolve)
717
+ * [`nex update-set`](#nex-update-set)
718
+ * [`nex update-set clone`](#nex-update-set-clone)
719
+ * [`nex update-set create`](#nex-update-set-create)
720
+ * [`nex update-set current`](#nex-update-set-current)
721
+ * [`nex update-set inspect`](#nex-update-set-inspect)
722
+ * [`nex update-set move`](#nex-update-set-move)
723
+ * [`nex workflow create`](#nex-workflow-create)
724
+ * [`nex workflow publish`](#nex-workflow-publish)
725
+ * [`nex xml export`](#nex-xml-export)
726
+ * [`nex xml import`](#nex-xml-import)
727
+
728
+ ## `nex aggregate count`
729
+
730
+ Count records in a ServiceNow table.
731
+
732
+ ```
733
+ USAGE
734
+ $ nex aggregate count -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-q <value>]
735
+
736
+ FLAGS
737
+ -a, --auth=<value> Auth alias to use.
738
+ -j, --json Output results as JSON
739
+ -q, --query=<value> ServiceNow encoded query string to filter records
740
+ -t, --table=<value> (required) ServiceNow table name to count records in
741
+
742
+ GLOBAL FLAGS
743
+ --log-level=<option> [default: info] Specify level for logging.
744
+ <options: debug|warn|error|info|trace>
745
+
746
+ DESCRIPTION
747
+ Count records in a ServiceNow table.
748
+
749
+ Uses the Stats API to efficiently count records with optional encoded query filtering.
750
+
751
+ Features:
752
+ • Fast record counting via Stats API
753
+ • Optional encoded query filtering
754
+ • JSON output for scripting
755
+
756
+ EXAMPLES
757
+ Count all incidents
758
+
759
+ $ nex aggregate count --table incident --auth dev
760
+
761
+ Count active critical incidents
762
+
763
+ $ nex aggregate count --table incident --query "active=true^priority=1" --auth dev
764
+
765
+ Count as JSON
766
+
767
+ $ nex aggregate count --table incident --query "active=true" --json --auth dev
768
+ ```
769
+
770
+ _See code: [src/commands/aggregate/count.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/aggregate/count.ts)_
771
+
772
+ ## `nex aggregate group`
773
+
774
+ Run a grouped aggregate query on a ServiceNow table.
775
+
776
+ ```
777
+ USAGE
778
+ $ nex aggregate group -t <value> -g <value>... [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-q
779
+ <value>] [-c] [--avg <value>...] [--min <value>...] [--max <value>...] [--sum <value>...] [--having <value>] [-d]
780
+
781
+ FLAGS
782
+ -a, --auth=<value> Auth alias to use.
783
+ -c, --count Include record count per group
784
+ -d, --display-value Return display values for group-by fields
785
+ -g, --group-by=<value>... (required) Field name(s) to group by
786
+ -j, --json Output results as JSON
787
+ -q, --query=<value> ServiceNow encoded query string to filter records before grouping
788
+ -t, --table=<value> (required) ServiceNow table name to aggregate
789
+ --avg=<value>... Comma-separated field names to compute AVG on per group
790
+ --having=<value> HAVING clause to filter groups (e.g. "count>10")
791
+ --max=<value>... Comma-separated field names to compute MAX on per group
792
+ --min=<value>... Comma-separated field names to compute MIN on per group
793
+ --sum=<value>... Comma-separated field names to compute SUM on per group
794
+
795
+ GLOBAL FLAGS
796
+ --log-level=<option> [default: info] Specify level for logging.
797
+ <options: debug|warn|error|info|trace>
798
+
799
+ DESCRIPTION
800
+ Run a grouped aggregate query on a ServiceNow table.
801
+
802
+ Compute aggregate statistics (COUNT, AVG, MIN, MAX, SUM) grouped by one or more fields using the Stats API. Supports
803
+ HAVING clauses for filtering groups.
804
+
805
+ Features:
806
+ • GROUP BY one or more fields
807
+ • Compute AVG, MIN, MAX, SUM per group
808
+ • HAVING clause for group filtering
809
+ • Display values for reference fields
810
+ • JSON output for scripting
811
+
812
+ EXAMPLES
813
+ Count incidents grouped by priority
814
+
815
+ $ nex aggregate group --table incident --group-by priority --count --auth dev
816
+
817
+ Average reassignment count grouped by priority and assignment group
818
+
819
+ $ nex aggregate group --table incident --group-by priority --group-by assignment_group --avg reassignment_count \
820
+ --count --display-value --auth dev
821
+
822
+ Groups with HAVING clause
823
+
824
+ $ nex aggregate group --table incident --group-by priority --count --having "count>10" --auth dev
825
+ ```
826
+
827
+ _See code: [src/commands/aggregate/group.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/aggregate/group.ts)_
828
+
829
+ ## `nex aggregate query`
830
+
831
+ Run aggregate statistics on a ServiceNow table.
832
+
833
+ ```
834
+ USAGE
835
+ $ nex aggregate query -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-q <value>] [-c]
836
+ [--avg <value>...] [--min <value>...] [--max <value>...] [--sum <value>...]
837
+
838
+ FLAGS
839
+ -a, --auth=<value> Auth alias to use.
840
+ -c, --count Include record count in the result
841
+ -j, --json Output results as JSON
842
+ -q, --query=<value> ServiceNow encoded query string to filter records
843
+ -t, --table=<value> (required) ServiceNow table name to aggregate
844
+ --avg=<value>... Comma-separated field names to compute AVG on
845
+ --max=<value>... Comma-separated field names to compute MAX on
846
+ --min=<value>... Comma-separated field names to compute MIN on
847
+ --sum=<value>... Comma-separated field names to compute SUM on
848
+
849
+ GLOBAL FLAGS
850
+ --log-level=<option> [default: info] Specify level for logging.
851
+ <options: debug|warn|error|info|trace>
852
+
853
+ DESCRIPTION
854
+ Run aggregate statistics on a ServiceNow table.
855
+
856
+ Compute AVG, MIN, MAX, and SUM on specified fields using the Stats API. Optionally include a record count.
857
+
858
+ Features:
859
+ • Compute AVG, MIN, MAX, SUM on any numeric field
860
+ • Optional record count
861
+ • Filter with encoded queries
862
+ • JSON output for scripting
863
+
864
+ EXAMPLES
865
+ Get average reassignment count for incidents
866
+
867
+ $ nex aggregate query --table incident --avg reassignment_count --auth dev
868
+
869
+ Get min, max, and average for active incidents
870
+
871
+ $ nex aggregate query --table incident --query "active=true" --avg reassignment_count --min reassignment_count \
872
+ --max reassignment_count --count --auth dev
873
+
874
+ Get sum as JSON
875
+
876
+ $ nex aggregate query --table incident --sum reassignment_count --json --auth dev
877
+ ```
878
+
879
+ _See code: [src/commands/aggregate/query.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/aggregate/query.ts)_
446
880
 
447
881
  ## `nex app`
448
882
 
@@ -494,6 +928,8 @@ EXAMPLES
494
928
  $ nex app -u -i a1b2c3d4e5f6 -s x_my_custom_app -a dev-instance
495
929
  ```
496
930
 
931
+ _See code: [src/commands/app/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/app/index.ts)_
932
+
497
933
  ## `nex app install`
498
934
 
499
935
  Install or upgrade multiple ServiceNow applications from a batch definition file.
@@ -549,6 +985,8 @@ EXAMPLES
549
985
  $ nex app install -b -d ./apps.json -a dev-instance --log-level debug
550
986
  ```
551
987
 
988
+ _See code: [src/commands/app/install.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/app/install.ts)_
989
+
552
990
  ## `nex app repo-install`
553
991
 
554
992
  Install an application from your ServiceNow company repository.
@@ -621,6 +1059,8 @@ EXAMPLES
621
1059
  $ nex app repo-install -s x_my_app -a dev-instance --log-level debug
622
1060
  ```
623
1061
 
1062
+ _See code: [src/commands/app/repo-install.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/app/repo-install.ts)_
1063
+
624
1064
  ## `nex app repo-list`
625
1065
 
626
1066
  List applications available in your ServiceNow company repository.
@@ -683,6 +1123,8 @@ EXAMPLES
683
1123
  $ nex app repo-list -a dev-instance
684
1124
  ```
685
1125
 
1126
+ _See code: [src/commands/app/repo-list.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/app/repo-list.ts)_
1127
+
686
1128
  ## `nex app uninstall`
687
1129
 
688
1130
  Uninstall a ServiceNow application from your instance.
@@ -732,6 +1174,8 @@ EXAMPLES
732
1174
  $ nex app uninstall -i a1b2c3d4e5f6 -s x_my_custom_app -a dev-instance
733
1175
  ```
734
1176
 
1177
+ _See code: [src/commands/app/uninstall.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/app/uninstall.ts)_
1178
+
735
1179
  ## `nex atf`
736
1180
 
737
1181
  Execute ATF (Automated Test Framework) tests or test suites on a ServiceNow instance.
@@ -802,52 +1246,54 @@ EXAMPLES
802
1246
  $ nex atf --suite-id e077e00b83103210621e78c6feaad383 --poll-interval 10000 --auth dev-instance
803
1247
  ```
804
1248
 
805
- ## `nex autocomplete [SHELL]`
1249
+ _See code: [src/commands/atf/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/atf/index.ts)_
806
1250
 
807
- Display autocomplete installation instructions.
1251
+ ## `nex attachment get`
1252
+
1253
+ Get metadata for a specific attachment.
808
1254
 
809
1255
  ```
810
1256
  USAGE
811
- $ nex autocomplete [SHELL] [-r]
812
-
813
- ARGUMENTS
814
- SHELL (zsh|bash|powershell) Shell type
1257
+ $ nex attachment get -s <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
815
1258
 
816
1259
  FLAGS
817
- -r, --refresh-cache Refresh cache (ignores displaying instructions)
1260
+ -a, --auth=<value> Auth alias to use.
1261
+ -s, --sys-id=<value> (required) Sys ID of the attachment
1262
+
1263
+ GLOBAL FLAGS
1264
+ --json Format output as json.
1265
+ --log-level=<option> [default: info] Specify level for logging.
1266
+ <options: debug|warn|error|info|trace>
818
1267
 
819
1268
  DESCRIPTION
820
- Display autocomplete installation instructions.
1269
+ Get metadata for a specific attachment.
821
1270
 
822
1271
  EXAMPLES
823
- $ nex autocomplete
824
-
825
- $ nex autocomplete bash
1272
+ Get attachment metadata by sys_id
826
1273
 
827
- $ nex autocomplete zsh
1274
+ $ nex attachment get --sys-id att123 --auth dev
828
1275
 
829
- $ nex autocomplete powershell
1276
+ Get attachment metadata as JSON
830
1277
 
831
- $ nex autocomplete --refresh-cache
1278
+ $ nex attachment get -s att123 --json --auth dev
832
1279
  ```
833
1280
 
834
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.35/src/commands/autocomplete/index.ts)_
1281
+ _See code: [src/commands/attachment/get.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/attachment/get.ts)_
835
1282
 
836
- ## `nex exec SCOPE [FILE]`
1283
+ ## `nex attachment list`
837
1284
 
838
- Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.
1285
+ List attachments on a ServiceNow record.
839
1286
 
840
1287
  ```
841
1288
  USAGE
842
- $ nex exec SCOPE [FILE] [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-p <value>]
843
-
844
- ARGUMENTS
845
- SCOPE Scope to execute script in. Use "global" for global scope.
846
- FILE File to execute in scripts background. If omitted, starts REPL mode.
1289
+ $ nex attachment list -r <value> -t <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
1290
+ [--limit <value>]
847
1291
 
848
1292
  FLAGS
849
- -a, --auth=<value> Auth alias to use.
850
- -p, --params=<value> JSON object of parameters to replace in script file. Use {paramName} syntax in your script.
1293
+ -a, --auth=<value> Auth alias to use.
1294
+ -r, --record-id=<value> (required) Sys ID of the record
1295
+ -t, --table=<value> (required) Table name
1296
+ --limit=<value> [default: 20] Maximum number of attachments to return
851
1297
 
852
1298
  GLOBAL FLAGS
853
1299
  --json Format output as json.
@@ -855,139 +1301,1894 @@ GLOBAL FLAGS
855
1301
  <options: debug|warn|error|info|trace>
856
1302
 
857
1303
  DESCRIPTION
858
- Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.
1304
+ List attachments on a ServiceNow record.
859
1305
 
860
- This command allows you to run JavaScript either from files or interactively via REPL mode. It mimics the
861
- functionality of the Scripts - Background interface in ServiceNow, providing a way to execute scripts programmatically
862
- without manual interaction. The output is returned in real-time and can be piped to other commands or saved to files.
1306
+ EXAMPLES
1307
+ List attachments on an incident
863
1308
 
864
- Modes:
865
- • File Mode: Provide a file path to execute scripts from a file
866
- • REPL Mode: Omit the file path to start an interactive session
1309
+ $ nex attachment list --table incident --record-id abc123 --auth dev
867
1310
 
868
- Features:
869
- • Execute local JavaScript files remotely
870
- • Interactive REPL for ad-hoc script execution
871
- • Script parameterization with {placeholder} replacement
872
- • Multi-line script support in REPL
873
- • Scope-aware execution (global or custom scope)
874
- • Real-time console output capture
875
- • Pipe-able output for command chaining
876
- • Debug logging support
877
- • Useful for data migration, testing, and administrative tasks
1311
+ List up to 50 attachments as JSON
878
1312
 
879
- Script Parameterization:
880
- Use {paramName} placeholders in your script files, then provide values via --params:
881
- • Supports any JSON-serializable values (strings, numbers, booleans)
882
- • Multiple parameters supported
883
- • All occurrences of each placeholder are replaced
884
- • Example: {token}, {username}, {environment}
1313
+ $ nex attachment list -t incident -r abc123 --limit 50 --json --auth dev
1314
+ ```
885
1315
 
886
- REPL Controls:
887
- • Press Enter to add a new line
888
- • Type .exec or press Ctrl+D to execute the script
889
- • Type .clear to clear the current input
890
- • Type .exit or press Ctrl+C twice to exit REPL
1316
+ _See code: [src/commands/attachment/list.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/attachment/list.ts)_
891
1317
 
892
- ⚠️ IMPORTANT SECURITY WARNING:
893
- This command executes scripts with the same permissions and risks as using Scripts - Background directly
894
- in ServiceNow. Always:
895
- • Review scripts before execution
896
- • Test in non-production environments first
897
- • Use appropriate scoping to limit access
898
- • Be aware of data modification risks
899
- • Follow your organization's security policies
900
- • Never execute untrusted scripts
1318
+ ## `nex attachment upload`
901
1319
 
902
- Script Capabilities:
903
- Scripts run with full GlideSystem API access and can:
904
- • Query and modify database records
905
- • Create, update, and delete data
906
- • Execute business rules and workflows
907
- • Access all APIs available in Scripts - Background
908
- • Use gs, GlideRecord, GlideAggregate, and other server-side APIs
1320
+ Upload a file as an attachment to a ServiceNow record.
909
1321
 
910
- EXAMPLES
911
- Start REPL in global scope
1322
+ ```
1323
+ USAGE
1324
+ $ nex attachment upload -f <value> -r <value> -t <value> [--json] [-a <value>] [--log-level
1325
+ debug|warn|error|info|trace] [--content-type <value>]
912
1326
 
913
- $ nex exec global --auth dev-instance
1327
+ FLAGS
1328
+ -a, --auth=<value> Auth alias to use.
1329
+ -f, --file=<value> (required) Path to the file to upload
1330
+ -r, --record-id=<value> (required) Sys ID of the target record
1331
+ -t, --table=<value> (required) Target table name
1332
+ --content-type=<value> MIME content type of the file
914
1333
 
915
- Start REPL in custom application scope
1334
+ GLOBAL FLAGS
1335
+ --json Format output as json.
1336
+ --log-level=<option> [default: info] Specify level for logging.
1337
+ <options: debug|warn|error|info|trace>
916
1338
 
917
- $ nex exec x_my_custom_app --auth dev-instance
1339
+ DESCRIPTION
1340
+ Upload a file as an attachment to a ServiceNow record.
918
1341
 
919
- Execute a script file in global scope
1342
+ EXAMPLES
1343
+ Upload a PDF to an incident record
920
1344
 
921
- $ nex exec global ./scripts/cleanup.js --auth dev-instance
1345
+ $ nex attachment upload --table incident --record-id abc123 --file ./report.pdf --auth dev
922
1346
 
923
- Execute a script file in a custom application scope
1347
+ Upload a CSV with explicit content type
924
1348
 
925
- $ nex exec x_my_custom_app ./scripts/app-config.js --auth dev-instance
1349
+ $ nex attachment upload -t incident -r abc123 -f ./data.csv --content-type text/csv --auth dev
1350
+ ```
926
1351
 
927
- Execute a parameterized script with single parameter
1352
+ _See code: [src/commands/attachment/upload.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/attachment/upload.ts)_
928
1353
 
929
- $ nex exec global ./scripts/query-user.js --auth dev-instance --params '{"username":"admin"}'
1354
+ ## `nex autocomplete [SHELL]`
930
1355
 
931
- Execute a parameterized script with multiple parameters
1356
+ Display autocomplete installation instructions.
932
1357
 
933
- $ nex exec global ./scripts/update-record.js --auth dev-instance --params \
934
- '{"table":"incident","field":"priority","value":"1"}'
1358
+ ```
1359
+ USAGE
1360
+ $ nex autocomplete [SHELL] [-r]
935
1361
 
936
- Execute and save output to a file
1362
+ ARGUMENTS
1363
+ [SHELL] (zsh|bash|powershell) Shell type
937
1364
 
938
- $ nex exec global ./scripts/report.js --auth dev-instance > report.txt
1365
+ FLAGS
1366
+ -r, --refresh-cache Refresh cache (ignores displaying instructions)
939
1367
 
940
- Execute and pipe output to grep for filtering
1368
+ DESCRIPTION
1369
+ Display autocomplete installation instructions.
941
1370
 
942
- $ nex exec global ./scripts/list-users.js --auth dev-instance | grep "admin"
1371
+ EXAMPLES
1372
+ $ nex autocomplete
943
1373
 
944
- Execute with debug logging to troubleshoot issues
1374
+ $ nex autocomplete bash
945
1375
 
946
- $ nex exec global ./script.js --auth dev-instance --log-level debug
1376
+ $ nex autocomplete zsh
947
1377
 
948
- Execute with parameters for template replacement
1378
+ $ nex autocomplete powershell
949
1379
 
950
- $ nex exec global ./script.js --auth dev-instance --params '{"token":"abc123","env":"dev"}'
1380
+ $ nex autocomplete --refresh-cache
951
1381
  ```
952
1382
 
953
- ## `nex help [COMMAND]`
1383
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.40/src/commands/autocomplete/index.ts)_
954
1384
 
955
- Display help for nex.
1385
+ ## `nex batch create`
1386
+
1387
+ Batch create records on a ServiceNow instance from a JSON file.
1388
+
1389
+ ```
1390
+ USAGE
1391
+ $ nex batch create -f <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--transaction]
1392
+
1393
+ FLAGS
1394
+ -a, --auth=<value> Auth alias to use.
1395
+ -f, --file=<value> (required) Path to JSON file with create operations
1396
+ --transaction Stop on first error (transactional)
1397
+
1398
+ GLOBAL FLAGS
1399
+ --json Format output as json.
1400
+ --log-level=<option> [default: info] Specify level for logging.
1401
+ <options: debug|warn|error|info|trace>
1402
+
1403
+ DESCRIPTION
1404
+ Batch create records on a ServiceNow instance from a JSON file.
1405
+
1406
+ EXAMPLES
1407
+ Create records from a JSON file
1408
+
1409
+ $ nex batch create --file ./records.json --auth dev
1410
+
1411
+ Create records without transactional mode
1412
+
1413
+ $ nex batch create --file ./records.json --no-transaction --auth dev
1414
+ ```
1415
+
1416
+ _See code: [src/commands/batch/create.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/batch/create.ts)_
1417
+
1418
+ ## `nex batch update`
1419
+
1420
+ Batch update records on a ServiceNow instance from a JSON file.
1421
+
1422
+ ```
1423
+ USAGE
1424
+ $ nex batch update -f <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--stop-on-error]
1425
+
1426
+ FLAGS
1427
+ -a, --auth=<value> Auth alias to use.
1428
+ -f, --file=<value> (required) Path to JSON file with update operations
1429
+ --stop-on-error Stop processing on first error
1430
+
1431
+ GLOBAL FLAGS
1432
+ --json Format output as json.
1433
+ --log-level=<option> [default: info] Specify level for logging.
1434
+ <options: debug|warn|error|info|trace>
1435
+
1436
+ DESCRIPTION
1437
+ Batch update records on a ServiceNow instance from a JSON file.
1438
+
1439
+ EXAMPLES
1440
+ Update records from a JSON file
1441
+
1442
+ $ nex batch update --file ./updates.json --auth dev
1443
+
1444
+ Update records and stop on first error
1445
+
1446
+ $ nex batch update --file ./updates.json --stop-on-error --auth dev
1447
+ ```
1448
+
1449
+ _See code: [src/commands/batch/update.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/batch/update.ts)_
1450
+
1451
+ ## `nex bulk delete`
1452
+
1453
+ Bulk delete records matching an encoded query.
1454
+
1455
+ ```
1456
+ USAGE
1457
+ $ nex bulk delete -t <value> -q <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--confirm]
1458
+ [-l <value>]
1459
+
1460
+ FLAGS
1461
+ -a, --auth=<value> Auth alias to use.
1462
+ -j, --json Output results as JSON
1463
+ -l, --limit=<value> [default: 200] Maximum number of records to delete (default 200, max 10000)
1464
+ -q, --query=<value> (required) Encoded query to match records for deletion
1465
+ -t, --table=<value> (required) Table name to delete records from
1466
+ --confirm Execute the delete (without this flag, performs a dry run)
1467
+
1468
+ GLOBAL FLAGS
1469
+ --log-level=<option> [default: info] Specify level for logging.
1470
+ <options: debug|warn|error|info|trace>
1471
+
1472
+ DESCRIPTION
1473
+ Bulk delete records matching an encoded query.
1474
+
1475
+ Finds all records in a table matching the given query, then deletes each one. Defaults to dry-run mode — use --confirm
1476
+ to execute.
1477
+
1478
+ Features:
1479
+ • Safe dry-run by default (shows match count without deleting)
1480
+ • Encoded query filtering
1481
+ • Configurable record limit (default 200, max 10000)
1482
+ • Progress reporting for large operations
1483
+ • Error collection — operation continues even if individual records fail
1484
+
1485
+ EXAMPLES
1486
+ Dry run — see how many records would be deleted
1487
+
1488
+ $ nex bulk delete --table u_temp_import --query "sys_created_on<2024-01-01" --auth dev
1489
+
1490
+ Execute the delete (requires --confirm)
1491
+
1492
+ $ nex bulk delete --table u_temp_import --query "sys_created_on<2024-01-01" --confirm --auth dev
1493
+
1494
+ Delete with custom limit
1495
+
1496
+ $ nex bulk delete --table incident --query "active=false^closed_at<2023-01-01" --limit 1000 --confirm --auth dev
1497
+
1498
+ Delete as JSON output
1499
+
1500
+ $ nex bulk delete --table u_staging --query "processed=true" --confirm --json --auth dev
1501
+ ```
1502
+
1503
+ _See code: [src/commands/bulk/delete.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/bulk/delete.ts)_
1504
+
1505
+ ## `nex bulk update`
1506
+
1507
+ Bulk update records matching an encoded query.
1508
+
1509
+ ```
1510
+ USAGE
1511
+ $ nex bulk update -t <value> -q <value> -d <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace]
1512
+ [--confirm] [-l <value>]
1513
+
1514
+ FLAGS
1515
+ -a, --auth=<value> Auth alias to use.
1516
+ -d, --data=<value> (required) JSON object of field=value pairs to apply (e.g. '{"priority":"4","state":"2"}')
1517
+ -j, --json Output results as JSON
1518
+ -l, --limit=<value> [default: 200] Maximum number of records to update (default 200, max 10000)
1519
+ -q, --query=<value> (required) Encoded query to match records
1520
+ -t, --table=<value> (required) Table name to update records in
1521
+ --confirm Execute the update (without this flag, performs a dry run)
1522
+
1523
+ GLOBAL FLAGS
1524
+ --log-level=<option> [default: info] Specify level for logging.
1525
+ <options: debug|warn|error|info|trace>
1526
+
1527
+ DESCRIPTION
1528
+ Bulk update records matching an encoded query.
1529
+
1530
+ Finds all records in a table matching the given query, then applies field updates to each one. Defaults to dry-run
1531
+ mode — use --confirm to execute.
1532
+
1533
+ Features:
1534
+ • Safe dry-run by default (shows match count without modifying data)
1535
+ • Encoded query filtering
1536
+ • JSON field=value pairs for update data
1537
+ • Configurable record limit (default 200, max 10000)
1538
+ • Progress reporting for large operations
1539
+ • Error collection — operation continues even if individual records fail
1540
+
1541
+ EXAMPLES
1542
+ Dry run — see how many records would be updated
1543
+
1544
+ $ nex bulk update --table incident --query "active=true^priority=5" --data '{"priority":"4"}' --auth dev
1545
+
1546
+ Execute the update (requires --confirm)
1547
+
1548
+ $ nex bulk update --table incident --query "active=true^priority=5" --data '{"priority":"4"}' --confirm --auth \
1549
+ dev
1550
+
1551
+ Update with custom limit
1552
+
1553
+ $ nex bulk update --table incident --query "state=1" --data '{"assignment_group":"group-sys-id"}' --limit 500 \
1554
+ --confirm --auth dev
1555
+
1556
+ Update as JSON output
1557
+
1558
+ $ nex bulk update --table incident --query "active=true" --data '{"state":"6"}' --confirm --json --auth dev
1559
+ ```
1560
+
1561
+ _See code: [src/commands/bulk/update.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/bulk/update.ts)_
1562
+
1563
+ ## `nex exec SCOPE [FILE]`
1564
+
1565
+ Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.
1566
+
1567
+ ```
1568
+ USAGE
1569
+ $ nex exec SCOPE [FILE] [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-p <value>]
1570
+
1571
+ ARGUMENTS
1572
+ SCOPE Scope to execute script in. Use "global" for global scope.
1573
+ [FILE] File to execute in scripts background. If omitted, starts REPL mode.
1574
+
1575
+ FLAGS
1576
+ -a, --auth=<value> Auth alias to use.
1577
+ -p, --params=<value> JSON object of parameters to replace in script file. Use {paramName} syntax in your script.
1578
+
1579
+ GLOBAL FLAGS
1580
+ --json Format output as json.
1581
+ --log-level=<option> [default: info] Specify level for logging.
1582
+ <options: debug|warn|error|info|trace>
1583
+
1584
+ DESCRIPTION
1585
+ Execute JavaScript on a ServiceNow instance remotely using Scripts - Background.
1586
+
1587
+ This command allows you to run JavaScript either from files or interactively via REPL mode. It mimics the
1588
+ functionality of the Scripts - Background interface in ServiceNow, providing a way to execute scripts programmatically
1589
+ without manual interaction. The output is returned in real-time and can be piped to other commands or saved to files.
1590
+
1591
+ Modes:
1592
+ • File Mode: Provide a file path to execute scripts from a file
1593
+ • REPL Mode: Omit the file path to start an interactive session
1594
+
1595
+ Features:
1596
+ • Execute local JavaScript files remotely
1597
+ • Interactive REPL for ad-hoc script execution
1598
+ • Script parameterization with {placeholder} replacement
1599
+ • Multi-line script support in REPL
1600
+ • Scope-aware execution (global or custom scope)
1601
+ • Real-time console output capture
1602
+ • Pipe-able output for command chaining
1603
+ • Debug logging support
1604
+ • Useful for data migration, testing, and administrative tasks
1605
+
1606
+ Script Parameterization:
1607
+ Use {paramName} placeholders in your script files, then provide values via --params:
1608
+ • Supports any JSON-serializable values (strings, numbers, booleans)
1609
+ • Multiple parameters supported
1610
+ • All occurrences of each placeholder are replaced
1611
+ • Example: {token}, {username}, {environment}
1612
+
1613
+ REPL Controls:
1614
+ • Press Enter to add a new line
1615
+ • Type .exec or press Ctrl+D to execute the script
1616
+ • Type .clear to clear the current input
1617
+ • Type .exit or press Ctrl+C twice to exit REPL
1618
+
1619
+ ⚠️ IMPORTANT SECURITY WARNING:
1620
+ This command executes scripts with the same permissions and risks as using Scripts - Background directly
1621
+ in ServiceNow. Always:
1622
+ • Review scripts before execution
1623
+ • Test in non-production environments first
1624
+ • Use appropriate scoping to limit access
1625
+ • Be aware of data modification risks
1626
+ • Follow your organization's security policies
1627
+ • Never execute untrusted scripts
1628
+
1629
+ Script Capabilities:
1630
+ Scripts run with full GlideSystem API access and can:
1631
+ • Query and modify database records
1632
+ • Create, update, and delete data
1633
+ • Execute business rules and workflows
1634
+ • Access all APIs available in Scripts - Background
1635
+ • Use gs, GlideRecord, GlideAggregate, and other server-side APIs
1636
+
1637
+ EXAMPLES
1638
+ Start REPL in global scope
1639
+
1640
+ $ nex exec global --auth dev-instance
1641
+
1642
+ Start REPL in custom application scope
1643
+
1644
+ $ nex exec x_my_custom_app --auth dev-instance
1645
+
1646
+ Execute a script file in global scope
1647
+
1648
+ $ nex exec global ./scripts/cleanup.js --auth dev-instance
1649
+
1650
+ Execute a script file in a custom application scope
1651
+
1652
+ $ nex exec x_my_custom_app ./scripts/app-config.js --auth dev-instance
1653
+
1654
+ Execute a parameterized script with single parameter
1655
+
1656
+ $ nex exec global ./scripts/query-user.js --auth dev-instance --params '{"username":"admin"}'
1657
+
1658
+ Execute a parameterized script with multiple parameters
1659
+
1660
+ $ nex exec global ./scripts/update-record.js --auth dev-instance --params \
1661
+ '{"table":"incident","field":"priority","value":"1"}'
1662
+
1663
+ Execute and save output to a file
1664
+
1665
+ $ nex exec global ./scripts/report.js --auth dev-instance > report.txt
1666
+
1667
+ Execute and pipe output to grep for filtering
1668
+
1669
+ $ nex exec global ./scripts/list-users.js --auth dev-instance | grep "admin"
1670
+
1671
+ Execute with debug logging to troubleshoot issues
1672
+
1673
+ $ nex exec global ./script.js --auth dev-instance --log-level debug
1674
+
1675
+ Execute with parameters for template replacement
1676
+
1677
+ $ nex exec global ./script.js --auth dev-instance --params '{"token":"abc123","env":"dev"}'
1678
+ ```
1679
+
1680
+ _See code: [src/commands/exec/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/exec/index.ts)_
1681
+
1682
+ ## `nex flow action`
1683
+
1684
+ Execute a Flow Designer action by scoped name.
1685
+
1686
+ ```
1687
+ USAGE
1688
+ $ nex flow action -n <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-i <value>] [-m
1689
+ foreground|background] [--scope <value>] [--quick]
1690
+
1691
+ FLAGS
1692
+ -a, --auth=<value> Auth alias to use.
1693
+ -i, --inputs=<value> JSON object of input name-value pairs
1694
+ -j, --json Output results as JSON
1695
+ -m, --mode=<option> [default: foreground] Execution mode
1696
+ <options: foreground|background>
1697
+ -n, --name=<value> (required) Scoped name of the action (e.g. global.create_record)
1698
+ --quick Skip execution detail records for better performance
1699
+ --scope=<value> Scope context for script execution
1700
+
1701
+ GLOBAL FLAGS
1702
+ --log-level=<option> [default: info] Specify level for logging.
1703
+ <options: debug|warn|error|info|trace>
1704
+
1705
+ DESCRIPTION
1706
+ Execute a Flow Designer action by scoped name.
1707
+
1708
+ Runs an action using the sn_fd.FlowAPI ScriptableFlowRunner.
1709
+
1710
+ Features:
1711
+ • Execute actions by scoped name
1712
+ • Pass input values as JSON
1713
+ • Foreground or background execution mode
1714
+ • Returns context ID, outputs, and debug information
1715
+
1716
+ EXAMPLES
1717
+ Run an action
1718
+
1719
+ $ nex flow action --name global.create_record --inputs \
1720
+ '{"table":"incident","values":{"short_description":"Test"}}' --auth dev
1721
+ ```
1722
+
1723
+ _See code: [src/commands/flow/action.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/action.ts)_
1724
+
1725
+ ## `nex flow cancel`
1726
+
1727
+ Cancel a running or paused flow execution.
1728
+
1729
+ ```
1730
+ USAGE
1731
+ $ nex flow cancel -c <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-r <value>] [--scope
1732
+ <value>]
1733
+
1734
+ FLAGS
1735
+ -a, --auth=<value> Auth alias to use.
1736
+ -c, --context-id=<value> (required) Flow execution context sys_id
1737
+ -j, --json Output results as JSON
1738
+ -r, --reason=<value> Cancellation reason
1739
+ --scope=<value> Scope context for script execution
1740
+
1741
+ GLOBAL FLAGS
1742
+ --log-level=<option> [default: info] Specify level for logging.
1743
+ <options: debug|warn|error|info|trace>
1744
+
1745
+ DESCRIPTION
1746
+ Cancel a running or paused flow execution.
1747
+
1748
+ Cancels a flow context that is in QUEUED, IN_PROGRESS, or WAITING state.
1749
+
1750
+ EXAMPLES
1751
+ Cancel a running flow
1752
+
1753
+ $ nex flow cancel --context-id abc123def456 --auth dev
1754
+
1755
+ Cancel with a reason
1756
+
1757
+ $ nex flow cancel --context-id abc123def456 --reason "No longer needed" --auth dev
1758
+ ```
1759
+
1760
+ _See code: [src/commands/flow/cancel.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/cancel.ts)_
1761
+
1762
+ ## `nex flow error`
1763
+
1764
+ Retrieve error details from a failed flow execution.
1765
+
1766
+ ```
1767
+ USAGE
1768
+ $ nex flow error -c <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--scope <value>]
1769
+
1770
+ FLAGS
1771
+ -a, --auth=<value> Auth alias to use.
1772
+ -c, --context-id=<value> (required) Flow execution context sys_id
1773
+ -j, --json Output results as JSON
1774
+ --scope=<value> Scope context for script execution
1775
+
1776
+ GLOBAL FLAGS
1777
+ --log-level=<option> [default: info] Specify level for logging.
1778
+ <options: debug|warn|error|info|trace>
1779
+
1780
+ DESCRIPTION
1781
+ Retrieve error details from a failed flow execution.
1782
+
1783
+ Gets the error message from a flow context that ended in an error state.
1784
+
1785
+ EXAMPLES
1786
+ Get flow error details
1787
+
1788
+ $ nex flow error --context-id abc123def456 --auth dev
1789
+ ```
1790
+
1791
+ _See code: [src/commands/flow/error.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/error.ts)_
1792
+
1793
+ ## `nex flow message`
1794
+
1795
+ Send a message to a paused flow execution.
1796
+
1797
+ ```
1798
+ USAGE
1799
+ $ nex flow message -c <value> -m <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-p
1800
+ <value>] [--scope <value>]
1801
+
1802
+ FLAGS
1803
+ -a, --auth=<value> Auth alias to use.
1804
+ -c, --context-id=<value> (required) Flow execution context sys_id
1805
+ -j, --json Output results as JSON
1806
+ -m, --message=<value> (required) Message to send to the flow
1807
+ -p, --payload=<value> Optional JSON payload to include with the message
1808
+ --scope=<value> Scope context for script execution
1809
+
1810
+ GLOBAL FLAGS
1811
+ --log-level=<option> [default: info] Specify level for logging.
1812
+ <options: debug|warn|error|info|trace>
1813
+
1814
+ DESCRIPTION
1815
+ Send a message to a paused flow execution.
1816
+
1817
+ Sends a message to a flow context that is in a WAITING state (e.g. waiting on a "Wait for Message" action). Supports
1818
+ an optional JSON payload.
1819
+
1820
+ EXAMPLES
1821
+ Send a message to resume a waiting flow
1822
+
1823
+ $ nex flow message --context-id abc123def456 --message "approved" --auth dev
1824
+
1825
+ Send a message with a JSON payload
1826
+
1827
+ $ nex flow message --context-id abc123def456 --message "data_ready" --payload '{"status":"ok"}' --auth dev
1828
+ ```
1829
+
1830
+ _See code: [src/commands/flow/message.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/message.ts)_
1831
+
1832
+ ## `nex flow outputs`
1833
+
1834
+ Retrieve outputs from a completed flow execution.
1835
+
1836
+ ```
1837
+ USAGE
1838
+ $ nex flow outputs -c <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--scope <value>]
1839
+
1840
+ FLAGS
1841
+ -a, --auth=<value> Auth alias to use.
1842
+ -c, --context-id=<value> (required) Flow execution context sys_id
1843
+ -j, --json Output results as JSON
1844
+ --scope=<value> Scope context for script execution
1845
+
1846
+ GLOBAL FLAGS
1847
+ --log-level=<option> [default: info] Specify level for logging.
1848
+ <options: debug|warn|error|info|trace>
1849
+
1850
+ DESCRIPTION
1851
+ Retrieve outputs from a completed flow execution.
1852
+
1853
+ Gets the output name-value pairs from a flow, subflow, or action execution context.
1854
+
1855
+ EXAMPLES
1856
+ Get flow outputs
1857
+
1858
+ $ nex flow outputs --context-id abc123def456 --auth dev
1859
+
1860
+ Get outputs as JSON
1861
+
1862
+ $ nex flow outputs --context-id abc123def456 --json --auth dev
1863
+ ```
1864
+
1865
+ _See code: [src/commands/flow/outputs.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/outputs.ts)_
1866
+
1867
+ ## `nex flow run`
1868
+
1869
+ Execute a Flow Designer flow by scoped name.
1870
+
1871
+ ```
1872
+ USAGE
1873
+ $ nex flow run -n <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-i <value>] [-m
1874
+ foreground|background] [--scope <value>] [--quick]
1875
+
1876
+ FLAGS
1877
+ -a, --auth=<value> Auth alias to use.
1878
+ -i, --inputs=<value> JSON object of input name-value pairs
1879
+ -j, --json Output results as JSON
1880
+ -m, --mode=<option> [default: foreground] Execution mode
1881
+ <options: foreground|background>
1882
+ -n, --name=<value> (required) Scoped name of the flow (e.g. global.my_flow)
1883
+ --quick Skip execution detail records for better performance
1884
+ --scope=<value> Scope context for script execution (e.g. global, x_myapp)
1885
+
1886
+ GLOBAL FLAGS
1887
+ --log-level=<option> [default: info] Specify level for logging.
1888
+ <options: debug|warn|error|info|trace>
1889
+
1890
+ DESCRIPTION
1891
+ Execute a Flow Designer flow by scoped name.
1892
+
1893
+ Runs a flow using the sn_fd.FlowAPI ScriptableFlowRunner. Supports foreground (synchronous) and background
1894
+ (asynchronous) execution modes.
1895
+
1896
+ Features:
1897
+ • Execute flows by scoped name (e.g. global.my_flow)
1898
+ • Pass input values as JSON
1899
+ • Foreground or background execution mode
1900
+ • Quick mode to skip execution detail records
1901
+ • Returns context ID, outputs, and debug information
1902
+
1903
+ EXAMPLES
1904
+ Run a flow in foreground mode
1905
+
1906
+ $ nex flow run --name global.my_flow --auth dev
1907
+
1908
+ Run with inputs
1909
+
1910
+ $ nex flow run --name global.my_flow --inputs '{"record_sys_id":"abc123"}' --auth dev
1911
+
1912
+ Run in background mode
1913
+
1914
+ $ nex flow run --name global.my_flow --mode background --auth dev
1915
+ ```
1916
+
1917
+ _See code: [src/commands/flow/run.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/run.ts)_
1918
+
1919
+ ## `nex flow status`
1920
+
1921
+ Get the status of a flow execution context.
1922
+
1923
+ ```
1924
+ USAGE
1925
+ $ nex flow status -c <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--scope <value>]
1926
+
1927
+ FLAGS
1928
+ -a, --auth=<value> Auth alias to use.
1929
+ -c, --context-id=<value> (required) Flow execution context sys_id
1930
+ -j, --json Output results as JSON
1931
+ --scope=<value> Scope context for script execution
1932
+
1933
+ GLOBAL FLAGS
1934
+ --log-level=<option> [default: info] Specify level for logging.
1935
+ <options: debug|warn|error|info|trace>
1936
+
1937
+ DESCRIPTION
1938
+ Get the status of a flow execution context.
1939
+
1940
+ Queries sys_flow_context to retrieve the current state of a flow execution.
1941
+
1942
+ Possible states: QUEUED, IN_PROGRESS, WAITING, COMPLETE, CANCELLED, ERROR
1943
+
1944
+ EXAMPLES
1945
+ Check flow execution status
1946
+
1947
+ $ nex flow status --context-id abc123def456 --auth dev
1948
+ ```
1949
+
1950
+ _See code: [src/commands/flow/status.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/status.ts)_
1951
+
1952
+ ## `nex flow subflow`
1953
+
1954
+ Execute a Flow Designer subflow by scoped name.
1955
+
1956
+ ```
1957
+ USAGE
1958
+ $ nex flow subflow -n <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-i <value>] [-m
1959
+ foreground|background] [--scope <value>] [--quick]
1960
+
1961
+ FLAGS
1962
+ -a, --auth=<value> Auth alias to use.
1963
+ -i, --inputs=<value> JSON object of input name-value pairs
1964
+ -j, --json Output results as JSON
1965
+ -m, --mode=<option> [default: foreground] Execution mode
1966
+ <options: foreground|background>
1967
+ -n, --name=<value> (required) Scoped name of the subflow (e.g. global.my_subflow)
1968
+ --quick Skip execution detail records for better performance
1969
+ --scope=<value> Scope context for script execution
1970
+
1971
+ GLOBAL FLAGS
1972
+ --log-level=<option> [default: info] Specify level for logging.
1973
+ <options: debug|warn|error|info|trace>
1974
+
1975
+ DESCRIPTION
1976
+ Execute a Flow Designer subflow by scoped name.
1977
+
1978
+ Runs a subflow using the sn_fd.FlowAPI ScriptableFlowRunner.
1979
+
1980
+ Features:
1981
+ • Execute subflows by scoped name
1982
+ • Pass input values as JSON
1983
+ • Foreground or background execution mode
1984
+ • Returns context ID, outputs, and debug information
1985
+
1986
+ EXAMPLES
1987
+ Run a subflow
1988
+
1989
+ $ nex flow subflow --name global.my_subflow --auth dev
1990
+
1991
+ Run with inputs
1992
+
1993
+ $ nex flow subflow --name x_myapp.process_record --inputs '{"table":"incident","sys_id":"abc123"}' --auth dev
1994
+ ```
1995
+
1996
+ _See code: [src/commands/flow/subflow.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/flow/subflow.ts)_
1997
+
1998
+ ## `nex health check`
1999
+
2000
+ Run a consolidated health check on a ServiceNow instance.
2001
+
2002
+ ```
2003
+ USAGE
2004
+ $ nex health check [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--include-version]
2005
+ [--include-cluster] [--include-stuck-jobs] [--include-semaphores] [--include-operational-counts]
2006
+ [--stuck-job-threshold <value>]
2007
+
2008
+ FLAGS
2009
+ -a, --auth=<value> Auth alias to use.
2010
+ -j, --json Output results as JSON
2011
+ --[no-]include-cluster Include cluster node status
2012
+ --[no-]include-operational-counts Include operational record counts (incidents, changes, problems)
2013
+ --[no-]include-semaphores Include active semaphore count
2014
+ --[no-]include-stuck-jobs Include stuck job detection
2015
+ --[no-]include-version Include instance version information
2016
+ --stuck-job-threshold=<value> [default: 30] Minutes threshold for a job to be considered stuck
2017
+
2018
+ GLOBAL FLAGS
2019
+ --log-level=<option> [default: info] Specify level for logging.
2020
+ <options: debug|warn|error|info|trace>
2021
+
2022
+ DESCRIPTION
2023
+ Run a consolidated health check on a ServiceNow instance.
2024
+
2025
+ Performs comprehensive diagnostics including version info, cluster status, stuck job detection, semaphore counts, and
2026
+ operational record counts.
2027
+
2028
+ Features:
2029
+ • Instance version and build information
2030
+ • Cluster node status
2031
+ • Stuck job detection with configurable threshold
2032
+ • Active semaphore count
2033
+ • Operational counts (incidents, changes, problems)
2034
+ • Color-coded status indicators
2035
+ • JSON output for CI/CD monitoring
2036
+
2037
+ EXAMPLES
2038
+ Run full health check
2039
+
2040
+ $ nex health check --auth dev
2041
+
2042
+ Check only version and stuck jobs
2043
+
2044
+ $ nex health check --include-version --include-stuck-jobs --no-include-cluster --no-include-semaphores \
2045
+ --no-include-operational-counts --auth dev
2046
+
2047
+ Health check with custom stuck job threshold
2048
+
2049
+ $ nex health check --stuck-job-threshold 60 --auth dev
2050
+
2051
+ Health check as JSON
2052
+
2053
+ $ nex health check --json --auth dev
2054
+ ```
2055
+
2056
+ _See code: [src/commands/health/check.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/health/check.ts)_
2057
+
2058
+ ## `nex help [COMMAND]`
2059
+
2060
+ Display help for nex.
956
2061
 
957
2062
  ```
958
2063
  USAGE
959
2064
  $ nex help [COMMAND...] [-n]
960
2065
 
961
- ARGUMENTS
962
- COMMAND... Command to show help for.
2066
+ ARGUMENTS
2067
+ [COMMAND...] Command to show help for.
2068
+
2069
+ FLAGS
2070
+ -n, --nested-commands Include all nested commands in the output.
2071
+
2072
+ DESCRIPTION
2073
+ Display help for nex.
2074
+ ```
2075
+
2076
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.37/src/commands/help.ts)_
2077
+
2078
+ ## `nex log`
2079
+
2080
+ Tail and monitor ServiceNow system logs in real-time with beautiful formatting.
2081
+
2082
+ ```
2083
+ USAGE
2084
+ $ nex log [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-o <value>] [-i <value>]
2085
+ [--no-color] [-f <value>...]
2086
+
2087
+ FLAGS
2088
+ -a, --auth=<value> Auth alias to use.
2089
+ -f, --filter=<value>... Filter logs by field and value. Syntax: field OPERATOR value. Operators: CONTAINS,
2090
+ CONTAINS_CI (case-insensitive), EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI, ENDS_WITH,
2091
+ ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_EQUALS. Field defaults to "message" if omitted.
2092
+ Multiple filters are combined with AND logic.
2093
+ -i, --interval=<value> [default: 1000] Polling interval in milliseconds
2094
+ -o, --output=<value> Output file path to save logs. Creates parent directories if needed.
2095
+ --no-color Disable colored output
2096
+
2097
+ GLOBAL FLAGS
2098
+ --json Format output as json.
2099
+ --log-level=<option> [default: info] Specify level for logging.
2100
+ <options: debug|warn|error|info|trace>
2101
+
2102
+ DESCRIPTION
2103
+ Tail and monitor ServiceNow system logs in real-time with beautiful formatting.
2104
+
2105
+ This command provides real-time log monitoring with enhanced visual formatting using color-coded output that makes
2106
+ logs easy to scan and understand at a glance. Automatically highlights errors, warnings, success messages, and
2107
+ important keywords.
2108
+
2109
+ Key Features:
2110
+ • Real-time log tailing (like Unix tail -f)
2111
+ • Powerful filtering with multiple operators (CONTAINS, REGEX, EQUALS, etc.)
2112
+ • Smart keyword highlighting (errors in red, warnings in yellow, etc.)
2113
+ • Beautiful color-coded console output with chalk
2114
+ • Export logs to file with automatic appending
2115
+ • Fast 1-second default polling interval
2116
+ • Timestamps and sequence numbers for each log
2117
+ • Graceful shutdown with Ctrl+C
2118
+ • Clean output without colors (--no-color flag)
2119
+
2120
+ Smart Highlighting:
2121
+ • Error terms (error, exception, failed) - highlighted in RED
2122
+ • Warning terms (warn, warning, deprecated) - highlighted in YELLOW
2123
+ • Success terms (success, completed, done) - highlighted in GREEN
2124
+ • System terms (system, user, transaction) - highlighted in BLUE
2125
+
2126
+ Filtering:
2127
+ • Apply filters using --filter flag with syntax: "field OPERATOR value"
2128
+ • Supports case-sensitive and case-insensitive operations
2129
+ • Multiple filters are combined with AND logic
2130
+ • Operators: CONTAINS, CONTAINS_CI, EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI,
2131
+ ENDS_WITH, ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_CONTAINS_CI, NOT_EQUALS, NOT_EQUALS_CI
2132
+
2133
+ Use Cases:
2134
+ • Monitor logs during application development
2135
+ • Debug issues in real-time
2136
+ • Track system events during deployments
2137
+ • Filter logs for specific application or component
2138
+ • Quickly spot errors and warnings
2139
+ • Collect logs for analysis or audit trails
2140
+
2141
+ ⚠️ IMPORTANT NOTES:
2142
+ • Press Ctrl+C to stop tailing and exit gracefully
2143
+ • Log files are created/appended automatically
2144
+ • Uses ChannelAjax when available for better performance
2145
+ • Default poll interval is 1 second for real-time monitoring
2146
+
2147
+ EXAMPLES
2148
+ Tail all logs in real-time
2149
+
2150
+ $ nex log --auth dev-instance
2151
+
2152
+ Tail logs and save to a file
2153
+
2154
+ $ nex log --output ./logs/instance-logs.txt --auth dev-instance
2155
+
2156
+ Tail logs with custom polling interval (500ms for faster updates)
2157
+
2158
+ $ nex log --interval 500 --auth dev-instance
2159
+
2160
+ Filter logs containing specific text (case-insensitive)
2161
+
2162
+ $ nex log --filter "message CONTAINS_CI error" --auth dev-instance
2163
+
2164
+ Filter logs with multiple conditions (AND logic)
2165
+
2166
+ $ nex log --filter "message CONTAINS x_taniu_tan_core" --filter "message CONTAINS error" --auth dev-instance
2167
+
2168
+ Filter logs using regex pattern
2169
+
2170
+ $ nex log --filter "message REGEX .*exception.*" --auth dev-instance
2171
+
2172
+ Filter logs by message starting with a pattern
2173
+
2174
+ $ nex log --filter "message STARTS_WITH [ERROR]" --auth dev-instance
2175
+
2176
+ Tail logs without colored output
2177
+
2178
+ $ nex log --no-color --auth dev-instance
2179
+ ```
2180
+
2181
+ _See code: [src/commands/log/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/log/index.ts)_
2182
+
2183
+ ## `nex plugins`
2184
+
2185
+ List installed plugins.
2186
+
2187
+ ```
2188
+ USAGE
2189
+ $ nex plugins [--json] [--core]
2190
+
2191
+ FLAGS
2192
+ --core Show core plugins.
2193
+
2194
+ GLOBAL FLAGS
2195
+ --json Format output as json.
2196
+
2197
+ DESCRIPTION
2198
+ List installed plugins.
2199
+
2200
+ EXAMPLES
2201
+ $ nex plugins
2202
+ ```
2203
+
2204
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/index.ts)_
2205
+
2206
+ ## `nex plugins add PLUGIN`
2207
+
2208
+ Installs a plugin into nex.
2209
+
2210
+ ```
2211
+ USAGE
2212
+ $ nex plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
2213
+
2214
+ ARGUMENTS
2215
+ PLUGIN... Plugin to install.
2216
+
2217
+ FLAGS
2218
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
2219
+ -h, --help Show CLI help.
2220
+ -s, --silent Silences npm output.
2221
+ -v, --verbose Show verbose npm output.
2222
+
2223
+ GLOBAL FLAGS
2224
+ --json Format output as json.
2225
+
2226
+ DESCRIPTION
2227
+ Installs a plugin into nex.
2228
+
2229
+ Uses npm to install plugins.
2230
+
2231
+ Installation of a user-installed plugin will override a core plugin.
2232
+
2233
+ Use the NEX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
2234
+ Use the NEX_NPM_REGISTRY environment variable to set the npm registry.
2235
+
2236
+ ALIASES
2237
+ $ nex plugins add
2238
+
2239
+ EXAMPLES
2240
+ Install a plugin from npm registry.
2241
+
2242
+ $ nex plugins add myplugin
2243
+
2244
+ Install a plugin from a github url.
2245
+
2246
+ $ nex plugins add https://github.com/someuser/someplugin
2247
+
2248
+ Install a plugin from a github slug.
2249
+
2250
+ $ nex plugins add someuser/someplugin
2251
+ ```
2252
+
2253
+ ## `nex plugins:inspect PLUGIN...`
2254
+
2255
+ Displays installation properties of a plugin.
2256
+
2257
+ ```
2258
+ USAGE
2259
+ $ nex plugins inspect PLUGIN...
2260
+
2261
+ ARGUMENTS
2262
+ PLUGIN... [default: .] Plugin to inspect.
2263
+
2264
+ FLAGS
2265
+ -h, --help Show CLI help.
2266
+ -v, --verbose
2267
+
2268
+ GLOBAL FLAGS
2269
+ --json Format output as json.
2270
+
2271
+ DESCRIPTION
2272
+ Displays installation properties of a plugin.
2273
+
2274
+ EXAMPLES
2275
+ $ nex plugins inspect myplugin
2276
+ ```
2277
+
2278
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/inspect.ts)_
2279
+
2280
+ ## `nex plugins install PLUGIN`
2281
+
2282
+ Installs a plugin into nex.
2283
+
2284
+ ```
2285
+ USAGE
2286
+ $ nex plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
2287
+
2288
+ ARGUMENTS
2289
+ PLUGIN... Plugin to install.
2290
+
2291
+ FLAGS
2292
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
2293
+ -h, --help Show CLI help.
2294
+ -s, --silent Silences npm output.
2295
+ -v, --verbose Show verbose npm output.
2296
+
2297
+ GLOBAL FLAGS
2298
+ --json Format output as json.
2299
+
2300
+ DESCRIPTION
2301
+ Installs a plugin into nex.
2302
+
2303
+ Uses npm to install plugins.
2304
+
2305
+ Installation of a user-installed plugin will override a core plugin.
2306
+
2307
+ Use the NEX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
2308
+ Use the NEX_NPM_REGISTRY environment variable to set the npm registry.
2309
+
2310
+ ALIASES
2311
+ $ nex plugins add
2312
+
2313
+ EXAMPLES
2314
+ Install a plugin from npm registry.
2315
+
2316
+ $ nex plugins install myplugin
2317
+
2318
+ Install a plugin from a github url.
2319
+
2320
+ $ nex plugins install https://github.com/someuser/someplugin
2321
+
2322
+ Install a plugin from a github slug.
2323
+
2324
+ $ nex plugins install someuser/someplugin
2325
+ ```
2326
+
2327
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/install.ts)_
2328
+
2329
+ ## `nex plugins link PATH`
2330
+
2331
+ Links a plugin into the CLI for development.
2332
+
2333
+ ```
2334
+ USAGE
2335
+ $ nex plugins link PATH [-h] [--install] [-v]
2336
+
2337
+ ARGUMENTS
2338
+ PATH [default: .] path to plugin
2339
+
2340
+ FLAGS
2341
+ -h, --help Show CLI help.
2342
+ -v, --verbose
2343
+ --[no-]install Install dependencies after linking the plugin.
2344
+
2345
+ DESCRIPTION
2346
+ Links a plugin into the CLI for development.
2347
+
2348
+ Installation of a linked plugin will override a user-installed or core plugin.
2349
+
2350
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
2351
+ command will override the user-installed or core plugin implementation. This is useful for development work.
2352
+
2353
+
2354
+ EXAMPLES
2355
+ $ nex plugins link myplugin
2356
+ ```
2357
+
2358
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/link.ts)_
2359
+
2360
+ ## `nex plugins remove [PLUGIN]`
2361
+
2362
+ Removes a plugin from the CLI.
2363
+
2364
+ ```
2365
+ USAGE
2366
+ $ nex plugins remove [PLUGIN...] [-h] [-v]
2367
+
2368
+ ARGUMENTS
2369
+ [PLUGIN...] plugin to uninstall
2370
+
2371
+ FLAGS
2372
+ -h, --help Show CLI help.
2373
+ -v, --verbose
2374
+
2375
+ DESCRIPTION
2376
+ Removes a plugin from the CLI.
2377
+
2378
+ ALIASES
2379
+ $ nex plugins unlink
2380
+ $ nex plugins remove
2381
+
2382
+ EXAMPLES
2383
+ $ nex plugins remove myplugin
2384
+ ```
2385
+
2386
+ ## `nex plugins reset`
2387
+
2388
+ Remove all user-installed and linked plugins.
2389
+
2390
+ ```
2391
+ USAGE
2392
+ $ nex plugins reset [--hard] [--reinstall]
2393
+
2394
+ FLAGS
2395
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
2396
+ --reinstall Reinstall all plugins after uninstalling.
2397
+ ```
2398
+
2399
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/reset.ts)_
2400
+
2401
+ ## `nex plugins uninstall [PLUGIN]`
2402
+
2403
+ Removes a plugin from the CLI.
2404
+
2405
+ ```
2406
+ USAGE
2407
+ $ nex plugins uninstall [PLUGIN...] [-h] [-v]
2408
+
2409
+ ARGUMENTS
2410
+ [PLUGIN...] plugin to uninstall
2411
+
2412
+ FLAGS
2413
+ -h, --help Show CLI help.
2414
+ -v, --verbose
2415
+
2416
+ DESCRIPTION
2417
+ Removes a plugin from the CLI.
2418
+
2419
+ ALIASES
2420
+ $ nex plugins unlink
2421
+ $ nex plugins remove
2422
+
2423
+ EXAMPLES
2424
+ $ nex plugins uninstall myplugin
2425
+ ```
2426
+
2427
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/uninstall.ts)_
2428
+
2429
+ ## `nex plugins unlink [PLUGIN]`
2430
+
2431
+ Removes a plugin from the CLI.
2432
+
2433
+ ```
2434
+ USAGE
2435
+ $ nex plugins unlink [PLUGIN...] [-h] [-v]
2436
+
2437
+ ARGUMENTS
2438
+ [PLUGIN...] plugin to uninstall
2439
+
2440
+ FLAGS
2441
+ -h, --help Show CLI help.
2442
+ -v, --verbose
2443
+
2444
+ DESCRIPTION
2445
+ Removes a plugin from the CLI.
2446
+
2447
+ ALIASES
2448
+ $ nex plugins unlink
2449
+ $ nex plugins remove
2450
+
2451
+ EXAMPLES
2452
+ $ nex plugins unlink myplugin
2453
+ ```
2454
+
2455
+ ## `nex plugins update`
2456
+
2457
+ Update installed plugins.
2458
+
2459
+ ```
2460
+ USAGE
2461
+ $ nex plugins update [-h] [-v]
2462
+
2463
+ FLAGS
2464
+ -h, --help Show CLI help.
2465
+ -v, --verbose
2466
+
2467
+ DESCRIPTION
2468
+ Update installed plugins.
2469
+ ```
2470
+
2471
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/update.ts)_
2472
+
2473
+ ## `nex query`
2474
+
2475
+ Query any ServiceNow table using the Table API.
2476
+
2477
+ ```
2478
+ USAGE
2479
+ $ nex query -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-q <value>] [-f
2480
+ <value>] [-d] [-l <value>]
2481
+
2482
+ FLAGS
2483
+ -a, --auth=<value> Auth alias to use.
2484
+ -d, --display-value Return display values instead of internal values
2485
+ -f, --fields=<value> Comma-separated list of fields to return
2486
+ -j, --json Output results as JSON
2487
+ -l, --limit=<value> [default: 20] Maximum number of records to return
2488
+ -q, --query=<value> ServiceNow encoded query string
2489
+ -t, --table=<value> (required) ServiceNow table name to query
2490
+
2491
+ GLOBAL FLAGS
2492
+ --log-level=<option> [default: info] Specify level for logging.
2493
+ <options: debug|warn|error|info|trace>
2494
+
2495
+ DESCRIPTION
2496
+ Query any ServiceNow table using the Table API.
2497
+
2498
+ Retrieve records from any table with support for encoded queries, field selection, display values, and configurable
2499
+ limits.
2500
+
2501
+ Features:
2502
+ • Query any table with encoded query strings
2503
+ • Select specific fields to return
2504
+ • Toggle display values vs. internal values
2505
+ • Configurable record limit
2506
+ • JSON output for scripting and CI/CD
2507
+
2508
+ EXAMPLES
2509
+ Query active incidents
2510
+
2511
+ $ nex query --table incident --query "active=true" --limit 10 --auth dev
2512
+
2513
+ Query with specific fields and display values
2514
+
2515
+ $ nex query --table incident --query "priority=1" --fields "number,short_description,state" --display-value \
2516
+ --auth dev
2517
+
2518
+ Query as JSON output
2519
+
2520
+ $ nex query --table sys_user --query "active=true" --limit 5 --json --auth dev
2521
+ ```
2522
+
2523
+ _See code: [src/commands/query/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/query/index.ts)_
2524
+
2525
+ ## `nex query app`
2526
+
2527
+ Search for applications by name across scoped apps and plugins.
2528
+
2529
+ ```
2530
+ USAGE
2531
+ $ nex query app -s <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-a] [-l <value>]
2532
+
2533
+ FLAGS
2534
+ -a, --active Only show active applications
2535
+ -a, --auth=<value> Auth alias to use.
2536
+ -j, --json Output results as JSON
2537
+ -l, --limit=<value> [default: 20] Maximum number of results to return
2538
+ -s, --search=<value> (required) Application name search term
2539
+
2540
+ GLOBAL FLAGS
2541
+ --log-level=<option> [default: info] Specify level for logging.
2542
+ <options: debug|warn|error|info|trace>
2543
+
2544
+ DESCRIPTION
2545
+ Search for applications by name across scoped apps and plugins.
2546
+
2547
+ Searches the sys_scope table for applications matching the provided search term.
2548
+
2549
+ Features:
2550
+ • Search by name (case-insensitive contains)
2551
+ • Filter active/inactive applications
2552
+ • Configurable result limit
2553
+ • JSON output for scripting
2554
+
2555
+ EXAMPLES
2556
+ Search for ITSM applications
2557
+
2558
+ $ nex query app --search "ITSM" --auth dev
2559
+
2560
+ Search active apps only
2561
+
2562
+ $ nex query app --search "HR" --active --auth dev
2563
+ ```
2564
+
2565
+ _See code: [src/commands/query/app.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/query/app.ts)_
2566
+
2567
+ ## `nex query columns`
2568
+
2569
+ List and search columns (fields) on a ServiceNow table.
2570
+
2571
+ ```
2572
+ USAGE
2573
+ $ nex query columns -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-s <value>]
2574
+
2575
+ FLAGS
2576
+ -a, --auth=<value> Auth alias to use.
2577
+ -j, --json Output results as JSON
2578
+ -s, --search=<value> Filter columns by name or label (case-insensitive)
2579
+ -t, --table=<value> (required) ServiceNow table name to list columns for
2580
+
2581
+ GLOBAL FLAGS
2582
+ --log-level=<option> [default: info] Specify level for logging.
2583
+ <options: debug|warn|error|info|trace>
2584
+
2585
+ DESCRIPTION
2586
+ List and search columns (fields) on a ServiceNow table.
2587
+
2588
+ Retrieves all field definitions for a table from the sys_dictionary, with optional name/label filtering.
2589
+
2590
+ Features:
2591
+ • List all fields with types, lengths, and constraints
2592
+ • Search/filter fields by name or label
2593
+ • JSON output for scripting
2594
+
2595
+ EXAMPLES
2596
+ List all columns on the incident table
2597
+
2598
+ $ nex query columns --table incident --auth dev
2599
+
2600
+ Search for date-related columns
2601
+
2602
+ $ nex query columns --table incident --search "date" --auth dev
2603
+
2604
+ List columns as JSON
2605
+
2606
+ $ nex query columns --table incident --json --auth dev
2607
+ ```
2608
+
2609
+ _See code: [src/commands/query/columns.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/query/columns.ts)_
2610
+
2611
+ ## `nex query syslog`
2612
+
2613
+ Query ServiceNow system logs (one-shot, non-tailing).
2614
+
2615
+ ```
2616
+ USAGE
2617
+ $ nex query syslog [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-q <value>] [-l <value>]
2618
+
2619
+ FLAGS
2620
+ -a, --auth=<value> Auth alias to use.
2621
+ -j, --json Output results as JSON
2622
+ -l, --limit=<value> [default: 100] Maximum number of syslog records to return
2623
+ -q, --query=<value> ServiceNow encoded query string for filtering syslog records
2624
+
2625
+ GLOBAL FLAGS
2626
+ --log-level=<option> [default: info] Specify level for logging.
2627
+ <options: debug|warn|error|info|trace>
2628
+
2629
+ DESCRIPTION
2630
+ Query ServiceNow system logs (one-shot, non-tailing).
2631
+
2632
+ Retrieves syslog records with optional encoded query filtering and configurable limits. For real-time log tailing, use
2633
+ the "log tail" command instead.
2634
+
2635
+ Features:
2636
+ • Query syslog with encoded query strings
2637
+ • Configurable record limit
2638
+ • Formatted table output with timestamps, levels, and sources
2639
+ • JSON output for scripting
2640
+
2641
+ EXAMPLES
2642
+ Query recent error logs
2643
+
2644
+ $ nex query syslog --query "level=2" --limit 20 --auth dev
2645
+
2646
+ Query all recent syslog entries
2647
+
2648
+ $ nex query syslog --limit 50 --auth dev
2649
+
2650
+ Query syslog as JSON
2651
+
2652
+ $ nex query syslog --query "sourceLIKEincident" --json --auth dev
2653
+ ```
2654
+
2655
+ _See code: [src/commands/query/syslog.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/query/syslog.ts)_
2656
+
2657
+ ## `nex schema`
2658
+
2659
+ Discover and inspect a ServiceNow table schema including fields, types, and relationships.
2660
+
2661
+ ```
2662
+ USAGE
2663
+ $ nex schema -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [--include-choices]
2664
+ [--include-relationships] [--include-ui-policies] [--include-business-rules]
2665
+
2666
+ FLAGS
2667
+ -a, --auth=<value> Auth alias to use.
2668
+ -j, --json Output results as JSON
2669
+ -t, --table=<value> (required) ServiceNow table name to discover schema for
2670
+ --include-business-rules Include business rules in the schema output
2671
+ --include-choices Include field choices in the schema output
2672
+ --include-relationships Include table relationships in the schema output
2673
+ --include-ui-policies Include UI policies in the schema output
2674
+
2675
+ GLOBAL FLAGS
2676
+ --log-level=<option> [default: info] Specify level for logging.
2677
+ <options: debug|warn|error|info|trace>
2678
+
2679
+ DESCRIPTION
2680
+ Discover and inspect a ServiceNow table schema including fields, types, and relationships.
2681
+
2682
+ This command retrieves the full schema definition for a ServiceNow table, including all fields, their types,
2683
+ constraints, and optionally choices, relationships, UI policies, and business rules.
2684
+
2685
+ Features:
2686
+ • List all fields with types, lengths, and constraints
2687
+ • Optionally include field choices
2688
+ • Optionally include table relationships
2689
+ • Optionally include UI policies
2690
+ • Optionally include business rules
2691
+ • JSON output for CI/CD integration
2692
+
2693
+ EXAMPLES
2694
+ Discover incident table schema
2695
+
2696
+ $ nex schema --table incident --auth dev
2697
+
2698
+ Include choices and relationships
2699
+
2700
+ $ nex schema --table incident --include-choices --include-relationships --auth dev
2701
+ ```
2702
+
2703
+ _See code: [src/commands/schema/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/schema/index.ts)_
2704
+
2705
+ ## `nex schema field`
2706
+
2707
+ Get detailed information about a specific field on a ServiceNow table.
2708
+
2709
+ ```
2710
+ USAGE
2711
+ $ nex schema field -t <value> -f <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace]
2712
+
2713
+ FLAGS
2714
+ -a, --auth=<value> Auth alias to use.
2715
+ -f, --field=<value> (required) Field name to explain
2716
+ -j, --json Output results as JSON
2717
+ -t, --table=<value> (required) ServiceNow table name
2718
+
2719
+ GLOBAL FLAGS
2720
+ --log-level=<option> [default: info] Specify level for logging.
2721
+ <options: debug|warn|error|info|trace>
2722
+
2723
+ DESCRIPTION
2724
+ Get detailed information about a specific field on a ServiceNow table.
2725
+
2726
+ This command retrieves comprehensive details about a single field, including its type, constraints, choices, and other
2727
+ metadata. Useful for understanding field definitions during development.
2728
+
2729
+ EXAMPLES
2730
+ Explain the state field on incident table
2731
+
2732
+ $ nex schema field --table incident --field state --auth dev
2733
+
2734
+ Explain the priority field on incident table with JSON output
2735
+
2736
+ $ nex schema field --table incident --field priority --json --auth dev
2737
+ ```
2738
+
2739
+ _See code: [src/commands/schema/field.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/schema/field.ts)_
2740
+
2741
+ ## `nex schema validate-catalog`
2742
+
2743
+ Validate a ServiceNow catalog item configuration for common issues.
2744
+
2745
+ ```
2746
+ USAGE
2747
+ $ nex schema validate-catalog -s <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace]
2748
+
2749
+ FLAGS
2750
+ -a, --auth=<value> Auth alias to use.
2751
+ -j, --json Output results as JSON
2752
+ -s, --sys-id=<value> (required) Catalog item sys_id to validate
2753
+
2754
+ GLOBAL FLAGS
2755
+ --log-level=<option> [default: info] Specify level for logging.
2756
+ <options: debug|warn|error|info|trace>
2757
+
2758
+ DESCRIPTION
2759
+ Validate a ServiceNow catalog item configuration for common issues.
2760
+
2761
+ This command checks a catalog item configuration and reports any validation issues, warnings, or errors found. Useful
2762
+ for ensuring catalog items are properly configured before deployment.
2763
+
2764
+ EXAMPLES
2765
+ Validate a catalog item by sys_id
2766
+
2767
+ $ nex schema validate-catalog --sys-id a1b2c3d4e5f6 --auth dev
2768
+
2769
+ Validate a catalog item with JSON output
2770
+
2771
+ $ nex schema validate-catalog --sys-id a1b2c3d4e5f6 --json --auth dev
2772
+ ```
2773
+
2774
+ _See code: [src/commands/schema/validate-catalog.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/schema/validate-catalog.ts)_
2775
+
2776
+ ## `nex scope`
2777
+
2778
+ Get the current application scope or list available applications.
2779
+
2780
+ ```
2781
+ USAGE
2782
+ $ nex scope [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-l]
2783
+
2784
+ FLAGS
2785
+ -a, --auth=<value> Auth alias to use.
2786
+ -l, --list List all available applications
2787
+
2788
+ GLOBAL FLAGS
2789
+ --json Format output as json.
2790
+ --log-level=<option> [default: info] Specify level for logging.
2791
+ <options: debug|warn|error|info|trace>
2792
+
2793
+ DESCRIPTION
2794
+ Get the current application scope or list available applications.
2795
+
2796
+ EXAMPLES
2797
+ Get the current application scope
2798
+
2799
+ $ nex scope --auth dev
2800
+
2801
+ List all available applications
2802
+
2803
+ $ nex scope --list --auth dev
2804
+
2805
+ List applications as JSON
2806
+
2807
+ $ nex scope -l --json --auth dev
2808
+ ```
2809
+
2810
+ _See code: [src/commands/scope/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/scope/index.ts)_
2811
+
2812
+ ## `nex scope set`
2813
+
2814
+ Set the current application scope on a ServiceNow instance.
2815
+
2816
+ ```
2817
+ USAGE
2818
+ $ nex scope set -a <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
2819
+
2820
+ FLAGS
2821
+ -a, --app-id=<value> (required) 32-char sys_id of application
2822
+ -a, --auth=<value> Auth alias to use.
2823
+
2824
+ GLOBAL FLAGS
2825
+ --json Format output as json.
2826
+ --log-level=<option> [default: info] Specify level for logging.
2827
+ <options: debug|warn|error|info|trace>
2828
+
2829
+ DESCRIPTION
2830
+ Set the current application scope on a ServiceNow instance.
2831
+
2832
+ EXAMPLES
2833
+ Set application scope by sys_id
2834
+
2835
+ $ nex scope set --app-id abc123def456ghi789jkl012mno345pq --auth dev
2836
+
2837
+ Set application scope and output as JSON
2838
+
2839
+ $ nex scope set -a abc123def456ghi789jkl012mno345pq --json --auth dev
2840
+ ```
2841
+
2842
+ _See code: [src/commands/scope/set.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/scope/set.ts)_
2843
+
2844
+ ## `nex script-sync pull`
2845
+
2846
+ Pull a script from a ServiceNow instance to a local file.
2847
+
2848
+ ```
2849
+ USAGE
2850
+ $ nex script-sync pull -n <value> -t sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client
2851
+ [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-o <value>]
2852
+
2853
+ FLAGS
2854
+ -a, --auth=<value> Auth alias to use.
2855
+ -n, --name=<value> (required) Name of the script to pull
2856
+ -o, --output=<value> Output file path. If not specified, a file name is auto-generated.
2857
+ -t, --type=<option> (required) Type of script to pull
2858
+ <options: sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client>
2859
+
2860
+ GLOBAL FLAGS
2861
+ --json Format output as json.
2862
+ --log-level=<option> [default: info] Specify level for logging.
2863
+ <options: debug|warn|error|info|trace>
2864
+
2865
+ DESCRIPTION
2866
+ Pull a script from a ServiceNow instance to a local file.
2867
+
2868
+ This command downloads a script record from your ServiceNow instance and saves it as a local file. Supports multiple
2869
+ script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.
2870
+
2871
+ Features:
2872
+ • Download scripts by name and type
2873
+ • Custom output file path support
2874
+ • Auto-generated file names based on script name and type
2875
+ • JSON output for CI/CD integration
2876
+
2877
+ EXAMPLES
2878
+ Pull a Script Include to auto-generated file name
2879
+
2880
+ $ nex script-sync pull --name MyScriptInclude --type sys_script_include --auth dev-instance
2881
+
2882
+ Pull a Business Rule to a specific file
2883
+
2884
+ $ nex script-sync pull --name MyBusinessRule --type sys_script --output ./scripts/my-rule.js --auth dev-instance
2885
+
2886
+ Pull a Client Script with JSON output
2887
+
2888
+ $ nex script-sync pull -n MyClientScript -t sys_script_client --json --auth dev-instance
2889
+ ```
2890
+
2891
+ _See code: [src/commands/script-sync/pull.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/script-sync/pull.ts)_
2892
+
2893
+ ## `nex script-sync push`
2894
+
2895
+ Push a local script file to a ServiceNow instance.
2896
+
2897
+ ```
2898
+ USAGE
2899
+ $ nex script-sync push -n <value> -t sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client -f
2900
+ <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
2901
+
2902
+ FLAGS
2903
+ -a, --auth=<value> Auth alias to use.
2904
+ -f, --file=<value> (required) Path to the local script file to push
2905
+ -n, --name=<value> (required) Name of the script to push
2906
+ -t, --type=<option> (required) Type of script to push
2907
+ <options: sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client>
2908
+
2909
+ GLOBAL FLAGS
2910
+ --json Format output as json.
2911
+ --log-level=<option> [default: info] Specify level for logging.
2912
+ <options: debug|warn|error|info|trace>
2913
+
2914
+ DESCRIPTION
2915
+ Push a local script file to a ServiceNow instance.
2916
+
2917
+ This command uploads a local script file to your ServiceNow instance, updating the corresponding script record.
2918
+ Supports multiple script types including Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.
2919
+
2920
+ Features:
2921
+ • Upload scripts by name and type
2922
+ • Specify the local file to push
2923
+ • JSON output for CI/CD integration
2924
+ • Detailed push result reporting
2925
+
2926
+ EXAMPLES
2927
+ Push a Script Include from a local file
2928
+
2929
+ $ nex script-sync push --name MyScriptInclude --type sys_script_include --file ./scripts/MyScriptInclude.js \
2930
+ --auth dev-instance
2931
+
2932
+ Push a Business Rule with short flags
2933
+
2934
+ $ nex script-sync push -n MyBusinessRule -t sys_script -f ./scripts/my-rule.js -a dev-instance
2935
+
2936
+ Push a UI Script with JSON output
2937
+
2938
+ $ nex script-sync push -n MyUIScript -t sys_ui_script -f ./scripts/ui-script.js --json --auth dev-instance
2939
+ ```
2940
+
2941
+ _See code: [src/commands/script-sync/push.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/script-sync/push.ts)_
2942
+
2943
+ ## `nex script-sync sync`
2944
+
2945
+ Synchronize all scripts in a directory with a ServiceNow instance.
2946
+
2947
+ ```
2948
+ USAGE
2949
+ $ nex script-sync sync -d <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-t
2950
+ sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client...]
2951
+
2952
+ FLAGS
2953
+ -a, --auth=<value> Auth alias to use.
2954
+ -d, --directory=<value> (required) Directory containing script files to synchronize
2955
+ -t, --types=<option>... Script types to synchronize. Can be specified multiple times to include multiple types.
2956
+ <options: sys_script_include|sys_script|sys_ui_script|sys_ui_action|sys_script_client>
2957
+
2958
+ GLOBAL FLAGS
2959
+ --json Format output as json.
2960
+ --log-level=<option> [default: info] Specify level for logging.
2961
+ <options: debug|warn|error|info|trace>
2962
+
2963
+ DESCRIPTION
2964
+ Synchronize all scripts in a directory with a ServiceNow instance.
2965
+
2966
+ This command scans a local directory for script files and synchronizes them with the corresponding records on your
2967
+ ServiceNow instance. You can optionally filter by script types to synchronize only specific kinds of scripts.
2968
+
2969
+ Features:
2970
+ • Batch synchronization of all scripts in a directory
2971
+ • Filter by one or more script types
2972
+ • Summary report with success/failure counts
2973
+ • JSON output for CI/CD integration
2974
+
2975
+ EXAMPLES
2976
+ Sync all scripts in a directory
2977
+
2978
+ $ nex script-sync sync --directory ./scripts --auth dev-instance
2979
+
2980
+ Sync only Script Includes and Business Rules
2981
+
2982
+ $ nex script-sync sync --directory ./scripts --types sys_script_include --types sys_script --auth dev-instance
2983
+
2984
+ Sync with JSON output for CI/CD
2985
+
2986
+ $ nex script-sync sync -d ./scripts --json --auth dev-instance
2987
+ ```
2988
+
2989
+ _See code: [src/commands/script-sync/sync.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/script-sync/sync.ts)_
2990
+
2991
+ ## `nex search`
2992
+
2993
+ Search platform code across a ServiceNow instance.
2994
+
2995
+ ```
2996
+ USAGE
2997
+ $ nex search -t <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-l <value>] [-s
2998
+ <value>] [-g <value>] [--table <value>]
2999
+
3000
+ FLAGS
3001
+ -a, --auth=<value> Auth alias to use.
3002
+ -g, --search-group=<value> Search group to search within (required when using --table)
3003
+ -l, --limit=<value> Maximum number of results to return
3004
+ -s, --scope=<value> Application scope to search within
3005
+ -t, --term=<value> (required) Search term to look for in platform code
3006
+ --table=<value> Table name to search within (requires --search-group)
3007
+
3008
+ GLOBAL FLAGS
3009
+ --json Format output as json.
3010
+ --log-level=<option> [default: info] Specify level for logging.
3011
+ <options: debug|warn|error|info|trace>
3012
+
3013
+ DESCRIPTION
3014
+ Search platform code across a ServiceNow instance.
3015
+
3016
+ This command allows you to search through code stored on the platform, including scripts, business rules, UI pages,
3017
+ and other scriptable records. You can search globally, within a specific application scope, or within a specific table
3018
+ and search group.
3019
+
3020
+ Features:
3021
+ • Full-text code search across the platform
3022
+ • Scope-specific search within application boundaries
3023
+ • Table-specific search within a search group
3024
+ • JSON output for CI/CD integration
3025
+ • Configurable result limits
3026
+
3027
+ EXAMPLES
3028
+ Search for a term across the entire instance
3029
+
3030
+ $ nex search --term "GlideRecord" --auth dev-instance
3031
+
3032
+ Search within a specific application scope
3033
+
3034
+ $ nex search --term "getValue" --scope x_my_app --auth dev-instance
3035
+
3036
+ Search within a specific table and search group
3037
+
3038
+ $ nex search --term "initialize" --search-group "Script Includes" --table sys_script_include --auth dev-instance
3039
+
3040
+ Search with a result limit and JSON output
3041
+
3042
+ $ nex search --term "GlideRecord" --limit 10 --json --auth dev-instance
3043
+ ```
3044
+
3045
+ _See code: [src/commands/search/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/search/index.ts)_
3046
+
3047
+ ## `nex search add-table`
3048
+
3049
+ Add a table to a code search group on a ServiceNow instance.
3050
+
3051
+ ```
3052
+ USAGE
3053
+ $ nex search add-table -f <value> -g <value> -t <value> [--json] [-a <value>] [--log-level
3054
+ debug|warn|error|info|trace]
3055
+
3056
+ FLAGS
3057
+ -a, --auth=<value> Auth alias to use.
3058
+ -f, --search-fields=<value> (required) Comma-separated list of fields to index for search
3059
+ -g, --search-group=<value> (required) Search group to add the table to
3060
+ -t, --table=<value> (required) Table name to add to the search group
3061
+
3062
+ GLOBAL FLAGS
3063
+ --json Format output as json.
3064
+ --log-level=<option> [default: info] Specify level for logging.
3065
+ <options: debug|warn|error|info|trace>
3066
+
3067
+ DESCRIPTION
3068
+ Add a table to a code search group on a ServiceNow instance.
3069
+
3070
+ This command registers a new table and its searchable fields with a search group, making the table's records
3071
+ discoverable through code search. This is useful when you need to include custom tables in code search results.
3072
+
3073
+ Features:
3074
+ • Add custom tables to search groups
3075
+ • Specify which fields should be indexed
3076
+ • JSON output for scripting and automation
3077
+
3078
+ EXAMPLES
3079
+ Add a table to a search group
3080
+
3081
+ $ nex search add-table --table sys_script_include --search-fields script --search-group "Script Includes" --auth \
3082
+ dev-instance
3083
+
3084
+ Add a table with multiple search fields
3085
+
3086
+ $ nex search add-table --table sys_ui_page --search-fields "html,client_script,processing_script" --search-group \
3087
+ "UI Pages" --auth dev-instance
3088
+
3089
+ Add a table with JSON output
3090
+
3091
+ $ nex search add-table --table u_custom_script --search-fields script --search-group "Custom" --json --auth \
3092
+ dev-instance
3093
+ ```
3094
+
3095
+ _See code: [src/commands/search/add-table.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/search/add-table.ts)_
3096
+
3097
+ ## `nex search groups`
3098
+
3099
+ List all available code search groups on a ServiceNow instance.
3100
+
3101
+ ```
3102
+ USAGE
3103
+ $ nex search groups [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3104
+
3105
+ FLAGS
3106
+ -a, --auth=<value> Auth alias to use.
3107
+
3108
+ GLOBAL FLAGS
3109
+ --json Format output as json.
3110
+ --log-level=<option> [default: info] Specify level for logging.
3111
+ <options: debug|warn|error|info|trace>
3112
+
3113
+ DESCRIPTION
3114
+ List all available code search groups on a ServiceNow instance.
3115
+
3116
+ Search groups organize searchable tables into logical categories. Use this command to discover which search groups are
3117
+ configured, then use the group names with other search commands to narrow your search scope.
3118
+
3119
+ Features:
3120
+ • List all configured search groups
3121
+ • JSON output for scripting and automation
3122
+
3123
+ EXAMPLES
3124
+ List all search groups
3125
+
3126
+ $ nex search groups --auth dev-instance
3127
+
3128
+ List search groups with JSON output
3129
+
3130
+ $ nex search groups --json --auth dev-instance
3131
+ ```
3132
+
3133
+ _See code: [src/commands/search/groups.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/search/groups.ts)_
3134
+
3135
+ ## `nex search tables`
3136
+
3137
+ List tables configured for a specific code search group.
3138
+
3139
+ ```
3140
+ USAGE
3141
+ $ nex search tables -g <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
963
3142
 
964
3143
  FLAGS
965
- -n, --nested-commands Include all nested commands in the output.
3144
+ -a, --auth=<value> Auth alias to use.
3145
+ -g, --search-group=<value> (required) Search group name to list tables for
3146
+
3147
+ GLOBAL FLAGS
3148
+ --json Format output as json.
3149
+ --log-level=<option> [default: info] Specify level for logging.
3150
+ <options: debug|warn|error|info|trace>
966
3151
 
967
3152
  DESCRIPTION
968
- Display help for nex.
3153
+ List tables configured for a specific code search group.
3154
+
3155
+ Each search group contains one or more tables that are indexed for code search. Use this command to discover which
3156
+ tables belong to a search group, including the fields that are searchable on each table.
3157
+
3158
+ Features:
3159
+ • List all tables in a search group
3160
+ • View searchable fields per table
3161
+ • JSON output for scripting and automation
3162
+
3163
+ EXAMPLES
3164
+ List tables in a search group
3165
+
3166
+ $ nex search tables --search-group "Script Includes" --auth dev-instance
3167
+
3168
+ List tables with JSON output
3169
+
3170
+ $ nex search tables --search-group "Business Rules" --json --auth dev-instance
969
3171
  ```
970
3172
 
971
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.32/src/commands/help.ts)_
3173
+ _See code: [src/commands/search/tables.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/search/tables.ts)_
972
3174
 
973
- ## `nex log`
3175
+ ## `nex store install`
974
3176
 
975
- Tail and monitor ServiceNow system logs in real-time with beautiful formatting.
3177
+ Install an application from the ServiceNow Store.
976
3178
 
977
3179
  ```
978
3180
  USAGE
979
- $ nex log [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-o <value>] [-i <value>]
980
- [--no-color] [-f <value>...]
3181
+ $ nex store install -a <value> -v <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3182
+ [--demo-data] [--no-wait] [--poll-interval <value>] [--timeout <value>]
981
3183
 
982
3184
  FLAGS
983
- -a, --auth=<value> Auth alias to use.
984
- -f, --filter=<value>... Filter logs by field and value. Syntax: field OPERATOR value. Operators: CONTAINS,
985
- CONTAINS_CI (case-insensitive), EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI, ENDS_WITH,
986
- ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_EQUALS. Field defaults to "message" if omitted.
987
- Multiple filters are combined with AND logic.
988
- -i, --interval=<value> [default: 1000] Polling interval in milliseconds
989
- -o, --output=<value> Output file path to save logs. Creates parent directories if needed.
990
- --no-color Disable colored output
3185
+ -a, --app-id=<value> (required) Store application sys_id
3186
+ -a, --auth=<value> Auth alias to use.
3187
+ -v, --version=<value> (required) Application version to install
3188
+ --demo-data Load demo data during installation
3189
+ --no-wait Do not wait for installation to complete
3190
+ --poll-interval=<value> [default: 5000] Polling interval in milliseconds
3191
+ --timeout=<value> [default: 1800000] Installation timeout in milliseconds
991
3192
 
992
3193
  GLOBAL FLAGS
993
3194
  --json Format output as json.
@@ -995,373 +3196,771 @@ GLOBAL FLAGS
995
3196
  <options: debug|warn|error|info|trace>
996
3197
 
997
3198
  DESCRIPTION
998
- Tail and monitor ServiceNow system logs in real-time with beautiful formatting.
3199
+ Install an application from the ServiceNow Store.
999
3200
 
1000
- This command provides real-time log monitoring with enhanced visual formatting using color-coded output that makes
1001
- logs easy to scan and understand at a glance. Automatically highlights errors, warnings, success messages, and
1002
- important keywords.
3201
+ EXAMPLES
3202
+ Install a store application and wait for completion
1003
3203
 
1004
- Key Features:
1005
- • Real-time log tailing (like Unix tail -f)
1006
- • Powerful filtering with multiple operators (CONTAINS, REGEX, EQUALS, etc.)
1007
- • Smart keyword highlighting (errors in red, warnings in yellow, etc.)
1008
- • Beautiful color-coded console output with chalk
1009
- • Export logs to file with automatic appending
1010
- • Fast 1-second default polling interval
1011
- • Timestamps and sequence numbers for each log
1012
- • Graceful shutdown with Ctrl+C
1013
- • Clean output without colors (--no-color flag)
3204
+ $ nex store install --app-id abc123 --version 1.0.0 --auth dev
1014
3205
 
1015
- Smart Highlighting:
1016
- • Error terms (error, exception, failed) - highlighted in RED
1017
- • Warning terms (warn, warning, deprecated) - highlighted in YELLOW
1018
- • Success terms (success, completed, done) - highlighted in GREEN
1019
- • System terms (system, user, transaction) - highlighted in BLUE
3206
+ Install without waiting for completion
1020
3207
 
1021
- Filtering:
1022
- • Apply filters using --filter flag with syntax: "field OPERATOR value"
1023
- • Supports case-sensitive and case-insensitive operations
1024
- • Multiple filters are combined with AND logic
1025
- • Operators: CONTAINS, CONTAINS_CI, EQUALS, EQUALS_CI, STARTS_WITH, STARTS_WITH_CI,
1026
- ENDS_WITH, ENDS_WITH_CI, REGEX, NOT_CONTAINS, NOT_CONTAINS_CI, NOT_EQUALS, NOT_EQUALS_CI
3208
+ $ nex store install --app-id abc123 --version 1.0.0 --no-wait --auth dev
1027
3209
 
1028
- Use Cases:
1029
- • Monitor logs during application development
1030
- • Debug issues in real-time
1031
- • Track system events during deployments
1032
- • Filter logs for specific application or component
1033
- • Quickly spot errors and warnings
1034
- • Collect logs for analysis or audit trails
3210
+ Install with demo data
1035
3211
 
1036
- ⚠️ IMPORTANT NOTES:
1037
- • Press Ctrl+C to stop tailing and exit gracefully
1038
- • Log files are created/appended automatically
1039
- • Uses ChannelAjax when available for better performance
1040
- • Default poll interval is 1 second for real-time monitoring
3212
+ $ nex store install -a abc123 -v 1.0.0 --demo-data --auth dev
3213
+ ```
3214
+
3215
+ _See code: [src/commands/store/install.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/store/install.ts)_
3216
+
3217
+ ## `nex store search`
3218
+
3219
+ Search for applications in the ServiceNow Store.
3220
+
3221
+ ```
3222
+ USAGE
3223
+ $ nex store search [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--limit <value>] [--tab
3224
+ available_for_you|installed|updates] [-t <value>]
3225
+
3226
+ FLAGS
3227
+ -a, --auth=<value> Auth alias to use.
3228
+ -t, --term=<value> Search term
3229
+ --limit=<value> [default: 20] Maximum number of results to return
3230
+ --tab=<option> [default: available_for_you] Store tab context to search
3231
+ <options: available_for_you|installed|updates>
3232
+
3233
+ GLOBAL FLAGS
3234
+ --json Format output as json.
3235
+ --log-level=<option> [default: info] Specify level for logging.
3236
+ <options: debug|warn|error|info|trace>
3237
+
3238
+ DESCRIPTION
3239
+ Search for applications in the ServiceNow Store.
1041
3240
 
1042
3241
  EXAMPLES
1043
- Tail all logs in real-time
3242
+ Search for applications matching a term
1044
3243
 
1045
- $ nex log --auth dev-instance
3244
+ $ nex store search --term "ITSM" --auth dev
1046
3245
 
1047
- Tail logs and save to a file
3246
+ List installed applications
1048
3247
 
1049
- $ nex log --output ./logs/instance-logs.txt --auth dev-instance
3248
+ $ nex store search --tab installed --auth dev
1050
3249
 
1051
- Tail logs with custom polling interval (500ms for faster updates)
3250
+ List applications with available updates
1052
3251
 
1053
- $ nex log --interval 500 --auth dev-instance
3252
+ $ nex store search --tab updates --limit 10 --auth dev
3253
+ ```
1054
3254
 
1055
- Filter logs containing specific text (case-insensitive)
3255
+ _See code: [src/commands/store/search.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/store/search.ts)_
3256
+
3257
+ ## `nex store update`
3258
+
3259
+ Update a ServiceNow Store application to a new version.
3260
+
3261
+ ```
3262
+ USAGE
3263
+ $ nex store update -a <value> -v <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3264
+ [--no-wait] [--poll-interval <value>] [--timeout <value>]
3265
+
3266
+ FLAGS
3267
+ -a, --app-id=<value> (required) Store application sys_id
3268
+ -a, --auth=<value> Auth alias to use.
3269
+ -v, --version=<value> (required) Target application version
3270
+ --no-wait Do not wait for update to complete
3271
+ --poll-interval=<value> [default: 5000] Polling interval in milliseconds
3272
+ --timeout=<value> [default: 1800000] Update timeout in milliseconds
3273
+
3274
+ GLOBAL FLAGS
3275
+ --json Format output as json.
3276
+ --log-level=<option> [default: info] Specify level for logging.
3277
+ <options: debug|warn|error|info|trace>
3278
+
3279
+ DESCRIPTION
3280
+ Update a ServiceNow Store application to a new version.
3281
+
3282
+ EXAMPLES
3283
+ Update a store application and wait for completion
3284
+
3285
+ $ nex store update --app-id abc123 --version 2.0.0 --auth dev
3286
+
3287
+ Update without waiting for completion
3288
+
3289
+ $ nex store update --app-id abc123 --version 2.0.0 --no-wait --auth dev
3290
+
3291
+ Update with custom timeout (1 hour)
3292
+
3293
+ $ nex store update -a abc123 -v 2.0.0 --timeout 3600000 --auth dev
3294
+ ```
3295
+
3296
+ _See code: [src/commands/store/update.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/store/update.ts)_
3297
+
3298
+ ## `nex store validate`
3299
+
3300
+ Validate a batch installation definition file.
3301
+
3302
+ ```
3303
+ USAGE
3304
+ $ nex store validate -f <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3305
+
3306
+ FLAGS
3307
+ -a, --auth=<value> Auth alias to use.
3308
+ -f, --file=<value> (required) Path to batch definition JSON file
3309
+
3310
+ GLOBAL FLAGS
3311
+ --json Format output as json.
3312
+ --log-level=<option> [default: info] Specify level for logging.
3313
+ <options: debug|warn|error|info|trace>
3314
+
3315
+ DESCRIPTION
3316
+ Validate a batch installation definition file.
3317
+
3318
+ EXAMPLES
3319
+ Validate a batch definition file
3320
+
3321
+ $ nex store validate --file ./batch-definition.json --auth dev
3322
+ ```
3323
+
3324
+ _See code: [src/commands/store/validate.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/store/validate.ts)_
3325
+
3326
+ ## `nex task approve`
3327
+
3328
+ Approve a ServiceNow change request.
3329
+
3330
+ ```
3331
+ USAGE
3332
+ $ nex task approve -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-c <value>]
3333
+
3334
+ FLAGS
3335
+ -a, --auth=<value> Auth alias to use.
3336
+ -c, --comments=<value> Approval comments
3337
+ -n, --number=<value> (required) Change request number (e.g., CHG0010001)
3338
+
3339
+ GLOBAL FLAGS
3340
+ --json Format output as json.
3341
+ --log-level=<option> [default: info] Specify level for logging.
3342
+ <options: debug|warn|error|info|trace>
3343
+
3344
+ DESCRIPTION
3345
+ Approve a ServiceNow change request.
3346
+
3347
+ This command approves a change request identified by its number. You can optionally provide approval comments.
3348
+
3349
+ Features:
3350
+ - Approve change requests
3351
+ - Optionally add approval comments
3352
+ - Auto-resolves change request number to sys_id
3353
+
3354
+ EXAMPLES
3355
+ Approve a change request
3356
+
3357
+ $ nex task approve --number CHG0010001 --auth dev
3358
+
3359
+ Approve a change request with comments
3360
+
3361
+ $ nex task approve -n CHG0010001 -c "Looks good, approved" --auth dev
3362
+ ```
3363
+
3364
+ _See code: [src/commands/task/approve.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/approve.ts)_
3365
+
3366
+ ## `nex task assign`
3367
+
3368
+ Assign a ServiceNow task to a user or group.
3369
+
3370
+ ```
3371
+ USAGE
3372
+ $ nex task assign -n <value> -u <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-g
3373
+ <value>] [--table <value>]
3374
+
3375
+ FLAGS
3376
+ -a, --auth=<value> Auth alias to use.
3377
+ -g, --group=<value> Assignment group
3378
+ -n, --number=<value> (required) Task number (e.g., INC0010001)
3379
+ -u, --user=<value> (required) User to assign the task to
3380
+ --table=<value> [default: task] ServiceNow table name
3381
+
3382
+ GLOBAL FLAGS
3383
+ --json Format output as json.
3384
+ --log-level=<option> [default: info] Specify level for logging.
3385
+ <options: debug|warn|error|info|trace>
3386
+
3387
+ DESCRIPTION
3388
+ Assign a ServiceNow task to a user or group.
3389
+
3390
+ This command assigns a task record identified by its number to a specified user and/or group. You can assign to a
3391
+ user, a group, or both simultaneously.
3392
+
3393
+ Features:
3394
+ - Assign tasks to individual users
3395
+ - Assign tasks to assignment groups
3396
+ - Assign to both user and group at once
3397
+ - Supports any task-based table
3398
+ - Auto-resolves task number to sys_id
3399
+
3400
+ EXAMPLES
3401
+ Assign an incident to a user
3402
+
3403
+ $ nex task assign --number INC0010001 --user admin --auth dev
3404
+
3405
+ Assign an incident to a user and group
3406
+
3407
+ $ nex task assign -n INC0010001 -u admin -g "Service Desk" --auth dev
3408
+
3409
+ Assign a change request to a user
3410
+
3411
+ $ nex task assign --number CHG0010001 --table change_request --user admin --auth dev
3412
+ ```
3413
+
3414
+ _See code: [src/commands/task/assign.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/assign.ts)_
3415
+
3416
+ ## `nex task close`
3417
+
3418
+ Close a ServiceNow incident.
3419
+
3420
+ ```
3421
+ USAGE
3422
+ $ nex task close --notes <value> -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3423
+ [--close-code <value>]
3424
+
3425
+ FLAGS
3426
+ -a, --auth=<value> Auth alias to use.
3427
+ -n, --number=<value> (required) Incident number (e.g., INC0010001)
3428
+ --close-code=<value> Close code for the closure
3429
+ --notes=<value> (required) Close notes
3430
+
3431
+ GLOBAL FLAGS
3432
+ --json Format output as json.
3433
+ --log-level=<option> [default: info] Specify level for logging.
3434
+ <options: debug|warn|error|info|trace>
3435
+
3436
+ DESCRIPTION
3437
+ Close a ServiceNow incident.
3438
+
3439
+ This command closes an incident identified by its number, setting the close notes and optionally a close code. The
3440
+ incident must be in a state that allows closure.
3441
+
3442
+ Features:
3443
+ - Close incidents with close notes
3444
+ - Optionally specify a close code
3445
+ - Auto-resolves incident number to sys_id
3446
+
3447
+ EXAMPLES
3448
+ Close an incident with close notes
3449
+
3450
+ $ nex task close --number INC0010001 --notes "Issue confirmed resolved by user" --auth dev
3451
+
3452
+ Close with a specific close code
3453
+
3454
+ $ nex task close -n INC0010001 --notes "Closed" --close-code "Solved (Permanently)" --auth dev
3455
+ ```
3456
+
3457
+ _See code: [src/commands/task/close.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/close.ts)_
3458
+
3459
+ ## `nex task comment`
3460
+
3461
+ Add a comment or work note to a ServiceNow task.
3462
+
3463
+ ```
3464
+ USAGE
3465
+ $ nex task comment -c <value> -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3466
+ [--table <value>] [--work-note]
3467
+
3468
+ FLAGS
3469
+ -a, --auth=<value> Auth alias to use.
3470
+ -c, --comment=<value> (required) Comment text to add
3471
+ -n, --number=<value> (required) Task number (e.g., INC0010001)
3472
+ --table=<value> [default: task] ServiceNow table name
3473
+ --work-note Add as work note instead of comment
3474
+
3475
+ GLOBAL FLAGS
3476
+ --json Format output as json.
3477
+ --log-level=<option> [default: info] Specify level for logging.
3478
+ <options: debug|warn|error|info|trace>
3479
+
3480
+ DESCRIPTION
3481
+ Add a comment or work note to a ServiceNow task.
3482
+
3483
+ This command adds a comment or work note to a task record identified by its number. By default, comments are added as
3484
+ customer-visible comments. Use the --work-note flag to add an internal work note instead.
3485
+
3486
+ Features:
3487
+ - Add customer-visible comments to any task
3488
+ - Add internal work notes visible only to fulfiller teams
3489
+ - Supports any task-based table (incident, change_request, etc.)
3490
+ - Auto-resolves task number to sys_id
3491
+
3492
+ EXAMPLES
3493
+ Add a comment to an incident
3494
+
3495
+ $ nex task comment --number INC0010001 --comment "Investigating the issue" --auth dev
3496
+
3497
+ Add a work note to an incident
3498
+
3499
+ $ nex task comment -n INC0010001 -c "Internal update" --work-note --auth dev
3500
+
3501
+ Add a comment to a change request
3502
+
3503
+ $ nex task comment --number CHG0010001 --table change_request --comment "Approved" --auth dev
3504
+ ```
3505
+
3506
+ _See code: [src/commands/task/comment.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/comment.ts)_
3507
+
3508
+ ## `nex task find`
3509
+
3510
+ Find a ServiceNow task by its number.
3511
+
3512
+ ```
3513
+ USAGE
3514
+ $ nex task find -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--table <value>]
3515
+
3516
+ FLAGS
3517
+ -a, --auth=<value> Auth alias to use.
3518
+ -n, --number=<value> (required) Task number (e.g., INC0010001, CHG0010001)
3519
+ --table=<value> [default: task] ServiceNow table name
3520
+
3521
+ GLOBAL FLAGS
3522
+ --json Format output as json.
3523
+ --log-level=<option> [default: info] Specify level for logging.
3524
+ <options: debug|warn|error|info|trace>
1056
3525
 
1057
- $ nex log --filter "message CONTAINS_CI error" --auth dev-instance
3526
+ DESCRIPTION
3527
+ Find a ServiceNow task by its number.
1058
3528
 
1059
- Filter logs with multiple conditions (AND logic)
3529
+ This command looks up a task record by its number in the specified table. Returns the full task details including
3530
+ sys_id, description, state, and assignment information.
1060
3531
 
1061
- $ nex log --filter "message CONTAINS x_taniu_tan_core" --filter "message CONTAINS error" --auth dev-instance
3532
+ Features:
3533
+ - Look up any task by number
3534
+ - Supports any task-based table
3535
+ - JSON output for scripting and automation
1062
3536
 
1063
- Filter logs using regex pattern
3537
+ EXAMPLES
3538
+ Find an incident by number
1064
3539
 
1065
- $ nex log --filter "message REGEX .*exception.*" --auth dev-instance
3540
+ $ nex task find --number INC0010001 --auth dev
1066
3541
 
1067
- Filter logs by message starting with a pattern
3542
+ Find a change request by number
1068
3543
 
1069
- $ nex log --filter "message STARTS_WITH [ERROR]" --auth dev-instance
3544
+ $ nex task find -n CHG0010001 --table change_request --auth dev
1070
3545
 
1071
- Tail logs without colored output
3546
+ Find an incident and output as JSON
1072
3547
 
1073
- $ nex log --no-color --auth dev-instance
3548
+ $ nex task find -n INC0010001 --json --auth dev
1074
3549
  ```
1075
3550
 
1076
- ## `nex plugins`
3551
+ _See code: [src/commands/task/find.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/find.ts)_
1077
3552
 
1078
- List installed plugins.
3553
+ ## `nex task resolve`
3554
+
3555
+ Resolve a ServiceNow incident with resolution notes.
1079
3556
 
1080
3557
  ```
1081
3558
  USAGE
1082
- $ nex plugins [--json] [--core]
3559
+ $ nex task resolve --notes <value> -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
3560
+ [--close-code <value>]
1083
3561
 
1084
3562
  FLAGS
1085
- --core Show core plugins.
3563
+ -a, --auth=<value> Auth alias to use.
3564
+ -n, --number=<value> (required) Incident number (e.g., INC0010001)
3565
+ --close-code=<value> Close code for the resolution
3566
+ --notes=<value> (required) Resolution notes
1086
3567
 
1087
3568
  GLOBAL FLAGS
1088
- --json Format output as json.
3569
+ --json Format output as json.
3570
+ --log-level=<option> [default: info] Specify level for logging.
3571
+ <options: debug|warn|error|info|trace>
1089
3572
 
1090
3573
  DESCRIPTION
1091
- List installed plugins.
3574
+ Resolve a ServiceNow incident with resolution notes.
3575
+
3576
+ This command resolves an incident identified by its number, setting the resolution notes and optionally a close code.
3577
+ The incident must be in a state that allows resolution.
3578
+
3579
+ Features:
3580
+ - Resolve incidents with resolution notes
3581
+ - Optionally specify a close code
3582
+ - Auto-resolves incident number to sys_id
1092
3583
 
1093
3584
  EXAMPLES
1094
- $ nex plugins
3585
+ Resolve an incident with resolution notes
3586
+
3587
+ $ nex task resolve --number INC0010001 --notes "Issue resolved by restarting the service" --auth dev
3588
+
3589
+ Resolve with a specific close code
3590
+
3591
+ $ nex task resolve -n INC0010001 --notes "Fixed" --close-code "Solved (Permanently)" --auth dev
1095
3592
  ```
1096
3593
 
1097
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/index.ts)_
3594
+ _See code: [src/commands/task/resolve.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/task/resolve.ts)_
1098
3595
 
1099
- ## `nex plugins add PLUGIN`
3596
+ ## `nex update-set`
1100
3597
 
1101
- Installs a plugin into nex.
3598
+ List update sets on a ServiceNow instance.
1102
3599
 
1103
3600
  ```
1104
3601
  USAGE
1105
- $ nex plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
1106
-
1107
- ARGUMENTS
1108
- PLUGIN... Plugin to install.
3602
+ $ nex update-set [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--limit <value>] [-q <value>]
1109
3603
 
1110
3604
  FLAGS
1111
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
1112
- -h, --help Show CLI help.
1113
- -s, --silent Silences npm output.
1114
- -v, --verbose Show verbose npm output.
3605
+ -a, --auth=<value> Auth alias to use.
3606
+ -q, --query=<value> Encoded query filter
3607
+ --limit=<value> [default: 20] Maximum number of update sets to return
1115
3608
 
1116
3609
  GLOBAL FLAGS
1117
- --json Format output as json.
3610
+ --json Format output as json.
3611
+ --log-level=<option> [default: info] Specify level for logging.
3612
+ <options: debug|warn|error|info|trace>
1118
3613
 
1119
3614
  DESCRIPTION
1120
- Installs a plugin into nex.
1121
-
1122
- Uses npm to install plugins.
1123
-
1124
- Installation of a user-installed plugin will override a core plugin.
1125
-
1126
- Use the NEX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
1127
- Use the NEX_NPM_REGISTRY environment variable to set the npm registry.
1128
-
1129
- ALIASES
1130
- $ nex plugins add
3615
+ List update sets on a ServiceNow instance.
1131
3616
 
1132
3617
  EXAMPLES
1133
- Install a plugin from npm registry.
3618
+ List update sets with default limit
1134
3619
 
1135
- $ nex plugins add myplugin
3620
+ $ nex update-set --auth dev-instance
1136
3621
 
1137
- Install a plugin from a github url.
3622
+ List update sets with a custom query filter
1138
3623
 
1139
- $ nex plugins add https://github.com/someuser/someplugin
3624
+ $ nex update-set --query "state=in progress" --limit 50 --auth dev-instance
1140
3625
 
1141
- Install a plugin from a github slug.
3626
+ List update sets with JSON output
1142
3627
 
1143
- $ nex plugins add someuser/someplugin
3628
+ $ nex update-set --json --auth dev-instance
1144
3629
  ```
1145
3630
 
1146
- ## `nex plugins:inspect PLUGIN...`
3631
+ _See code: [src/commands/update-set/index.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/index.ts)_
1147
3632
 
1148
- Displays installation properties of a plugin.
3633
+ ## `nex update-set clone`
3634
+
3635
+ Clone an update set and its records.
1149
3636
 
1150
3637
  ```
1151
3638
  USAGE
1152
- $ nex plugins inspect PLUGIN...
1153
-
1154
- ARGUMENTS
1155
- PLUGIN... [default: .] Plugin to inspect.
3639
+ $ nex update-set clone -n <value> -s <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
1156
3640
 
1157
3641
  FLAGS
1158
- -h, --help Show CLI help.
1159
- -v, --verbose
3642
+ -a, --auth=<value> Auth alias to use.
3643
+ -n, --name=<value> (required) Name for the cloned update set
3644
+ -s, --source=<value> (required) Source update set sys_id
1160
3645
 
1161
3646
  GLOBAL FLAGS
1162
- --json Format output as json.
3647
+ --json Format output as json.
3648
+ --log-level=<option> [default: info] Specify level for logging.
3649
+ <options: debug|warn|error|info|trace>
1163
3650
 
1164
3651
  DESCRIPTION
1165
- Displays installation properties of a plugin.
3652
+ Clone an update set and its records.
1166
3653
 
1167
3654
  EXAMPLES
1168
- $ nex plugins inspect myplugin
3655
+ Clone an update set
3656
+
3657
+ $ nex update-set clone --source us-001 --name "Cloned Set" --auth dev-instance
3658
+
3659
+ Clone with JSON output
3660
+
3661
+ $ nex update-set clone --source us-001 --name "Cloned Set" --json --auth dev-instance
1169
3662
  ```
1170
3663
 
1171
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/inspect.ts)_
3664
+ _See code: [src/commands/update-set/clone.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/clone.ts)_
1172
3665
 
1173
- ## `nex plugins install PLUGIN`
3666
+ ## `nex update-set create`
1174
3667
 
1175
- Installs a plugin into nex.
3668
+ Create a new update set.
1176
3669
 
1177
3670
  ```
1178
3671
  USAGE
1179
- $ nex plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
1180
-
1181
- ARGUMENTS
1182
- PLUGIN... Plugin to install.
3672
+ $ nex update-set create -n <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--application
3673
+ <value>] [-d <value>]
1183
3674
 
1184
3675
  FLAGS
1185
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
1186
- -h, --help Show CLI help.
1187
- -s, --silent Silences npm output.
1188
- -v, --verbose Show verbose npm output.
3676
+ -a, --auth=<value> Auth alias to use.
3677
+ -d, --description=<value> Description for the new update set
3678
+ -n, --name=<value> (required) Name for the new update set
3679
+ --application=<value> Application scope for the new update set
1189
3680
 
1190
3681
  GLOBAL FLAGS
1191
- --json Format output as json.
3682
+ --json Format output as json.
3683
+ --log-level=<option> [default: info] Specify level for logging.
3684
+ <options: debug|warn|error|info|trace>
1192
3685
 
1193
3686
  DESCRIPTION
1194
- Installs a plugin into nex.
3687
+ Create a new update set.
1195
3688
 
1196
- Uses npm to install plugins.
3689
+ EXAMPLES
3690
+ Create a new update set with a name
1197
3691
 
1198
- Installation of a user-installed plugin will override a core plugin.
3692
+ $ nex update-set create --name "My Feature Set" --auth dev-instance
1199
3693
 
1200
- Use the NEX_NPM_LOG_LEVEL environment variable to set the npm loglevel.
1201
- Use the NEX_NPM_REGISTRY environment variable to set the npm registry.
3694
+ Create with name and description
1202
3695
 
1203
- ALIASES
1204
- $ nex plugins add
3696
+ $ nex update-set create --name "My Feature Set" --description "Update set for feature X" --auth dev-instance
3697
+
3698
+ Create within a specific application scope
3699
+
3700
+ $ nex update-set create --name "My Feature Set" --application x_my_app --auth dev-instance
3701
+ ```
3702
+
3703
+ _See code: [src/commands/update-set/create.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/create.ts)_
3704
+
3705
+ ## `nex update-set current`
3706
+
3707
+ Get or set the current update set.
3708
+
3709
+ ```
3710
+ USAGE
3711
+ $ nex update-set current [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [-s <value>]
3712
+
3713
+ FLAGS
3714
+ -a, --auth=<value> Auth alias to use.
3715
+ -s, --set=<value> sys_id of update set to make current
3716
+
3717
+ GLOBAL FLAGS
3718
+ --json Format output as json.
3719
+ --log-level=<option> [default: info] Specify level for logging.
3720
+ <options: debug|warn|error|info|trace>
3721
+
3722
+ DESCRIPTION
3723
+ Get or set the current update set.
1205
3724
 
1206
3725
  EXAMPLES
1207
- Install a plugin from npm registry.
3726
+ Get the current update set
1208
3727
 
1209
- $ nex plugins install myplugin
3728
+ $ nex update-set current --auth dev-instance
1210
3729
 
1211
- Install a plugin from a github url.
3730
+ Set the current update set by sys_id
1212
3731
 
1213
- $ nex plugins install https://github.com/someuser/someplugin
3732
+ $ nex update-set current --set us-001 --auth dev-instance
1214
3733
 
1215
- Install a plugin from a github slug.
3734
+ Get the current update set as JSON
1216
3735
 
1217
- $ nex plugins install someuser/someplugin
3736
+ $ nex update-set current --json --auth dev-instance
1218
3737
  ```
1219
3738
 
1220
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/install.ts)_
3739
+ _See code: [src/commands/update-set/current.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/current.ts)_
1221
3740
 
1222
- ## `nex plugins link PATH`
3741
+ ## `nex update-set inspect`
1223
3742
 
1224
- Links a plugin into the CLI for development.
3743
+ Inspect the components of an update set.
1225
3744
 
1226
3745
  ```
1227
3746
  USAGE
1228
- $ nex plugins link PATH [-h] [--install] [-v]
1229
-
1230
- ARGUMENTS
1231
- PATH [default: .] path to plugin
3747
+ $ nex update-set inspect -s <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
1232
3748
 
1233
3749
  FLAGS
1234
- -h, --help Show CLI help.
1235
- -v, --verbose
1236
- --[no-]install Install dependencies after linking the plugin.
3750
+ -a, --auth=<value> Auth alias to use.
3751
+ -s, --sys-id=<value> (required) sys_id of the update set to inspect
3752
+
3753
+ GLOBAL FLAGS
3754
+ --json Format output as json.
3755
+ --log-level=<option> [default: info] Specify level for logging.
3756
+ <options: debug|warn|error|info|trace>
1237
3757
 
1238
3758
  DESCRIPTION
1239
- Links a plugin into the CLI for development.
3759
+ Inspect the components of an update set.
1240
3760
 
1241
- Installation of a linked plugin will override a user-installed or core plugin.
3761
+ EXAMPLES
3762
+ Inspect an update set by sys_id
1242
3763
 
1243
- e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
1244
- command will override the user-installed or core plugin implementation. This is useful for development work.
3764
+ $ nex update-set inspect --sys-id us-001 --auth dev-instance
1245
3765
 
3766
+ Inspect with JSON output
1246
3767
 
1247
- EXAMPLES
1248
- $ nex plugins link myplugin
3768
+ $ nex update-set inspect --sys-id us-001 --json --auth dev-instance
1249
3769
  ```
1250
3770
 
1251
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/link.ts)_
3771
+ _See code: [src/commands/update-set/inspect.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/inspect.ts)_
1252
3772
 
1253
- ## `nex plugins remove [PLUGIN]`
3773
+ ## `nex update-set move`
1254
3774
 
1255
- Removes a plugin from the CLI.
3775
+ Move records between update sets.
1256
3776
 
1257
3777
  ```
1258
3778
  USAGE
1259
- $ nex plugins remove [PLUGIN...] [-h] [-v]
1260
-
1261
- ARGUMENTS
1262
- PLUGIN... plugin to uninstall
3779
+ $ nex update-set move --target <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace] [--records
3780
+ <value>] [--source <value>]
1263
3781
 
1264
3782
  FLAGS
1265
- -h, --help Show CLI help.
1266
- -v, --verbose
3783
+ -a, --auth=<value> Auth alias to use.
3784
+ --records=<value> Comma-separated sys_ids of records to move
3785
+ --source=<value> Source update set sys_id
3786
+ --target=<value> (required) Target update set sys_id
1267
3787
 
1268
- DESCRIPTION
1269
- Removes a plugin from the CLI.
3788
+ GLOBAL FLAGS
3789
+ --json Format output as json.
3790
+ --log-level=<option> [default: info] Specify level for logging.
3791
+ <options: debug|warn|error|info|trace>
1270
3792
 
1271
- ALIASES
1272
- $ nex plugins unlink
1273
- $ nex plugins remove
3793
+ DESCRIPTION
3794
+ Move records between update sets.
1274
3795
 
1275
3796
  EXAMPLES
1276
- $ nex plugins remove myplugin
3797
+ Move all records from one update set to another
3798
+
3799
+ $ nex update-set move --target us-002 --source us-001 --auth dev-instance
3800
+
3801
+ Move specific records to a target update set
3802
+
3803
+ $ nex update-set move --target us-002 --records "rec-001,rec-002,rec-003" --auth dev-instance
3804
+
3805
+ Move records with JSON output
3806
+
3807
+ $ nex update-set move --target us-002 --source us-001 --json --auth dev-instance
1277
3808
  ```
1278
3809
 
1279
- ## `nex plugins reset`
3810
+ _See code: [src/commands/update-set/move.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/update-set/move.ts)_
1280
3811
 
1281
- Remove all user-installed and linked plugins.
3812
+ ## `nex workflow create`
3813
+
3814
+ Create a complete workflow from a JSON specification file.
1282
3815
 
1283
3816
  ```
1284
3817
  USAGE
1285
- $ nex plugins reset [--hard] [--reinstall]
3818
+ $ nex workflow create -s <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
1286
3819
 
1287
3820
  FLAGS
1288
- --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
1289
- --reinstall Reinstall all plugins after uninstalling.
3821
+ -a, --auth=<value> Auth alias to use.
3822
+ -s, --spec=<value> (required) Path to workflow JSON specification file
3823
+
3824
+ GLOBAL FLAGS
3825
+ --json Format output as json.
3826
+ --log-level=<option> [default: info] Specify level for logging.
3827
+ <options: debug|warn|error|info|trace>
3828
+
3829
+ DESCRIPTION
3830
+ Create a complete workflow from a JSON specification file.
3831
+
3832
+ EXAMPLES
3833
+ Create a workflow from a JSON spec file
3834
+
3835
+ $ nex workflow create --spec ./workflow.json --auth dev
3836
+
3837
+ Create a workflow and output result as JSON
3838
+
3839
+ $ nex workflow create -s ./workflow.json --json --auth dev
1290
3840
  ```
1291
3841
 
1292
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/reset.ts)_
3842
+ _See code: [src/commands/workflow/create.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/workflow/create.ts)_
1293
3843
 
1294
- ## `nex plugins uninstall [PLUGIN]`
3844
+ ## `nex workflow publish`
1295
3845
 
1296
- Removes a plugin from the CLI.
3846
+ Publish a workflow version.
1297
3847
 
1298
3848
  ```
1299
3849
  USAGE
1300
- $ nex plugins uninstall [PLUGIN...] [-h] [-v]
1301
-
1302
- ARGUMENTS
1303
- PLUGIN... plugin to uninstall
3850
+ $ nex workflow publish -s <value> -v <value> [--json] [-a <value>] [--log-level debug|warn|error|info|trace]
1304
3851
 
1305
3852
  FLAGS
1306
- -h, --help Show CLI help.
1307
- -v, --verbose
3853
+ -a, --auth=<value> Auth alias to use.
3854
+ -s, --start-activity=<value> (required) Sys ID of the start activity
3855
+ -v, --version-id=<value> (required) Sys ID of the workflow version to publish
1308
3856
 
1309
- DESCRIPTION
1310
- Removes a plugin from the CLI.
3857
+ GLOBAL FLAGS
3858
+ --json Format output as json.
3859
+ --log-level=<option> [default: info] Specify level for logging.
3860
+ <options: debug|warn|error|info|trace>
1311
3861
 
1312
- ALIASES
1313
- $ nex plugins unlink
1314
- $ nex plugins remove
3862
+ DESCRIPTION
3863
+ Publish a workflow version.
1315
3864
 
1316
3865
  EXAMPLES
1317
- $ nex plugins uninstall myplugin
3866
+ Publish a workflow version
3867
+
3868
+ $ nex workflow publish --version-id wfv-001 --start-activity act-001 --auth dev
3869
+
3870
+ Publish a workflow version and output as JSON
3871
+
3872
+ $ nex workflow publish -v wfv-001 -s act-001 --json --auth dev
1318
3873
  ```
1319
3874
 
1320
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/uninstall.ts)_
3875
+ _See code: [src/commands/workflow/publish.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/workflow/publish.ts)_
1321
3876
 
1322
- ## `nex plugins unlink [PLUGIN]`
3877
+ ## `nex xml export`
1323
3878
 
1324
- Removes a plugin from the CLI.
3879
+ Export a single ServiceNow record as XML.
1325
3880
 
1326
3881
  ```
1327
3882
  USAGE
1328
- $ nex plugins unlink [PLUGIN...] [-h] [-v]
1329
-
1330
- ARGUMENTS
1331
- PLUGIN... plugin to uninstall
3883
+ $ nex xml export -t <value> -s <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace] [-o <value>]
1332
3884
 
1333
3885
  FLAGS
1334
- -h, --help Show CLI help.
1335
- -v, --verbose
3886
+ -a, --auth=<value> Auth alias to use.
3887
+ -j, --json Output results as JSON
3888
+ -o, --output=<value> File path to write the exported XML to. If omitted, XML is printed to stdout.
3889
+ -s, --sys-id=<value> (required) Sys ID of the record to export
3890
+ -t, --table=<value> (required) Table name of the record to export
3891
+
3892
+ GLOBAL FLAGS
3893
+ --log-level=<option> [default: info] Specify level for logging.
3894
+ <options: debug|warn|error|info|trace>
1336
3895
 
1337
3896
  DESCRIPTION
1338
- Removes a plugin from the CLI.
3897
+ Export a single ServiceNow record as XML.
1339
3898
 
1340
- ALIASES
1341
- $ nex plugins unlink
1342
- $ nex plugins remove
3899
+ Downloads the XML representation of a specific record from a ServiceNow table. Without --output, the XML is printed to
3900
+ stdout. With --output, the XML is written to the specified file path.
3901
+
3902
+ Features:
3903
+ • Export any record by table and sys_id
3904
+ • Print XML to stdout for piping to other tools
3905
+ • Save directly to a file with --output
3906
+ • JSON output mode for CI/CD integration
1343
3907
 
1344
3908
  EXAMPLES
1345
- $ nex plugins unlink myplugin
3909
+ Export a record to stdout
3910
+
3911
+ $ nex xml export --table sys_script_include --sys-id abc123def456 --auth dev
3912
+
3913
+ Export and save to a file
3914
+
3915
+ $ nex xml export --table incident --sys-id abc123 --output ./export.xml --auth dev
3916
+
3917
+ Export as JSON metadata
3918
+
3919
+ $ nex xml export --table sys_script --sys-id abc123 --json --auth dev
1346
3920
  ```
1347
3921
 
1348
- ## `nex plugins update`
3922
+ _See code: [src/commands/xml/export.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/xml/export.ts)_
1349
3923
 
1350
- Update installed plugins.
3924
+ ## `nex xml import`
3925
+
3926
+ Import XML records into a ServiceNow instance.
1351
3927
 
1352
3928
  ```
1353
3929
  USAGE
1354
- $ nex plugins update [-h] [-v]
3930
+ $ nex xml import -f <value> -t <value> [-j] [-a <value>] [--log-level debug|warn|error|info|trace]
1355
3931
 
1356
3932
  FLAGS
1357
- -h, --help Show CLI help.
1358
- -v, --verbose
3933
+ -a, --auth=<value> Auth alias to use.
3934
+ -f, --file=<value> (required) Path to the XML file to import
3935
+ -j, --json Output results as JSON
3936
+ -t, --table=<value> (required) Target table to import records into
3937
+
3938
+ GLOBAL FLAGS
3939
+ --log-level=<option> [default: info] Specify level for logging.
3940
+ <options: debug|warn|error|info|trace>
1359
3941
 
1360
3942
  DESCRIPTION
1361
- Update installed plugins.
3943
+ Import XML records into a ServiceNow instance.
3944
+
3945
+ Reads an XML file and imports its contents into the specified target table. The XML should be in ServiceNow unload
3946
+ format.
3947
+
3948
+ Features:
3949
+ • Import from local XML files
3950
+ • Target a specific table
3951
+ • JSON output mode for CI/CD integration
3952
+
3953
+ EXAMPLES
3954
+ Import records from an XML file
3955
+
3956
+ $ nex xml import --file ./export.xml --table sys_script_include --auth dev
3957
+
3958
+ Import with JSON output
3959
+
3960
+ $ nex xml import --file ./records.xml --table incident --json --auth dev
1362
3961
  ```
1363
3962
 
1364
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.46/src/commands/plugins/update.ts)_
3963
+ _See code: [src/commands/xml/import.ts](https://github.com/sonisoft-cnanda/now-sdk-ext-cli/blob/v2.0.1/src/commands/xml/import.ts)_
1365
3964
  <!-- commandsstop -->
1366
3965
 
1367
3966
  ---
@@ -1675,7 +4274,7 @@ jobs:
1675
4274
  - name: Setup Node.js
1676
4275
  uses: actions/setup-node@v3
1677
4276
  with:
1678
- node-version: '20'
4277
+ node-version: '22'
1679
4278
 
1680
4279
  - name: Install Dependencies
1681
4280
  run: |
@@ -1709,7 +4308,7 @@ jobs:
1709
4308
 
1710
4309
  ```yaml
1711
4310
  servicenow-tests:
1712
- image: node:20
4311
+ image: node:22
1713
4312
  stage: test
1714
4313
  before_script:
1715
4314
  - npm install -g @servicenow/sdk
@@ -2152,7 +4751,7 @@ npm install
2152
4751
  # Build
2153
4752
  npm run build
2154
4753
 
2155
- # Run tests (48 unit tests)
4754
+ # Run tests (960+ tests)
2156
4755
  npm test
2157
4756
 
2158
4757
  # Run linter