@scalar/cli 2.10.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +84 -1289
  2. package/chunks/action-2OPUQFUY.js +164 -0
  3. package/chunks/{action-4GZI2M5B.js → action-36LZ6XXE.js} +19 -17
  4. package/chunks/{action-KDUFU7TZ.js → action-3XMTJJRT.js} +19 -16
  5. package/chunks/{action-R4PGILN4.js → action-6CLEENBI.js} +47 -36
  6. package/chunks/{action-ZFI77WA5.js → action-7HXYZPOT.js} +10 -10
  7. package/chunks/{action-X7BA7PQQ.js → action-AC5ENU6Z.js} +20 -18
  8. package/chunks/{action-PPTFYZWD.js → action-ADGLTNFC.js} +28 -22
  9. package/chunks/{action-7XOHYWYM.js → action-AOKHLTZ6.js} +25 -21
  10. package/chunks/{action-XOADBXSX.js → action-AVSJ3AJY.js} +17 -16
  11. package/chunks/{action-GFLRD7LO.js → action-D3IVCY24.js} +8 -8
  12. package/chunks/action-EBZJS367.js +130 -0
  13. package/chunks/{action-ZKA3RR3S.js → action-EZXHSAJ2.js} +18 -17
  14. package/chunks/{action-5LF4XYHX.js → action-FDTVHVHF.js} +12 -12
  15. package/chunks/{action-JEYDBB3P.js → action-FUO5F7NV.js} +15 -15
  16. package/chunks/{action-DKDRAIKV.js → action-HA3CMV3P.js} +13 -15
  17. package/chunks/{action-YSVTZVKV.js → action-IG3BK2LF.js} +37 -26
  18. package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
  19. package/chunks/{action-DTEO4YNX.js → action-JT6C472I.js} +13 -11
  20. package/chunks/{action-UUL6SWV4.js → action-KDT6H6ML.js} +12 -14
  21. package/chunks/{action-PAM2EZ22.js → action-KJDIJQ3A.js} +8 -7
  22. package/chunks/{action-HT42NUUX.js → action-NF5E7JKA.js} +40 -38
  23. package/chunks/{action-EAUTQ77U.js → action-NIZBME45.js} +26 -24
  24. package/chunks/{action-CB55NWAU.js → action-O757TFA2.js} +9 -9
  25. package/chunks/{action-XLE37MZL.js → action-ONR7QSN7.js} +23 -22
  26. package/chunks/{action-5RL4NWUZ.js → action-QM2BMMHG.js} +33 -30
  27. package/chunks/{action-GWYYTUTM.js → action-QVTAZCKY.js} +5 -5
  28. package/chunks/action-SLB52XRG.js +65 -0
  29. package/chunks/{action-CABLS46Q.js → action-UTFRCKGE.js} +11 -11
  30. package/chunks/{action-4W5GUGEG.js → action-VESBFIP3.js} +20 -19
  31. package/chunks/{action-657A4K2D.js → action-VGFAIFYE.js} +26 -23
  32. package/chunks/action-WCU5O2VT.js +100 -0
  33. package/chunks/{action-TOBU74JH.js → action-XS5EESHW.js} +51 -27
  34. package/chunks/action-XVNRZ5VX.js +38 -0
  35. package/chunks/action-Y7EBKCUU.js +16 -0
  36. package/chunks/{action-5N3P43MD.js → action-YWQ2OKS3.js} +16 -15
  37. package/chunks/{actions-3SAMH7A5.js → actions-6QG7LH7P.js} +23 -20
  38. package/chunks/{agent-2ESZI7NO.js → agent-ONXROEAE.js} +44 -9
  39. package/chunks/{asyncapi-4HGVM3PR.js → asyncapi-7IFXAIE3.js} +13 -12
  40. package/chunks/{build.action-VBGFGACM.js → build.action-FI4OWY3T.js} +28 -26
  41. package/chunks/{chunk-ZGNDXPLU.js → chunk-26VIHQGL.js} +3 -3
  42. package/chunks/{chunk-JXGF5EHC.js → chunk-3HCEUGOE.js} +42 -13
  43. package/chunks/{chunk-G4HRW2FZ.js → chunk-5TNKTLQP.js} +370 -254
  44. package/chunks/{chunk-XAGJJNQW.js → chunk-BB6WWG25.js} +10 -10
  45. package/chunks/{chunk-K2HIB5BA.js → chunk-BCFUMXMC.js} +3 -3
  46. package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
  47. package/chunks/{chunk-MC4EMNOR.js → chunk-EJSGWV2K.js} +7 -6
  48. package/chunks/{chunk-GYRQPDTK.js → chunk-FJCOYEKT.js} +139 -3
  49. package/chunks/{chunk-ZKJPLWRJ.js → chunk-HU47OMI4.js} +4 -4
  50. package/chunks/{chunk-VVRUSQCY.js → chunk-I57ID5K7.js} +13 -0
  51. package/chunks/{chunk-43WALAW3.js → chunk-JLNHOA5Z.js} +64 -115
  52. package/chunks/{chunk-5SMP756H.js → chunk-LCSU43NJ.js} +2 -2
  53. package/chunks/{chunk-KHF2QXBG.js → chunk-N645RGAB.js} +1853 -683
  54. package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
  55. package/chunks/{chunk-H467HDVV.js → chunk-PERC34BV.js} +1 -1
  56. package/chunks/chunk-Q26DFKTY.js +37 -0
  57. package/chunks/{chunk-MMWSCTDB.js → chunk-QJQTSRU4.js} +19 -19
  58. package/chunks/{chunk-WDIWLXLV.js → chunk-RLBS4HJT.js} +3 -3
  59. package/chunks/{chunk-ATNTXKMS.js → chunk-RNZVZMYC.js} +198 -42
  60. package/chunks/{chunk-IPZP3VRA.js → chunk-RYWXF3LO.js} +12 -21
  61. package/chunks/{chunk-CWVYOXXM.js → chunk-SNOAL2C5.js} +11 -7
  62. package/chunks/{chunk-UDBSV3CK.js → chunk-T3R66THO.js} +6085 -4167
  63. package/chunks/{chunk-VYFGRLVQ.js → chunk-U73OW57G.js} +1 -1
  64. package/chunks/chunk-U764PQUA.js +1034 -0
  65. package/chunks/{chunk-KZNRQVMY.js → chunk-UAFCSWQ6.js} +1 -1
  66. package/chunks/{chunk-WB6PWTMU.js → chunk-UBLFIMUA.js} +1 -1
  67. package/chunks/{chunk-WIEXQUTD.js → chunk-UODTHS76.js} +1 -1
  68. package/chunks/chunk-V3MYP5SQ.js +247 -0
  69. package/chunks/{chunk-36LXIJIZ.js → chunk-V6LUKXBV.js} +1 -16
  70. package/chunks/{chunk-6M7TL2G2.js → chunk-VRZSDUZK.js} +45 -5
  71. package/chunks/{chunk-GLWTVLKM.js → chunk-VUNOOPEG.js} +9 -2
  72. package/chunks/chunk-VUXPDHTQ.js +22 -0
  73. package/chunks/{chunk-DHZW7Q7U.js → chunk-VVQOFG76.js} +2 -4
  74. package/chunks/chunk-XP5UM7SF.js +21 -0
  75. package/chunks/{chunk-ZYBLQ5CT.js → chunk-Y6C3H27E.js} +9 -4
  76. package/chunks/{chunk-35Z7VTJT.js → chunk-YTFFBGNQ.js} +52 -38
  77. package/chunks/{chunk-BIMLCGKS.js → chunk-ZNLMQKDU.js} +1 -1
  78. package/chunks/{create.action-DBNIS665.js → create.action-PPMZEMZL.js} +34 -32
  79. package/chunks/{delete.action-GBOZC45K.js → delete.action-GDOHATRZ.js} +30 -28
  80. package/chunks/{delete.action-K7BLK7DK.js → delete.action-VAHKEHEU.js} +29 -27
  81. package/chunks/{get.action-QHKMYZBK.js → get.action-UXFTGO7W.js} +24 -20
  82. package/chunks/{get.action-N3JOY3OU.js → get.action-XON3EZDT.js} +16 -15
  83. package/chunks/{list.action-TJCS6UEY.js → list.action-24F5WDGR.js} +37 -26
  84. package/chunks/{list.action-6SSO3JVN.js → list.action-OQEAEJ5U.js} +39 -29
  85. package/chunks/{publish.action-T24VHRMR.js → publish.action-G7FPDRBZ.js} +45 -43
  86. package/chunks/{scripts-VIBLGKYG.js → scripts-6CI6U32J.js} +1 -1
  87. package/chunks/{update.action-VOE6PH5F.js → update.action-IFIFXZWA.js} +29 -27
  88. package/chunks/{update.action-OGYNBXRU.js → update.action-MJDHVVR3.js} +30 -28
  89. package/index.js +290 -284
  90. package/package.json +2 -2
  91. package/skills/scalar-cli/SKILL.md +49 -49
  92. package/template.md +68 -252
  93. package/chunks/action-FBRY5JKU.js +0 -37
  94. package/chunks/action-LYCNT3KA.js +0 -73
  95. package/chunks/action-OJ2NK25F.js +0 -121
  96. package/chunks/action-U2L5DCFG.js +0 -91
  97. package/chunks/chunk-MNNGUUKJ.js +0 -405
  98. package/chunks/chunk-ZGVZU6L2.js +0 -422
  99. package/docs.html +0 -6977
package/index.js CHANGED
@@ -2,7 +2,11 @@
2
2
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
3
3
  import {
4
4
  DownloadIsolateCommand
5
- } from "./chunks/chunk-VYFGRLVQ.js";
5
+ } from "./chunks/chunk-U73OW57G.js";
6
+ import {
7
+ buildCliContext,
8
+ runnableCommands
9
+ } from "./chunks/chunk-EBNFCIKS.js";
6
10
  import {
7
11
  openBrowser
8
12
  } from "./chunks/chunk-JFIXNSPP.js";
@@ -13,7 +17,7 @@ import {
13
17
  BundleCommand,
14
18
  parseFetchLimit,
15
19
  parsePort
16
- } from "./chunks/chunk-MC4EMNOR.js";
20
+ } from "./chunks/chunk-EJSGWV2K.js";
17
21
  import {
18
22
  completeFiles
19
23
  } from "./chunks/chunk-DFOZG7ZV.js";
@@ -21,40 +25,36 @@ import {
21
25
  DOCUMENT_FORMATS,
22
26
  PRIVACY_VALUES
23
27
  } from "./chunks/chunk-NAC63XJF.js";
24
- import "./chunks/chunk-KHF2QXBG.js";
25
28
  import {
26
29
  SdkLanguage
27
- } from "./chunks/chunk-IPZP3VRA.js";
28
- import "./chunks/chunk-5ENKYZA4.js";
30
+ } from "./chunks/chunk-RYWXF3LO.js";
29
31
  import {
30
32
  checkNodeVersion
31
- } from "./chunks/chunk-36LXIJIZ.js";
33
+ } from "./chunks/chunk-VUXPDHTQ.js";
32
34
  import {
33
- getAuthData,
34
35
  getMetadata,
35
36
  logout,
36
37
  setMetadata
37
- } from "./chunks/chunk-35Z7VTJT.js";
38
- import "./chunks/chunk-WB6PWTMU.js";
38
+ } from "./chunks/chunk-YTFFBGNQ.js";
39
+ import "./chunks/chunk-UBLFIMUA.js";
39
40
  import {
40
41
  bin,
41
42
  name,
42
43
  version
43
- } from "./chunks/chunk-DHZW7Q7U.js";
44
- import "./chunks/chunk-GYRQPDTK.js";
45
- import "./chunks/chunk-6M7TL2G2.js";
44
+ } from "./chunks/chunk-VVQOFG76.js";
45
+ import "./chunks/chunk-FJCOYEKT.js";
46
+ import "./chunks/chunk-VRZSDUZK.js";
46
47
  import {
47
48
  requireInteractive
48
49
  } from "./chunks/chunk-EGOXR5FB.js";
49
- import "./chunks/chunk-4ORL4MST.js";
50
- import "./chunks/chunk-MNNGUUKJ.js";
51
50
  import {
52
51
  output
53
52
  } from "./chunks/chunk-T5HJUAWB.js";
54
- import "./chunks/chunk-ZGVZU6L2.js";
53
+ import "./chunks/chunk-U764PQUA.js";
54
+ import "./chunks/chunk-Q26DFKTY.js";
55
55
  import {
56
56
  external_exports
57
- } from "./chunks/chunk-VVRUSQCY.js";
57
+ } from "./chunks/chunk-I57ID5K7.js";
58
58
  import "./chunks/chunk-3MZYUBJ6.js";
59
59
 
60
60
  // src/index.ts
@@ -70,11 +70,11 @@ import { Command as Command6 } from "commander";
70
70
  import { Command } from "commander";
71
71
  var DeleteSchemaCommand = () => {
72
72
  const cmd3 = new Command("delete");
73
- cmd3.description("Delete a schema.");
73
+ cmd3.description("Delete a shared schema");
74
74
  cmd3.option("-s, --slug <slug>", "Schema slug");
75
75
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
76
76
  cmd3.action(async (...args) => {
77
- const { deleteAction } = await import("./chunks/delete.action-K7BLK7DK.js");
77
+ const { deleteAction } = await import("./chunks/delete.action-VAHKEHEU.js");
78
78
  return deleteAction(...args);
79
79
  });
80
80
  return cmd3;
@@ -84,17 +84,17 @@ var DeleteSchemaCommand = () => {
84
84
  import { Command as Command2, Option } from "commander";
85
85
  var GetSchemaCommand = () => {
86
86
  const cmd3 = new Command2("get");
87
- cmd3.description("Get a schema document version from the Scalar registry");
87
+ cmd3.description("Download a shared schema version from the Scalar Registry");
88
88
  cmd3.argument("[namespace]", "Team namespace");
89
89
  cmd3.argument("[slug]", "Schema slug");
90
90
  cmd3.option("--version <version>", "Schema version (defaults to latest)");
91
91
  cmd3.addOption(
92
- new Option("--format <format>", "Output format (json or yaml)").choices([...DOCUMENT_FORMATS]).default("json")
92
+ new Option("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
93
93
  );
94
94
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
95
95
  completeFiles(cmd3, [], ["--output"]);
96
96
  cmd3.action(async (...args) => {
97
- const { getAction } = await import("./chunks/get.action-N3JOY3OU.js");
97
+ const { getAction } = await import("./chunks/get.action-XON3EZDT.js");
98
98
  return getAction(...args);
99
99
  });
100
100
  return cmd3;
@@ -104,11 +104,11 @@ var GetSchemaCommand = () => {
104
104
  import { Command as Command3 } from "commander";
105
105
  var ListSchemaCommand = () => {
106
106
  const cmd3 = new Command3("list");
107
- cmd3.description("List all schemas for a team namespace");
107
+ cmd3.description("List shared schemas in a team namespace");
108
108
  cmd3.option("--namespace <namespace>", "Team namespace");
109
109
  cmd3.option("--json", "Output schema metadata as JSON");
110
110
  cmd3.action(async (...args) => {
111
- const { listAction } = await import("./chunks/list.action-TJCS6UEY.js");
111
+ const { listAction } = await import("./chunks/list.action-24F5WDGR.js");
112
112
  return listAction(...args);
113
113
  });
114
114
  return cmd3;
@@ -118,17 +118,14 @@ var ListSchemaCommand = () => {
118
118
  import { Command as Command4 } from "commander";
119
119
  var PublishSchemaCommand = () => {
120
120
  const cmd3 = new Command4("publish");
121
- cmd3.description("Publish a shared schema to the Scalar registry");
122
- cmd3.argument("[file]", "OpenAPI file to upload");
123
- cmd3.option(
124
- "--slug <slug>",
125
- "Slug identifier for the registry entry. Defaults to title."
126
- );
121
+ cmd3.description("Publish a shared schema to the Scalar Registry");
122
+ cmd3.argument("[file]", "Shared schema file path or URL to upload");
123
+ cmd3.option("--slug <slug>", "Shared schema slug");
127
124
  cmd3.option("--title <title>", "Schema title");
128
125
  cmd3.option("--namespace <namespace>", "Scalar team namespace");
129
- cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
130
- cmd3.option("--private", "Make API private", false);
131
- cmd3.option("--force", "Force override an existing version", false);
126
+ cmd3.option("--version <version>", "Schema version (for example, 0.1.0)");
127
+ cmd3.option("--private", "Make the shared schema private", false);
128
+ cmd3.option("--force", "Overwrite an existing version", false);
132
129
  cmd3.option("--bundle", "Bundle all external references before uploading");
133
130
  cmd3.option(
134
131
  "--treeShake",
@@ -140,12 +137,12 @@ var PublishSchemaCommand = () => {
140
137
  );
141
138
  cmd3.option(
142
139
  "--fetchLimit <limit>",
143
- "Maximum number of concurrent URLs to fetch when bundling the document",
140
+ "Maximum number of concurrent URL fetches when bundling",
144
141
  parseFetchLimit
145
142
  );
146
143
  completeFiles(cmd3, ["file"], []);
147
144
  cmd3.action(async (...args) => {
148
- const { publishAction } = await import("./chunks/publish.action-T24VHRMR.js");
145
+ const { publishAction } = await import("./chunks/publish.action-G7FPDRBZ.js");
149
146
  return publishAction(...args);
150
147
  });
151
148
  return cmd3;
@@ -155,19 +152,19 @@ var PublishSchemaCommand = () => {
155
152
  import { Command as Command5, Option as Option2 } from "commander";
156
153
  var UpdateSchemaCommand = () => {
157
154
  const cmd3 = new Command5("update");
158
- cmd3.description("Update schema metadata.");
155
+ cmd3.description("Update shared schema metadata");
159
156
  cmd3.option("-s, --slug <slug>", "Schema slug");
160
157
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
161
- cmd3.option("--title <title>", "Title");
162
- cmd3.option("--description <description>", "Description");
158
+ cmd3.option("--title <title>", "Schema title");
159
+ cmd3.option("--description <description>", "Schema description");
163
160
  cmd3.addOption(
164
161
  new Option2(
165
162
  "--isPrivate <isPrivate>",
166
- "Privacy (true/false or public/private)"
163
+ "Access setting (true/private or false/public)"
167
164
  ).choices([...PRIVACY_VALUES])
168
165
  );
169
166
  cmd3.action(async (...args) => {
170
- const { updateAction } = await import("./chunks/update.action-VOE6PH5F.js");
167
+ const { updateAction } = await import("./chunks/update.action-IFIFXZWA.js");
171
168
  return updateAction(...args);
172
169
  });
173
170
  return cmd3;
@@ -182,7 +179,7 @@ var schemaCommands = [
182
179
  PublishSchemaCommand
183
180
  ];
184
181
  var schemaDomain = new Command6("schema");
185
- schemaDomain.description("Manage your Scalar schemas");
182
+ schemaDomain.description("Manage shared schemas in the Scalar Registry");
186
183
  schemaCommands.forEach((command) => void schemaDomain.addCommand(command()));
187
184
  var schema_default = schemaDomain;
188
185
 
@@ -193,11 +190,11 @@ import { Command as Command13 } from "commander";
193
190
  import { Command as Command7 } from "commander";
194
191
  var BuildSdkCommand = () => {
195
192
  const cmd3 = new Command7("build");
196
- cmd3.description("Build an SDK.");
193
+ cmd3.description("Start an SDK build");
197
194
  cmd3.option("-s, --slug <slug>", "SDK slug");
198
195
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
199
196
  cmd3.action(async (...args) => {
200
- const { buildAction } = await import("./chunks/build.action-VBGFGACM.js");
197
+ const { buildAction } = await import("./chunks/build.action-FI4OWY3T.js");
201
198
  return buildAction(...args);
202
199
  });
203
200
  return cmd3;
@@ -207,21 +204,16 @@ var BuildSdkCommand = () => {
207
204
  import { Command as Command8, Option as Option3 } from "commander";
208
205
  var CreateSdkCommand = () => {
209
206
  const cmd3 = new Command8("create");
210
- cmd3.description(
211
- "Create a new SDK. The SDK is created in the namespace of the API it is built from."
212
- );
213
- cmd3.option("-a, --api <api>", "Registry API slug");
214
- cmd3.option(
215
- "-n, --namespace <namespace>",
216
- "Team namespace to look the API up in"
217
- );
207
+ cmd3.description("Create an SDK in the namespace of its source API");
208
+ cmd3.option("-a, --api <api>", "Scalar Registry API slug");
209
+ cmd3.option("-n, --namespace <namespace>", "Team namespace of the source API");
218
210
  cmd3.addOption(
219
- new Option3("-l, --language <language>", "Language of your SDK").choices(
211
+ new Option3("-l, --language <language>", "SDK language").choices(
220
212
  Object.values(SdkLanguage)
221
213
  )
222
214
  );
223
215
  cmd3.action(async (...args) => {
224
- const { createAction } = await import("./chunks/create.action-DBNIS665.js");
216
+ const { createAction } = await import("./chunks/create.action-PPMZEMZL.js");
225
217
  return createAction(...args);
226
218
  });
227
219
  return cmd3;
@@ -231,11 +223,11 @@ var CreateSdkCommand = () => {
231
223
  import { Command as Command9 } from "commander";
232
224
  var DeleteSdkCommand = () => {
233
225
  const cmd3 = new Command9("delete");
234
- cmd3.description("Delete an SDK.");
226
+ cmd3.description("Delete an SDK");
235
227
  cmd3.option("-s, --slug <slug>", "SDK slug");
236
228
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
237
229
  cmd3.action(async (...args) => {
238
- const { deleteAction } = await import("./chunks/delete.action-GBOZC45K.js");
230
+ const { deleteAction } = await import("./chunks/delete.action-GDOHATRZ.js");
239
231
  return deleteAction(...args);
240
232
  });
241
233
  return cmd3;
@@ -245,18 +237,18 @@ var DeleteSdkCommand = () => {
245
237
  import { Command as Command10, Option as Option4 } from "commander";
246
238
  var UpdateSdkCommand = () => {
247
239
  const cmd3 = new Command10("update");
248
- cmd3.description("Update SDK metadata.");
240
+ cmd3.description("Update SDK metadata");
249
241
  cmd3.option("-s, --slug <slug>", "SDK slug");
250
242
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
251
- cmd3.option("--title <title>", "Title");
243
+ cmd3.option("--title <title>", "SDK title");
252
244
  cmd3.addOption(
253
245
  new Option4(
254
246
  "--isPrivate <isPrivate>",
255
- "Privacy (true/false or public/private)"
247
+ "Access setting (true/private or false/public)"
256
248
  ).choices([...PRIVACY_VALUES])
257
249
  );
258
250
  cmd3.action(async (...args) => {
259
- const { updateAction } = await import("./chunks/update.action-OGYNBXRU.js");
251
+ const { updateAction } = await import("./chunks/update.action-MJDHVVR3.js");
260
252
  return updateAction(...args);
261
253
  });
262
254
  return cmd3;
@@ -273,7 +265,7 @@ var GetSdkCommand = () => {
273
265
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
274
266
  cmd3.option("--json", "Output structured SDK metadata as JSON");
275
267
  cmd3.action(async (...args) => {
276
- const { getAction } = await import("./chunks/get.action-QHKMYZBK.js");
268
+ const { getAction } = await import("./chunks/get.action-UXFTGO7W.js");
277
269
  return getAction(...args);
278
270
  });
279
271
  return cmd3;
@@ -283,11 +275,11 @@ var GetSdkCommand = () => {
283
275
  import { Command as Command12 } from "commander";
284
276
  var ListSdkCommand = () => {
285
277
  const cmd3 = new Command12("list");
286
- cmd3.description("List all SDKs for a team namespace");
278
+ cmd3.description("List SDKs in a team namespace");
287
279
  cmd3.option("--json", "Output structured SDK metadata as JSON");
288
280
  cmd3.option("--namespace <namespace>", "Team namespace");
289
281
  cmd3.action(async (...args) => {
290
- const { listAction } = await import("./chunks/list.action-6SSO3JVN.js");
282
+ const { listAction } = await import("./chunks/list.action-OQEAEJ5U.js");
291
283
  return listAction(...args);
292
284
  });
293
285
  return cmd3;
@@ -303,7 +295,7 @@ var sdkCommands = [
303
295
  BuildSdkCommand
304
296
  ];
305
297
  var sdkDomain = new Command13("sdk");
306
- sdkDomain.description("Manage your Scalar SDKs (Enterprise Only)");
298
+ sdkDomain.description("Manage Scalar SDKs (Enterprise only)");
307
299
  sdkCommands.forEach((command) => {
308
300
  sdkDomain.addCommand(command());
309
301
  });
@@ -316,41 +308,41 @@ function createAccessGroupCommand() {
316
308
  "Manage access groups and allowed email domains for the current team"
317
309
  );
318
310
  command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
319
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
311
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
320
312
  await runAction({ operation: "list", ...options });
321
313
  });
322
314
  command.command("create").description("Create an access group (Pro or above)").argument("<slug>", "New access group slug").option("--name <name>", "Display name").option("--domain <domains...>", "Allowed email domains").option("--json", "Print the result as JSON").action(
323
315
  async (slug, options) => {
324
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
316
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
325
317
  await runAction({ operation: "create", slug, ...options });
326
318
  }
327
319
  );
328
320
  command.command("get").description("Get an access group and its allowlists").argument("<slug>", "Access group slug").option("--json", "Print the result as JSON").action(async (slug, options) => {
329
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
321
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
330
322
  await runAction({ operation: "get", slug, ...options });
331
323
  });
332
324
  command.command("update").description("Update access group metadata").argument("<slug>", "Current access group slug").option("--name <name>", "New display name").option("--new-slug <slug>", "New access group slug").option("--json", "Print the result as JSON").action(
333
325
  async (slug, options) => {
334
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
326
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
335
327
  await runAction({ operation: "update", slug, ...options });
336
328
  }
337
329
  );
338
330
  command.command("delete").description("Delete an access group and remove its project assignments").argument("<slug>", "Access group slug").option("-y, --yes", "Confirm deletion without prompting").option("--json", "Print the result as JSON (requires --yes)").action(
339
331
  async (slug, options) => {
340
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
332
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
341
333
  await runAction({ operation: "delete", slug, ...options });
342
334
  }
343
335
  );
344
336
  const domain = command.command("domain").description("Manage allowed email domains");
345
337
  domain.command("add").description("Add an exact email domain to an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
346
338
  async (slug, domain2, options) => {
347
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
339
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
348
340
  await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
349
341
  }
350
342
  );
351
343
  domain.command("remove").description("Remove an exact email domain from an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
352
344
  async (slug, domain2, options) => {
353
- const { runAction } = await import("./chunks/actions-3SAMH7A5.js");
345
+ const { runAction } = await import("./chunks/actions-6QG7LH7P.js");
354
346
  await runAction({
355
347
  operation: "remove-domain",
356
348
  slug,
@@ -370,12 +362,22 @@ import { Command as Command18 } from "commander";
370
362
  import { Command as Command15, Option as Option5 } from "commander";
371
363
  var LoginCommand = () => {
372
364
  const cmd3 = new Command15("login");
373
- cmd3.description("Login to scalar");
374
- cmd3.option("--token <token>", "Personal token");
375
- cmd3.addOption(new Option5("--email <email>").hideHelp());
376
- cmd3.addOption(new Option5("--password <password>").hideHelp());
365
+ cmd3.description("Log in to Scalar");
366
+ cmd3.option("--token <token>", "Personal token for authentication");
367
+ cmd3.addOption(
368
+ new Option5(
369
+ "--email <email>",
370
+ "Email address (unsupported; use browser or token authentication)"
371
+ ).hideHelp()
372
+ );
373
+ cmd3.addOption(
374
+ new Option5(
375
+ "--password <password>",
376
+ "Password (unsupported; use browser or token authentication)"
377
+ ).hideHelp()
378
+ );
377
379
  cmd3.action(async (...args) => {
378
- const { loginAction } = await import("./chunks/action-JEYDBB3P.js");
380
+ const { loginAction } = await import("./chunks/action-FUO5F7NV.js");
379
381
  return loginAction(...args);
380
382
  });
381
383
  return cmd3;
@@ -385,25 +387,23 @@ var LoginCommand = () => {
385
387
  import { Command as Command16 } from "commander";
386
388
  var LogoutCommand = () => {
387
389
  const cmd3 = new Command16("logout");
388
- cmd3.description("Logout from scalar");
390
+ cmd3.description("Log out of Scalar");
389
391
  cmd3.action(async () => {
390
392
  await logout();
391
- output.info().message("Successfully logged out.").print();
393
+ output.info().message("Logged out of Scalar.").print();
392
394
  });
393
395
  return cmd3;
394
396
  };
395
397
 
396
398
  // src/domains/auth/whoami/index.ts
397
- import as from "ansis";
398
399
  import { Command as Command17 } from "commander";
399
400
  var WhoAmICommand = () => {
400
401
  const cmd3 = new Command17("whoami");
401
- cmd3.description("Display the current user");
402
- cmd3.action(async () => {
403
- const auth = await getAuthData();
404
- output.info().message(
405
- `You are logged in as ${as.cyan(auth.email ?? "")} (role: ${as.cyan(auth.role ?? "Owner")})`
406
- ).line().print();
402
+ cmd3.description("Show the logged-in user and current team");
403
+ cmd3.option("--json", "Output authentication details as JSON");
404
+ cmd3.action(async (options) => {
405
+ const { whoamiAction } = await import("./chunks/action-SLB52XRG.js");
406
+ return whoamiAction(options);
407
407
  });
408
408
  return cmd3;
409
409
  };
@@ -411,7 +411,7 @@ var WhoAmICommand = () => {
411
411
  // src/domains/auth/index.ts
412
412
  var authCommands = [LoginCommand, WhoAmICommand, LogoutCommand];
413
413
  var authDomain = new Command18("auth");
414
- authDomain.description("Manage authorization on scalar platform");
414
+ authDomain.description("Log in to Scalar and manage your session");
415
415
  authCommands.forEach((command) => authDomain.addCommand(command()));
416
416
  var auth_default = authDomain;
417
417
 
@@ -427,7 +427,7 @@ var createCompletionCommand = () => new Command19("completion").description("Gen
427
427
  ...COMPLETION_SHELLS
428
428
  ])
429
429
  ).action(async (shell) => {
430
- const { renderCompletionScript } = await import("./chunks/scripts-VIBLGKYG.js");
430
+ const { renderCompletionScript } = await import("./chunks/scripts-6CI6U32J.js");
431
431
  process.stdout.write(renderCompletionScript(shell));
432
432
  });
433
433
  var createCompletionQueryCommand = () => new Command19("__complete").description("Query shell completion candidates").argument("<cursor>", "Zero-based cursor word index").argument("[words...]", "Shell words including the executable").action(
@@ -455,7 +455,7 @@ cmd.description(
455
455
  "Print every command, argument, and option as JSON for AI agents"
456
456
  );
457
457
  cmd.action(async () => {
458
- const { contextAction } = await import("./chunks/action-F2ZJNURT.js");
458
+ const { contextAction } = await import("./chunks/action-Y7EBKCUU.js");
459
459
  return contextAction(cmd);
460
460
  });
461
461
  var context_default = cmd;
@@ -468,17 +468,20 @@ import { Command as Command21 } from "commander";
468
468
  function JoinCommand() {
469
469
  const cmd3 = new Command21("join");
470
470
  cmd3.description(
471
- "Merge multiple OpenAPI or AsyncAPI documents into a single unified document"
471
+ "Join API descriptions of the same format into one description"
472
+ );
473
+ cmd3.argument("<files...>", "OpenAPI or AsyncAPI file paths to join");
474
+ cmd3.option(
475
+ "-o, --output <file>",
476
+ "Output file for the joined description (required)"
472
477
  );
473
- cmd3.argument("<files...>", "Paths to the OpenAPI or AsyncAPI files to merge");
474
- cmd3.option("-o, --output <file>", "Path to save the merged output file");
475
478
  cmd3.option(
476
479
  "-p, --prefix-components-with-path-value <path>",
477
480
  "Dot-separated path to extract a prefix value from each input file for component names"
478
481
  );
479
482
  completeFiles(cmd3, ["files"], ["--output"]);
480
483
  cmd3.action(async (...args) => {
481
- const { joinAction } = await import("./chunks/action-DTEO4YNX.js");
484
+ const { joinAction } = await import("./chunks/action-JT6C472I.js");
482
485
  return joinAction(...args);
483
486
  });
484
487
  return cmd3;
@@ -488,16 +491,21 @@ function JoinCommand() {
488
491
  import { Command as Command22 } from "commander";
489
492
  function SplitCommand() {
490
493
  const cmd3 = new Command22("split");
491
- cmd3.description("Split OpenAPI or AsyncAPI documents into small chunks");
492
- cmd3.argument("[file|url]", "Path to OpenAPI or AsyncAPI file or URL to split");
493
- cmd3.option("-o, --output <path>", "Path to save the chunks");
494
+ cmd3.description(
495
+ "Split an OpenAPI or AsyncAPI description into referenced JSON files"
496
+ );
497
+ cmd3.argument("[file|url]", "API description file path or URL to split");
498
+ cmd3.option(
499
+ "-o, --output <path>",
500
+ "Output directory for the split description and referenced files"
501
+ );
494
502
  cmd3.addHelpText(
495
503
  "after",
496
504
  "\nAsyncAPI versions are preserved (including 2.6, 3.0, and 3.1). External references are bundled before splitting.\n"
497
505
  );
498
506
  completeFiles(cmd3, ["file|url"], ["--output"]);
499
507
  cmd3.action(async (...args) => {
500
- const { splitAction } = await import("./chunks/action-ZFI77WA5.js");
508
+ const { splitAction } = await import("./chunks/action-7HXYZPOT.js");
501
509
  return splitAction(...args);
502
510
  });
503
511
  return cmd3;
@@ -507,12 +515,15 @@ function SplitCommand() {
507
515
  import { Command as Command23 } from "commander";
508
516
  function FormatCommand() {
509
517
  const cmd3 = new Command23("format");
510
- cmd3.description("Format an OpenAPI or AsyncAPI file");
518
+ cmd3.description("Format an OpenAPI or AsyncAPI description");
511
519
  cmd3.argument("[file|url]", "File or URL to format");
512
- cmd3.option("-o, --output <file>", "Output file");
520
+ cmd3.option(
521
+ "-o, --output <file>",
522
+ "Output file (required for URLs; otherwise overwrites the input file)"
523
+ );
513
524
  completeFiles(cmd3, ["file|url"], ["--output"]);
514
525
  cmd3.action(async (...args) => {
515
- const { formatAction } = await import("./chunks/action-UUL6SWV4.js");
526
+ const { formatAction } = await import("./chunks/action-KDT6H6ML.js");
516
527
  return formatAction(...args);
517
528
  });
518
529
  return cmd3;
@@ -535,9 +546,9 @@ var reportFormats = [
535
546
  // src/domains/document/lint/index.ts
536
547
  function LintCommand() {
537
548
  const cmd3 = new Command24("lint");
538
- cmd3.description("Lint your OpenAPI or AsyncAPI file using spectral rules");
539
- cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file path or url");
540
- cmd3.option("-r, --rule <file|url>", "Rule path or url");
549
+ cmd3.description("Lint an OpenAPI or AsyncAPI description with Spectral rules");
550
+ cmd3.argument("[file|url]", "API description file path or URL to lint");
551
+ cmd3.option("-r, --rule <file|url>", "Spectral ruleset file path or URL");
541
552
  cmd3.addOption(
542
553
  new Option6("--format <format>", "Report format").choices([...reportFormats]).default("codeframe")
543
554
  );
@@ -565,7 +576,7 @@ function LintCommand() {
565
576
  );
566
577
  completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
567
578
  cmd3.action(async (...args) => {
568
- const { lintAction } = await import("./chunks/action-PPTFYZWD.js");
579
+ const { lintAction } = await import("./chunks/action-ADGLTNFC.js");
569
580
  return lintAction(...args);
570
581
  });
571
582
  return cmd3;
@@ -575,12 +586,12 @@ function LintCommand() {
575
586
  import { Command as Command25 } from "commander";
576
587
  function MarkdownCommand() {
577
588
  const cmd3 = new Command25("markdown");
578
- cmd3.description("Generate Markdown from an OpenAPI file");
589
+ cmd3.description("Generate Markdown documentation from an OpenAPI description");
579
590
  cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
580
591
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
581
592
  completeFiles(cmd3, ["file|url"], ["--output"]);
582
593
  cmd3.action(async (...args) => {
583
- const { markdownAction } = await import("./chunks/action-GFLRD7LO.js");
594
+ const { markdownAction } = await import("./chunks/action-D3IVCY24.js");
584
595
  return markdownAction(...args);
585
596
  });
586
597
  return cmd3;
@@ -590,18 +601,16 @@ function MarkdownCommand() {
590
601
  import { Command as Command26 } from "commander";
591
602
  function MockCommand() {
592
603
  const cmd3 = new Command26("mock");
593
- cmd3.description("Mock an OpenAPI API or AsyncAPI WebSocket and SSE channels");
594
- cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
595
- cmd3.option("-w, --watch", "watch the file for changes");
596
- cmd3.option("-o, --once", "run the server only once and exit after that");
597
- cmd3.option(
598
- "-p, --port <port>",
599
- "set the HTTP port for the mock server",
600
- parsePort
604
+ cmd3.description(
605
+ "Run a Mock Server for OpenAPI operations or AsyncAPI WebSocket and SSE channels"
601
606
  );
607
+ cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
608
+ cmd3.option("-w, --watch", "Watch the file or URL for changes");
609
+ cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
610
+ cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
602
611
  completeFiles(cmd3, ["file|url"], []);
603
612
  cmd3.action(async (...args) => {
604
- const { mockAction } = await import("./chunks/action-ZKA3RR3S.js");
613
+ const { mockAction } = await import("./chunks/action-EZXHSAJ2.js");
605
614
  return mockAction(...args);
606
615
  });
607
616
  return cmd3;
@@ -611,7 +620,7 @@ function MockCommand() {
611
620
  import { Command as Command27 } from "commander";
612
621
  function ConvertCommand() {
613
622
  const cmd3 = new Command27("convert");
614
- cmd3.description("Convert a Postman collection to an OpenAPI document");
623
+ cmd3.description("Convert a Postman collection to an OpenAPI description");
615
624
  cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
616
625
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
617
626
  cmd3.option(
@@ -620,7 +629,7 @@ function ConvertCommand() {
620
629
  );
621
630
  completeFiles(cmd3, ["file|url"], ["--output"]);
622
631
  cmd3.action(async (...args) => {
623
- const { convertAction } = await import("./chunks/action-CB55NWAU.js");
632
+ const { convertAction } = await import("./chunks/action-O757TFA2.js");
624
633
  return convertAction(...args);
625
634
  });
626
635
  return cmd3;
@@ -630,25 +639,24 @@ function ConvertCommand() {
630
639
  import { Command as Command28 } from "commander";
631
640
  function ServeCommand() {
632
641
  const cmd3 = new Command28("serve");
633
- cmd3.description("Serve an API Reference from an OpenAPI or AsyncAPI file");
634
- cmd3.argument(
635
- "[file|url]",
636
- "OpenAPI or AsyncAPI file or URL to show the reference for"
642
+ cmd3.description(
643
+ "Serve API Reference documentation from an OpenAPI or AsyncAPI description"
637
644
  );
645
+ cmd3.argument("[file|url]", "API description file path or URL to preview");
638
646
  cmd3.option(
639
647
  "-c, --config <file>",
640
648
  "JSON file with API Reference configuration"
641
649
  );
642
- cmd3.option("-w, --watch", "watch the file for changes");
643
- cmd3.option("-o, --once", "run the server only once and exit after that");
650
+ cmd3.option("-w, --watch", "Watch the file or URL for changes");
651
+ cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
644
652
  cmd3.option(
645
653
  "-p, --port <port>",
646
- "set the HTTP port for the API reference server",
654
+ "HTTP port for the API Reference server",
647
655
  parsePort
648
656
  );
649
657
  completeFiles(cmd3, ["file|url"], ["--config"]);
650
658
  cmd3.action(async (...args) => {
651
- const { serveAction } = await import("./chunks/action-XOADBXSX.js");
659
+ const { serveAction } = await import("./chunks/action-AVSJ3AJY.js");
652
660
  return serveAction(...args);
653
661
  });
654
662
  return cmd3;
@@ -658,15 +666,17 @@ function ServeCommand() {
658
666
  import { Command as Command29 } from "commander";
659
667
  function ShareCommand() {
660
668
  const cmd3 = new Command29("share");
661
- cmd3.description("Share an OpenAPI or AsyncAPI file");
662
- cmd3.argument("[file]", "file to share");
669
+ cmd3.description(
670
+ "Publish an OpenAPI or AsyncAPI description to a public sandbox"
671
+ );
672
+ cmd3.argument("[file]", "API description file path or URL to share");
663
673
  cmd3.option(
664
674
  "-t, --token <token>",
665
- "pass a token to update an existing sandbox"
675
+ "Token to update an existing public sandbox"
666
676
  );
667
677
  completeFiles(cmd3, ["file"], []);
668
678
  cmd3.action(async (...args) => {
669
- const { shareAction } = await import("./chunks/action-5LF4XYHX.js");
679
+ const { shareAction } = await import("./chunks/action-FDTVHVHF.js");
670
680
  return shareAction(...args);
671
681
  });
672
682
  return cmd3;
@@ -676,12 +686,17 @@ function ShareCommand() {
676
686
  import { Command as Command30 } from "commander";
677
687
  function UpgradeCommand() {
678
688
  const cmd3 = new Command30("upgrade");
679
- cmd3.description("Upgrade an OpenAPI or AsyncAPI document to version 3.1");
689
+ cmd3.description(
690
+ "Upgrade an API description to OpenAPI 3.1 or the latest supported AsyncAPI version"
691
+ );
680
692
  cmd3.argument("[file|url]", "File or URL to upgrade");
681
- cmd3.option("-o, --output <file>", "Path to save the upgraded output file");
693
+ cmd3.option(
694
+ "-o, --output <file>",
695
+ "Output file (required for URLs; otherwise overwrites the input file)"
696
+ );
682
697
  completeFiles(cmd3, ["file|url"], ["--output"]);
683
698
  cmd3.action(async (...args) => {
684
- const { upgradeAction } = await import("./chunks/action-DKDRAIKV.js");
699
+ const { upgradeAction } = await import("./chunks/action-HA3CMV3P.js");
685
700
  return upgradeAction(...args);
686
701
  });
687
702
  return cmd3;
@@ -691,11 +706,11 @@ function UpgradeCommand() {
691
706
  import { Command as Command31 } from "commander";
692
707
  function ValidateCommand() {
693
708
  const cmd3 = new Command31("validate");
694
- cmd3.description("Validate an OpenAPI or AsyncAPI file");
709
+ cmd3.description("Validate an OpenAPI or AsyncAPI description");
695
710
  cmd3.argument("[file|url]", "File or URL to validate");
696
711
  completeFiles(cmd3, ["file|url"], []);
697
712
  cmd3.action(async (...args) => {
698
- const { validateAction } = await import("./chunks/action-CABLS46Q.js");
713
+ const { validateAction } = await import("./chunks/action-UTFRCKGE.js");
699
714
  return validateAction(...args);
700
715
  });
701
716
  return cmd3;
@@ -705,15 +720,15 @@ function ValidateCommand() {
705
720
  import { Command as Command32 } from "commander";
706
721
  function VoidCommand() {
707
722
  const cmd3 = new Command32("void");
708
- cmd3.description("Boot a server to mirror HTTP requests");
709
- cmd3.option("-o, --once", "run the server only once and exit after that");
723
+ cmd3.description("Mirror HTTP requests with a local server");
724
+ cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
710
725
  cmd3.option(
711
726
  "-p, --port <port>",
712
- "set the HTTP port for the mock server",
727
+ "HTTP port for the request-mirroring server",
713
728
  parsePort
714
729
  );
715
730
  cmd3.action(async (...args) => {
716
- const { voidAction } = await import("./chunks/action-H3RTILLM.js");
731
+ const { voidAction } = await import("./chunks/action-IIQMZVRJ.js");
717
732
  return voidAction(...args);
718
733
  });
719
734
  return cmd3;
@@ -736,7 +751,7 @@ var documentCommands = [
736
751
  UpgradeCommand
737
752
  ];
738
753
  var documentDomain = new Command33("document");
739
- documentDomain.description("Manage local openapi file");
754
+ documentDomain.description("Work with OpenAPI and AsyncAPI descriptions");
740
755
  documentCommands.forEach((command) => documentDomain.addCommand(command()));
741
756
  var document_default = documentDomain;
742
757
 
@@ -747,27 +762,24 @@ import { Command as Command45 } from "commander";
747
762
  import { Command as Command34, Option as Option7 } from "commander";
748
763
  var PreviewCommand = () => {
749
764
  const cmd3 = new Command34("preview");
750
- cmd3.description("Preview scalar guides");
765
+ cmd3.description("Preview a Scalar Docs project locally");
751
766
  cmd3.argument(
752
767
  "[config]",
753
768
  "Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
754
769
  );
755
770
  cmd3.option(
756
771
  "-p, --port [port]",
757
- "port to run the server on. If the port is not available, it will select another one.",
772
+ "Preferred server port (uses another port if unavailable)",
758
773
  "7970"
759
774
  );
760
- cmd3.option(
761
- "-H, --host [host]",
762
- "Specify which IP addresses the server should listen on."
763
- );
775
+ cmd3.option("-H, --host [host]", "Host address for the preview server");
764
776
  cmd3.addOption(
765
777
  new Option7("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
766
778
  );
767
779
  cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
768
780
  completeFiles(cmd3, ["config"], []);
769
781
  cmd3.action(async (...args) => {
770
- const { previewAction } = await import("./chunks/action-KDUFU7TZ.js");
782
+ const { previewAction } = await import("./chunks/action-3XMTJJRT.js");
771
783
  return previewAction(...args);
772
784
  });
773
785
  return cmd3;
@@ -777,11 +789,14 @@ var PreviewCommand = () => {
777
789
  import { Command as Command35 } from "commander";
778
790
  function CheckConfigCommand() {
779
791
  const cmd3 = new Command35("check-config");
780
- cmd3.description("Check a Scalar Configuration file");
781
- cmd3.argument("[file]", "File to check");
792
+ cmd3.description("Validate a Scalar configuration file");
793
+ cmd3.argument(
794
+ "[file]",
795
+ "Scalar configuration file path (discovered in the current directory if omitted)"
796
+ );
782
797
  completeFiles(cmd3, ["file"], []);
783
798
  cmd3.action(async (...args) => {
784
- const { checkConfigAction } = await import("./chunks/action-PAM2EZ22.js");
799
+ const { checkConfigAction } = await import("./chunks/action-KJDIJQ3A.js");
785
800
  return checkConfigAction(...args);
786
801
  });
787
802
  return cmd3;
@@ -791,13 +806,11 @@ function CheckConfigCommand() {
791
806
  import { Command as Command36 } from "commander";
792
807
  var CreateCommand = () => {
793
808
  const cmd3 = new Command36("create");
794
- cmd3.description(
795
- "Create a new project that is not linked to a github project."
796
- );
797
- cmd3.option("-n, --name <name>", "name of your project");
798
- cmd3.option("-s, --slug <slug>", "project slug");
809
+ cmd3.description("Create a Scalar project without a linked GitHub repository");
810
+ cmd3.option("-n, --name <name>", "Project name");
811
+ cmd3.option("-s, --slug <slug>", "Project slug");
799
812
  cmd3.action(async (...args) => {
800
- const { createAction } = await import("./chunks/action-XLE37MZL.js");
813
+ const { createAction } = await import("./chunks/action-ONR7QSN7.js");
801
814
  return createAction(...args);
802
815
  });
803
816
  return cmd3;
@@ -810,10 +823,10 @@ import { Command as Command38 } from "commander";
810
823
  import { Command as Command37 } from "commander";
811
824
  var ListCommand = () => {
812
825
  const cmd3 = new Command37("list");
813
- cmd3.description("List the production deployment history for a project.");
826
+ cmd3.description("List production deployments for a project");
814
827
  cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
815
828
  cmd3.action(async (...args) => {
816
- const { listAction } = await import("./chunks/action-TOBU74JH.js");
829
+ const { listAction } = await import("./chunks/action-XS5EESHW.js");
817
830
  return listAction(...args);
818
831
  });
819
832
  return cmd3;
@@ -822,7 +835,7 @@ var ListCommand = () => {
822
835
  // src/domains/project/deployments/index.ts
823
836
  var DeploymentsCommand = () => {
824
837
  const cmd3 = new Command38("deployments");
825
- cmd3.description("Inspect a project deployment history.");
838
+ cmd3.description("Show project deployment history");
826
839
  cmd3.addCommand(ListCommand());
827
840
  return cmd3;
828
841
  };
@@ -830,10 +843,10 @@ var DeploymentsCommand = () => {
830
843
  // src/domains/project/get/index.ts
831
844
  import { Command as Command39 } from "commander";
832
845
  function GetCommand() {
833
- const command = new Command39("get").description("Get project details for the current team.").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
846
+ const command = new Command39("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
834
847
  command.action(
835
848
  async (slug, options) => {
836
- const { getAction } = await import("./chunks/action-4W5GUGEG.js");
849
+ const { getAction } = await import("./chunks/action-VESBFIP3.js");
837
850
  await getAction(slug, options);
838
851
  }
839
852
  );
@@ -844,11 +857,14 @@ function GetCommand() {
844
857
  import { Command as Command40 } from "commander";
845
858
  var InitCommand = () => {
846
859
  const cmd3 = new Command40("init");
847
- cmd3.description("Create a new Scalar Docs project.");
848
- cmd3.option("-s, --subdomain [url]", "subdomain to publish on");
849
- cmd3.option("--force", "override existing configuration");
860
+ cmd3.description("Initialize a local Scalar Docs project");
861
+ cmd3.option(
862
+ "-s, --subdomain [url]",
863
+ "Subdomain for the published documentation"
864
+ );
865
+ cmd3.option("--force", "Overwrite existing configuration");
850
866
  cmd3.action(async (...args) => {
851
- const { initAction } = await import("./chunks/action-5RL4NWUZ.js");
867
+ const { initAction } = await import("./chunks/action-QM2BMMHG.js");
852
868
  return initAction(...args);
853
869
  });
854
870
  return cmd3;
@@ -857,9 +873,9 @@ var InitCommand = () => {
857
873
  // src/domains/project/list/index.ts
858
874
  import { Command as Command41 } from "commander";
859
875
  function ListCommand2() {
860
- const command = new Command41("list").description("List projects and their slugs for the current team.").option("--json", "Print project details as JSON");
876
+ const command = new Command41("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
861
877
  command.action(async (options) => {
862
- const { listAction } = await import("./chunks/action-U2L5DCFG.js");
878
+ const { listAction } = await import("./chunks/action-2OPUQFUY.js");
863
879
  await listAction(options);
864
880
  });
865
881
  return command;
@@ -869,19 +885,23 @@ function ListCommand2() {
869
885
  import { Command as Command42 } from "commander";
870
886
  var PublishCommand = () => {
871
887
  const cmd3 = new Command42("publish");
872
- cmd3.description(
873
- "Publish new build for a github sync project that is not linked."
874
- );
888
+ cmd3.description("Publish a new build of a Scalar project");
875
889
  cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
876
- cmd3.option("-c, --config [config]", "Your config file of the project");
877
- cmd3.option("-p, --preview", "Publish in preview mode");
890
+ cmd3.option(
891
+ "-c, --config [config]",
892
+ "Scalar configuration file path for local publishing"
893
+ );
894
+ cmd3.option(
895
+ "-p, --preview",
896
+ "Publish a preview without replacing the live deployment"
897
+ );
878
898
  cmd3.option(
879
899
  "-g, --github",
880
- "Publish from your linked remote GitHub repository"
900
+ "Publish from the linked GitHub repository instead of local files"
881
901
  );
882
902
  completeFiles(cmd3, [], ["--config"]);
883
903
  cmd3.action(async (...args) => {
884
- const { publishAction } = await import("./chunks/action-R4PGILN4.js");
904
+ const { publishAction } = await import("./chunks/action-6CLEENBI.js");
885
905
  return publishAction(...args);
886
906
  });
887
907
  return cmd3;
@@ -901,7 +921,7 @@ var RollbackCommand = () => {
901
921
  );
902
922
  cmd3.option("-y, --yes", "Skip the confirmation prompt");
903
923
  cmd3.action(async (...args) => {
904
- const { rollbackAction } = await import("./chunks/action-EAUTQ77U.js");
924
+ const { rollbackAction } = await import("./chunks/action-NIZBME45.js");
905
925
  return rollbackAction(...args);
906
926
  });
907
927
  return cmd3;
@@ -911,14 +931,14 @@ var RollbackCommand = () => {
911
931
  import { Command as Command44 } from "commander";
912
932
  var UpgradeCommand2 = () => {
913
933
  const cmd3 = new Command44("upgrade");
914
- cmd3.description("Upgrade scalar project");
934
+ cmd3.description("Upgrade a Scalar Docs configuration");
915
935
  cmd3.argument(
916
936
  "[config]",
917
937
  "Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
918
938
  );
919
939
  completeFiles(cmd3, ["config"], []);
920
940
  cmd3.action(async (...args) => {
921
- const { upgradeAction } = await import("./chunks/action-OJ2NK25F.js");
941
+ const { upgradeAction } = await import("./chunks/action-EBZJS367.js");
922
942
  return upgradeAction(...args);
923
943
  });
924
944
  return cmd3;
@@ -938,7 +958,7 @@ var projectCommands = [
938
958
  UpgradeCommand2
939
959
  ];
940
960
  var projectDomain = new Command45("project");
941
- projectDomain.description("Manage scalar project");
961
+ projectDomain.description("Manage Scalar Docs projects");
942
962
  for (const command of projectCommands) {
943
963
  projectDomain.addCommand(command());
944
964
  }
@@ -950,56 +970,43 @@ import { Command as Command47 } from "commander";
950
970
 
951
971
  // src/domains/readme/generate.ts
952
972
  import { text } from "@clack/prompts";
953
- import as2 from "ansis";
973
+ import as from "ansis";
954
974
  import { Command as Command46 } from "commander";
955
975
 
956
976
  // src/helpers/documentation/index.ts
957
977
  import fs from "node:fs/promises";
958
978
  import path from "node:path";
959
- var generateDocs = (command, depth = 0) => {
960
- if (command._hidden) return [];
961
- const documentation = [];
962
- documentation.push({
963
- title: command.name(),
964
- content: command.helpInformation(),
965
- depth
979
+ var COMMAND_REFERENCE_URL = "https://scalar.com/tools/cli/commands";
980
+ var hasOwnPage = (command) => runnableCommands(command.commands).length >= 2;
981
+ var referenceUrl = (command) => hasOwnPage(command) ? `${COMMAND_REFERENCE_URL}/${command.name}` : `${COMMAND_REFERENCE_URL}/general#${command.name}`;
982
+ var generateCommandTable = (commands) => {
983
+ const rows = commands.filter((command) => command.name !== "help").sort((a, b) => Number(hasOwnPage(b)) - Number(hasOwnPage(a))).map((command) => {
984
+ const prefix = `${command.command} `;
985
+ const subcommands = runnableCommands(command.commands).map((subcommand) => `\`${subcommand.command.slice(prefix.length)}\``).join(", ");
986
+ return `| [\`${command.command}\`](${referenceUrl(command)}) | ${command.description} | ${subcommands} |`;
966
987
  });
967
- const result = command.commands.flatMap((it) => generateDocs(it, depth + 1));
968
- documentation.push(...result);
969
- return documentation;
970
- };
971
- var generateCommandDocumentation = (command) => {
972
- const documentation = generateDocs(command);
973
- const codeBlock = "```";
974
- const documentationContent = [];
975
- for (const docs of documentation) {
976
- if (docs.depth !== 0) {
977
- documentationContent.push(`${"#".repeat(docs.depth + 2)} ${docs.title}`);
978
- }
979
- documentationContent.push(`${codeBlock}
980
- ${docs.content}${codeBlock}`);
981
- documentationContent.push("");
982
- }
983
- return documentationContent.join("\n");
988
+ return [
989
+ "| Command | Description | Subcommands |",
990
+ "| --- | --- | --- |",
991
+ ...rows
992
+ ].join("\n");
984
993
  };
985
994
  var generateDocumentationFile = async (outputPath) => {
986
- const commandDocumentation = generateCommandDocumentation(getProgram());
995
+ const { commands } = buildCliContext(getProgram());
987
996
  const template = await fs.readFile(
988
997
  path.join(import.meta.dirname, "template.md"),
989
- {
990
- encoding: "utf-8"
991
- }
998
+ { encoding: "utf-8" }
992
999
  );
993
1000
  await fs.writeFile(
994
1001
  outputPath,
995
- template.replace("<COMMANDS>", commandDocumentation)
1002
+ template.replace("<COMMANDS>", generateCommandTable(commands))
996
1003
  );
997
1004
  };
998
1005
 
999
1006
  // src/domains/readme/generate.ts
1000
1007
  function GenerateReadmeCommand() {
1001
1008
  const cmd3 = new Command46("generate");
1002
- cmd3.description("Self generate documentation for the cli");
1009
+ cmd3.description("Generate the CLI README from the command tree");
1003
1010
  cmd3.option(
1004
1011
  "-o, --output [file]",
1005
1012
  "Path where the documentation file will be written"
@@ -1019,7 +1026,7 @@ function GenerateReadmeCommand() {
1019
1026
  placeholder: "./README.md"
1020
1027
  });
1021
1028
  if (typeof outputPath2 !== "string") {
1022
- return output.error().message("Operation cancelled by user").exit("error");
1029
+ return output.error().message("Operation cancelled.").exit("error");
1023
1030
  }
1024
1031
  return outputPath2;
1025
1032
  };
@@ -1027,39 +1034,21 @@ function GenerateReadmeCommand() {
1027
1034
  const { executionTimeMs } = await measureTime(
1028
1035
  () => generateDocumentationFile(outputPath)
1029
1036
  );
1030
- output.info().line().title(as2.green("Documentation Generated Successfully! \u{1F389}")).line().message(`\u2728 Documentation has been generated at: ${as2.blue(outputPath)}`).line(
1031
- `\u23F1\uFE0F Generation completed in ${as2.yellow(executionTimeMs.toFixed(2))}ms`
1032
- ).line("").exit("success");
1037
+ output.info().line().title(as.green("CLI documentation generated")).line().message(`Written to ${as.blue(outputPath)}`).line(`Completed (${as.yellow(executionTimeMs.toFixed(2))} ms)`).line("").exit("success");
1033
1038
  });
1034
1039
  return cmd3;
1035
1040
  }
1036
1041
 
1037
1042
  // src/domains/readme/serve.ts
1038
- import fs2 from "node:fs/promises";
1039
- import path2 from "node:path";
1040
- import as3 from "ansis";
1041
- var fileExists = async (filePath) => {
1042
- try {
1043
- await fs2.access(filePath);
1044
- return true;
1045
- } catch {
1046
- return false;
1047
- }
1048
- };
1043
+ import as2 from "ansis";
1044
+ var CLI_DOCS_URL = "https://scalar.com/tools/cli/getting-started";
1049
1045
  function ServeReadmeCommand(cmd3) {
1050
- cmd3.description("Open documentation for the CLI");
1051
- cmd3.action(async () => {
1052
- const docsPath = path2.join(import.meta.dirname, "docs.html");
1053
- if (await fileExists(docsPath) === false) {
1054
- return output.error().title("Documentation not found").message(
1055
- "You can access documentation only by running the bundled version of the CLI."
1056
- ).exit("error");
1057
- }
1058
- const docsUrl = `file://${path2.join(import.meta.dirname, "docs.html")}`;
1059
- openBrowser(docsUrl);
1046
+ cmd3.description("Open CLI documentation in your browser");
1047
+ cmd3.action(() => {
1048
+ openBrowser(CLI_DOCS_URL);
1060
1049
  output.info().message(
1061
- "Documentation is being opened in your default browser. If it does not open automatically, please visit the following URL:"
1062
- ).line(as3.blue(docsUrl)).line().exit("success");
1050
+ "Opening CLI documentation in your default browser. If it does not open, visit:"
1051
+ ).line(as2.blue(CLI_DOCS_URL)).line().exit("success");
1063
1052
  });
1064
1053
  return cmd3;
1065
1054
  }
@@ -1077,17 +1066,20 @@ import { Command as Command53 } from "commander";
1077
1066
  import { Command as Command48 } from "commander";
1078
1067
  var PublishCommand2 = () => {
1079
1068
  const cmd3 = new Command48("publish");
1080
- cmd3.description("Publish an OpenAPI document to the Scalar registry");
1081
- cmd3.argument("[file]", "OpenAPI file to upload");
1069
+ cmd3.description("Publish an OpenAPI description to the Scalar Registry");
1070
+ cmd3.argument("[file]", "API description file path or URL to upload");
1082
1071
  cmd3.option(
1083
1072
  "--slug <slug>",
1084
- "Slug identifier for the registry entry. Defaults to title."
1073
+ "Scalar Registry entry slug (defaults to a slug generated from the title)"
1085
1074
  );
1086
1075
  cmd3.option("--namespace <namespace>", "Scalar team namespace");
1087
- cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
1088
- cmd3.option("--private", "Make API private", false);
1089
- cmd3.option("--no-current", "Do not set as the current version");
1090
- cmd3.option("--force", "Force override an existing version", false);
1076
+ cmd3.option(
1077
+ "--version <version>",
1078
+ "API description version (for example, 0.1.0)"
1079
+ );
1080
+ cmd3.option("--private", "Make the API description private", false);
1081
+ cmd3.option("--no-current", "Keep the existing current version");
1082
+ cmd3.option("--force", "Overwrite an existing version", false);
1091
1083
  cmd3.option("--bundle", "Bundle all external references before uploading");
1092
1084
  cmd3.option(
1093
1085
  "--treeShake",
@@ -1099,12 +1091,12 @@ var PublishCommand2 = () => {
1099
1091
  );
1100
1092
  cmd3.option(
1101
1093
  "--fetchLimit <limit>",
1102
- "Maximum number of concurrent URLs to fetch when bundling the document",
1094
+ "Maximum number of concurrent URL fetches when bundling",
1103
1095
  parseFetchLimit
1104
1096
  );
1105
1097
  completeFiles(cmd3, ["file"], []);
1106
1098
  cmd3.action(async (...args) => {
1107
- const { publishAction } = await import("./chunks/action-HT42NUUX.js");
1099
+ const { publishAction } = await import("./chunks/action-NF5E7JKA.js");
1108
1100
  return publishAction(...args);
1109
1101
  });
1110
1102
  return cmd3;
@@ -1114,11 +1106,11 @@ var PublishCommand2 = () => {
1114
1106
  import { Command as Command49 } from "commander";
1115
1107
  var DeleteCommand = () => {
1116
1108
  const cmd3 = new Command49("delete");
1117
- cmd3.description("Delete a document from scalar registry");
1109
+ cmd3.description("Delete an API description from the Scalar Registry");
1118
1110
  cmd3.argument("[namespace]", "Team namespace");
1119
- cmd3.argument("[slug]", "Managed doc slug");
1111
+ cmd3.argument("[slug]", "API description slug");
1120
1112
  cmd3.action(async (...args) => {
1121
- const { deleteAction } = await import("./chunks/action-FBRY5JKU.js");
1113
+ const { deleteAction } = await import("./chunks/action-XVNRZ5VX.js");
1122
1114
  return deleteAction(...args);
1123
1115
  });
1124
1116
  return cmd3;
@@ -1128,17 +1120,22 @@ var DeleteCommand = () => {
1128
1120
  import { Command as Command50, Option as Option8 } from "commander";
1129
1121
  var GetCommand2 = () => {
1130
1122
  const cmd3 = new Command50("get");
1131
- cmd3.description("Get a document version from scalar registry");
1123
+ cmd3.description(
1124
+ "Download an API description version from the Scalar Registry"
1125
+ );
1132
1126
  cmd3.argument("[namespace]", "Team namespace");
1133
- cmd3.argument("[slug]", "Managed doc slug");
1134
- cmd3.option("--version <version>", "Document version (defaults to latest)");
1127
+ cmd3.argument("[slug]", "API description slug");
1128
+ cmd3.option(
1129
+ "--version <version>",
1130
+ "API description version (defaults to latest)"
1131
+ );
1135
1132
  cmd3.addOption(
1136
- new Option8("--format <format>", "Output format (json or yaml)").choices([...DOCUMENT_FORMATS]).default("json")
1133
+ new Option8("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
1137
1134
  );
1138
1135
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
1139
1136
  completeFiles(cmd3, [], ["--output"]);
1140
1137
  cmd3.action(async (...args) => {
1141
- const { getAction } = await import("./chunks/action-5N3P43MD.js");
1138
+ const { getAction } = await import("./chunks/action-YWQ2OKS3.js");
1142
1139
  return getAction(...args);
1143
1140
  });
1144
1141
  return cmd3;
@@ -1148,11 +1145,11 @@ var GetCommand2 = () => {
1148
1145
  import { Command as Command51 } from "commander";
1149
1146
  var ListCommand3 = () => {
1150
1147
  const cmd3 = new Command51("list");
1151
- cmd3.description("List all registry APIs for a team namespace");
1148
+ cmd3.description("List Scalar Registry API descriptions in a team namespace");
1152
1149
  cmd3.option("--namespace <namespace>", "Team namespace");
1153
- cmd3.option("--json", "Output registry API metadata as JSON");
1150
+ cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
1154
1151
  cmd3.action(async (...args) => {
1155
- const { listAction } = await import("./chunks/action-YSVTZVKV.js");
1152
+ const { listAction } = await import("./chunks/action-IG3BK2LF.js");
1156
1153
  return listAction(...args);
1157
1154
  });
1158
1155
  return cmd3;
@@ -1162,13 +1159,13 @@ var ListCommand3 = () => {
1162
1159
  import { Command as Command52 } from "commander";
1163
1160
  var UpdateCommand = () => {
1164
1161
  const cmd3 = new Command52("update");
1165
- cmd3.description("Update document metadata on scalar registry");
1166
- cmd3.argument("[namespace]", "namespace of document you want to update");
1167
- cmd3.argument("[slug]", "slug of document you want to update");
1168
- cmd3.option("--title <title>", "Document title");
1169
- cmd3.option("--description <description>", "Document description");
1162
+ cmd3.description("Update API description metadata in the Scalar Registry");
1163
+ cmd3.argument("[namespace]", "Team namespace");
1164
+ cmd3.argument("[slug]", "API description slug");
1165
+ cmd3.option("--title <title>", "API description title");
1166
+ cmd3.option("--description <description>", "API description summary");
1170
1167
  cmd3.action(async (...args) => {
1171
- const { updateAction } = await import("./chunks/action-657A4K2D.js");
1168
+ const { updateAction } = await import("./chunks/action-VGFAIFYE.js");
1172
1169
  return updateAction(...args);
1173
1170
  });
1174
1171
  return cmd3;
@@ -1183,7 +1180,7 @@ var registryCommands = [
1183
1180
  GetCommand2
1184
1181
  ];
1185
1182
  var registryDomain = new Command53("registry");
1186
- registryDomain.description("Manage your scalar registry");
1183
+ registryDomain.description("Manage API descriptions in the Scalar Registry");
1187
1184
  registryCommands.forEach((command) => registryDomain.addCommand(command()));
1188
1185
  var registry_default = registryDomain;
1189
1186
 
@@ -1194,10 +1191,10 @@ import { Command as Command57 } from "commander";
1194
1191
  import { Command as Command54 } from "commander";
1195
1192
  var GetCommand3 = () => {
1196
1193
  const cmd3 = new Command54("get");
1197
- cmd3.description("Get the current team and its namespaces");
1194
+ cmd3.description("Show the current team and its namespaces");
1198
1195
  cmd3.option("--json", "Output the current team as JSON");
1199
1196
  cmd3.action(async (...args) => {
1200
- const { getAction } = await import("./chunks/action-4GZI2M5B.js");
1197
+ const { getAction } = await import("./chunks/action-36LZ6XXE.js");
1201
1198
  return getAction(...args);
1202
1199
  });
1203
1200
  return cmd3;
@@ -1207,10 +1204,10 @@ var GetCommand3 = () => {
1207
1204
  import { Command as Command55 } from "commander";
1208
1205
  var ListCommand4 = () => {
1209
1206
  const cmd3 = new Command55("list");
1210
- cmd3.description("List all teams current user is part of");
1207
+ cmd3.description("List your Scalar teams");
1211
1208
  cmd3.option("--json", "Output teams as JSON");
1212
1209
  cmd3.action(async (...args) => {
1213
- const { listAction } = await import("./chunks/action-LYCNT3KA.js");
1210
+ const { listAction } = await import("./chunks/action-WCU5O2VT.js");
1214
1211
  return listAction(...args);
1215
1212
  });
1216
1213
  return cmd3;
@@ -1220,10 +1217,10 @@ var ListCommand4 = () => {
1220
1217
  import { Command as Command56 } from "commander";
1221
1218
  var SetCommand = () => {
1222
1219
  const cmd3 = new Command56("set");
1223
- cmd3.description("Set current active team for the user");
1224
- cmd3.option("--team <team>", "Team uid");
1220
+ cmd3.description("Select the current team");
1221
+ cmd3.option("--team <team>", "Team ID");
1225
1222
  cmd3.action(async (...args) => {
1226
- const { setAction } = await import("./chunks/action-X7BA7PQQ.js");
1223
+ const { setAction } = await import("./chunks/action-AC5ENU6Z.js");
1227
1224
  return setAction(...args);
1228
1225
  });
1229
1226
  return cmd3;
@@ -1232,7 +1229,7 @@ var SetCommand = () => {
1232
1229
  // src/domains/team/index.ts
1233
1230
  var teamCommands = [ListCommand4, GetCommand3, SetCommand];
1234
1231
  var teamDomain = new Command57("team");
1235
- teamDomain.description("Manage user teams");
1232
+ teamDomain.description("List and switch between your Scalar teams");
1236
1233
  teamCommands.forEach((command) => {
1237
1234
  teamDomain.addCommand(command());
1238
1235
  });
@@ -1240,11 +1237,11 @@ var team_default = teamDomain;
1240
1237
 
1241
1238
  // src/domains/upgrade/index.ts
1242
1239
  import { execSync } from "node:child_process";
1243
- import as5 from "ansis";
1240
+ import as4 from "ansis";
1244
1241
  import { Command as Command58 } from "commander";
1245
1242
 
1246
1243
  // src/helpers/upgrade.ts
1247
- import as4 from "ansis";
1244
+ import as3 from "ansis";
1248
1245
  import semver from "semver";
1249
1246
  var packageJsonSchema = external_exports.object({
1250
1247
  version: external_exports.string()
@@ -1284,12 +1281,12 @@ async function checkUpgrade(stream = "stdout") {
1284
1281
  const emitOutput = () => {
1285
1282
  if (stream === "stderr") {
1286
1283
  process.stderr.write(
1287
- "New version available! Run `scalar upgrade` to install the latest version\n"
1284
+ "A new Scalar CLI version is available. Run `scalar upgrade` to install the latest version.\n"
1288
1285
  );
1289
1286
  return;
1290
1287
  }
1291
1288
  return output.info().message(
1292
- `New version available! Run ${as4.cyan("`scalar upgrade`")} to install the latest version`
1289
+ `A new Scalar CLI version is available. Run ${as3.cyan("`scalar upgrade`")} to install the latest version.`
1293
1290
  ).print();
1294
1291
  };
1295
1292
  const now = Date.now();
@@ -1317,29 +1314,29 @@ async function checkUpgrade(stream = "stdout") {
1317
1314
 
1318
1315
  // src/domains/upgrade/index.ts
1319
1316
  var cmd2 = new Command58("upgrade");
1320
- cmd2.description("Upgrade current version of your cli");
1317
+ cmd2.description("Upgrade the Scalar CLI to the latest version");
1321
1318
  cmd2.action(async () => {
1322
1319
  if (process.env.SCALAR_CLI_DISTRIBUTION === "portable") {
1323
1320
  output.info().message(
1324
- "To upgrade this portable installation, download and extract the newer Scalar archive, then replace the installation directory."
1321
+ "To upgrade an installer-managed Scalar CLI, run the installer again. For a manually extracted installation, download and extract the newer archive and replace the installation directory."
1325
1322
  ).print();
1326
1323
  return;
1327
1324
  }
1328
1325
  const upgradeStatus = await getUpgradeInformation();
1329
1326
  if (!upgradeStatus.upgrade) {
1330
- output.info().message("You are already up to date").print();
1327
+ output.info().message("Scalar CLI is already up to date.").print();
1331
1328
  return;
1332
1329
  }
1333
1330
  output.info().message(
1334
- `Upgrading from ${upgradeStatus.currentVersion} to ${upgradeStatus.latestVersion}...`
1331
+ `Upgrading from ${upgradeStatus.currentVersion} to ${upgradeStatus.latestVersion}\u2026`
1335
1332
  ).print();
1336
1333
  try {
1337
1334
  execSync(`npm install -g ${upgradeStatus.name}@latest`, {
1338
1335
  stdio: "inherit"
1339
1336
  });
1340
- output.info().message("Successfully upgraded to the latest version").print();
1337
+ output.info().message("Scalar CLI upgraded to the latest version.").print();
1341
1338
  } catch {
1342
- output.error().title("Upgrade failed").message("Failed to upgrade the CLI. Please try running:").message(as5.cyan(`npm install -g ${upgradeStatus.name}@latest`)).exit("error");
1339
+ output.error().title("Upgrade failed").message("Could not upgrade Scalar CLI. Run:").message(as4.cyan(`npm install -g ${upgradeStatus.name}@latest`)).exit("error");
1343
1340
  }
1344
1341
  });
1345
1342
  var upgrade_default = cmd2;
@@ -1364,10 +1361,18 @@ var domains_default = domains;
1364
1361
  // src/program.ts
1365
1362
  var getProgram = () => {
1366
1363
  const program2 = new Command59();
1367
- program2.enablePositionalOptions().name(Object.keys(bin)[0]).description("CLI to work with your OpenAPI files").version(version, "-v, --version");
1364
+ program2.enablePositionalOptions().name(Object.keys(bin)[0]).description(
1365
+ "Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar"
1366
+ ).version(version, "-v, --version", "Show the version number");
1368
1367
  program2.showHelpAfterError();
1369
1368
  domains_default.forEach((domain) => program2.addCommand(domain));
1370
1369
  program2.addCommand(createCompletionQueryCommand(), { hidden: true });
1370
+ const configureHelpCopy = (command) => {
1371
+ command.helpOption("-h, --help", "Show help for this command");
1372
+ command.createHelp().visibleCommands(command).find((child) => child.name() === "help")?.description("Show help for a command");
1373
+ for (const child of command.commands) configureHelpCopy(child);
1374
+ };
1375
+ configureHelpCopy(program2);
1371
1376
  return program2;
1372
1377
  };
1373
1378
 
@@ -1382,10 +1387,11 @@ var program = getProgram();
1382
1387
  if (process.argv.length === 2) {
1383
1388
  program.help();
1384
1389
  }
1385
- if (process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.argv[2] !== "completion" && process.argv[2] !== "__complete" && !process.argv.includes("--json") && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
1386
- checkUpgrade(
1387
- process.argv[2] === "document" && process.argv[3] === "lint" ? "stderr" : "stdout"
1388
- ).catch(() => {
1389
- });
1390
- }
1390
+ program.hook("preAction", (_program, command) => {
1391
+ if (process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.argv[2] !== "completion" && process.argv[2] !== "__complete" && !process.argv.includes("--json") && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
1392
+ const usesDocumentStdout = command.parent?.name() === "document" && (command.name() === "lint" || command.name() === "bundle" && command.opts().output === "-");
1393
+ checkUpgrade(usesDocumentStdout ? "stderr" : "stdout").catch(() => {
1394
+ });
1395
+ }
1396
+ });
1391
1397
  program.parse();