@scalar/cli 2.14.0 → 2.15.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 (64) hide show
  1. package/README.md +33 -1
  2. package/chunks/{action-XA4MEYFP.js → action-2UZWKMSJ.js} +6 -6
  3. package/chunks/{action-EPGLU5E3.js → action-3QQSKGM3.js} +6 -6
  4. package/chunks/{action-VS22CPVB.js → action-3W4IC7QL.js} +6 -6
  5. package/chunks/{action-MJI3TI3W.js → action-777R7LOG.js} +10 -9
  6. package/chunks/{action-APTGKF4W.js → action-7LK4RUDP.js} +11 -10
  7. package/chunks/{action-RRQNVUFW.js → action-B2WWTOF6.js} +6 -6
  8. package/chunks/{action-FOITEQNQ.js → action-ENDUKGWS.js} +6 -6
  9. package/chunks/{action-OP5DCAHN.js → action-G2WBTXOK.js} +3 -3
  10. package/chunks/{action-Y4MKBDRC.js → action-HDT7EO7W.js} +8 -8
  11. package/chunks/{action-SCOJRZKD.js → action-HOCCP353.js} +2 -2
  12. package/chunks/{action-FLX3ESH7.js → action-IU2AVNOW.js} +11 -10
  13. package/chunks/{action-DJXZWPL7.js → action-IUAYC2SC.js} +1 -1
  14. package/chunks/{action-VEP7LZPN.js → action-JNH4DCZX.js} +4 -4
  15. package/chunks/{action-4HYLZRYW.js → action-LD5B5QQ4.js} +14 -13
  16. package/chunks/{action-EYOZ457H.js → action-MBAAYXKK.js} +4 -4
  17. package/chunks/{action-GOFCT7XK.js → action-MJHLG7AE.js} +14 -13
  18. package/chunks/{action-4MJXPSQU.js → action-NZJ4Z64U.js} +6 -6
  19. package/chunks/{action-VY3DRAO4.js → action-P2RPH5R2.js} +3 -3
  20. package/chunks/{action-BL5PWLFV.js → action-PDSSIW2A.js} +9 -9
  21. package/chunks/{action-C7CNI7TP.js → action-PNSWHIHC.js} +5 -5
  22. package/chunks/{action-VW2POHCL.js → action-QJMRAFOF.js} +7 -6
  23. package/chunks/{action-ZOU7EPX5.js → action-T7SD3ETN.js} +6 -6
  24. package/chunks/{action-VAJSWBMD.js → action-TY4BZEMN.js} +6 -6
  25. package/chunks/{action-P2QEJUBK.js → action-ZTLOQZTT.js} +8 -7
  26. package/chunks/actions-D5OHPBWC.js +327 -0
  27. package/chunks/{actions-PBYTDEMH.js → actions-RI42JY6H.js} +27 -6
  28. package/chunks/{asyncapi-KCA6ZH3Q.js → asyncapi-YBTWMTW6.js} +3 -3
  29. package/chunks/{build.action-54FHG7VL.js → build.action-4YDNDBXC.js} +8 -8
  30. package/chunks/{chunk-AAWPGVMG.js → chunk-42MIV6WF.js} +1 -1
  31. package/chunks/{chunk-GO3TSREI.js → chunk-7FGJIUDN.js} +3 -3
  32. package/chunks/{chunk-WKMOUBQJ.js → chunk-ANP5XF26.js} +1257 -1019
  33. package/chunks/{chunk-H5AMMMQ3.js → chunk-BMQFEKHA.js} +113 -8
  34. package/chunks/{chunk-VJ7FHLN4.js → chunk-DLYMDGFW.js} +1 -1
  35. package/chunks/{chunk-3CRO6NY4.js → chunk-DWJMPHLY.js} +1 -1
  36. package/chunks/{chunk-S3U2VMVL.js → chunk-ERZ3HYB5.js} +0 -94
  37. package/chunks/{chunk-DTZBE4ZX.js → chunk-G5WWW7VD.js} +2 -2
  38. package/chunks/{chunk-QTMJ3VUZ.js → chunk-GOKHFNB2.js} +2 -2
  39. package/chunks/{chunk-WZUA7IAV.js → chunk-IPWJEGPD.js} +2 -2
  40. package/chunks/{chunk-2SBHCZPG.js → chunk-KOLEQNLG.js} +1 -1
  41. package/chunks/{chunk-WZSU45SV.js → chunk-MGGMCT77.js} +1 -1
  42. package/chunks/{chunk-KZSM2SUL.js → chunk-QXOUDBFK.js} +2 -2
  43. package/chunks/{chunk-7ZDC34NA.js → chunk-SHRUJFQI.js} +3 -1
  44. package/chunks/{chunk-KKHTS43A.js → chunk-T76K7QNX.js} +2 -2
  45. package/chunks/{chunk-KXMZXTLK.js → chunk-TR5U7G7T.js} +2 -1
  46. package/chunks/{chunk-42YF4H6W.js → chunk-TW2UASEW.js} +1 -1
  47. package/chunks/chunk-VBHPHAGS.js +114 -0
  48. package/chunks/{chunk-PRW5TKYS.js → chunk-Y6GKZ2FM.js} +1 -1
  49. package/chunks/{chunk-F5Q7FJRG.js → chunk-Z6HOHGUJ.js} +17 -0
  50. package/chunks/{create.action-NB3YYZ7K.js → create.action-52K3XAYN.js} +8 -8
  51. package/chunks/{delete.action-5BT3TXVZ.js → delete.action-3NMOQPIR.js} +8 -8
  52. package/chunks/{delete.action-DWMQYW62.js → delete.action-47LPLTOX.js} +8 -8
  53. package/chunks/{diff.action-ENOOLRRB.js → diff.action-5TLC2EHT.js} +8 -7
  54. package/chunks/{get.action-55JDC2MJ.js → get.action-BCMLG7C7.js} +8 -7
  55. package/chunks/{get.action-2ASGSZW3.js → get.action-TOZ474GO.js} +8 -8
  56. package/chunks/{list.action-NCG6Q6S2.js → list.action-6ZWEENT6.js} +9 -9
  57. package/chunks/{list.action-6QBQFGVR.js → list.action-CMAA5KTY.js} +8 -8
  58. package/chunks/{publish.action-4Y5EXBOY.js → publish.action-U3VIU5LZ.js} +11 -10
  59. package/chunks/{update.action-6OE54B5O.js → update.action-QZOP25ME.js} +8 -8
  60. package/chunks/{update.action-4V6MQMWG.js → update.action-UQHZYVTP.js} +8 -8
  61. package/index.js +175 -114
  62. package/package.json +1 -1
  63. package/skills/scalar-cli/SKILL.md +8 -1
  64. package/template.md +31 -0
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "engines": {
6
6
  "node": ">=24"
7
7
  },
8
- "version": "2.14.0",
8
+ "version": "2.15.0",
9
9
  "keywords": [
10
10
  "scalar",
11
11
  "openapi",
@@ -5,7 +5,7 @@ description: "Operate the Scalar CLI (`scalar`, or `npx @scalar/cli`) to validat
5
5
 
6
6
  # Scalar CLI
7
7
 
8
- Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar (`@scalar/cli` 2.14.0).
8
+ Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar (`@scalar/cli` 2.15.0).
9
9
 
10
10
  ## Operating notes
11
11
 
@@ -40,6 +40,8 @@ Run `scalar context` for the arguments, options, defaults, and choices of each c
40
40
  - `scalar access-group delete [options] <slug>`: Delete an access group and remove its project assignments
41
41
  - `scalar access-group domain add [options] <slug> <domain>`: Add an exact email domain to an access group
42
42
  - `scalar access-group domain remove [options] <slug> <domain>`: Remove an exact email domain from an access group
43
+ - `scalar access-group email add [options] <slug> <email>`: Add an email address to an access group
44
+ - `scalar access-group email remove [options] <slug> <email>`: Remove an email address from an access group
43
45
  - `scalar document bundle [options] [file|url]`: Bundle external references into a single API description
44
46
  - `scalar document split [options] [file|url]`: Split an OpenAPI or AsyncAPI description into referenced JSON files
45
47
  - `scalar document join [options] <files...>`: Join API descriptions of the same format into one description
@@ -64,6 +66,11 @@ Run `scalar context` for the arguments, options, defaults, and choices of each c
64
66
  - `scalar project deployments list [options]`: List production deployments for a project
65
67
  - `scalar project deployments get [options] <build-id>`: Inspect an existing build in the selected team without resubmitting
66
68
  - `scalar project upgrade [options] [config]`: Upgrade a Scalar Docs configuration
69
+ - `scalar mcp list [options]`: List MCP servers in the current team
70
+ - `scalar mcp get [options] <server-id>`: Get an MCP server and its environment versions
71
+ - `scalar mcp create [options]`: Create an MCP server from an existing Registry API or Docs project
72
+ - `scalar mcp update [options] <server-id>`: Change an MCP server name or slug
73
+ - `scalar mcp delete [options] <server-id>`: Delete an MCP server and stop its endpoints
67
74
  - `scalar registry publish [options] [file]`: Publish an OpenAPI description to the Scalar Registry
68
75
  - `scalar registry update [options] [namespace] [slug]`: Update API description metadata in the Scalar Registry
69
76
  - `scalar registry delete [options] [namespace] [slug]`: Delete an API description from the Scalar Registry
package/template.md CHANGED
@@ -102,6 +102,25 @@ scalar schema diff acme/widget@latest ./widget.json --check --quiet --ignore /de
102
102
 
103
103
  Each side is a published schema (`namespace/slug@version`, where the version defaults to `latest`), a file, or a URL. Both sides are parsed and compared structurally, so formatting, key order, and JSON versus YAML never count as changes. The order of items in an array, including `required`, `enum`, and `type`, does count. Changes are listed by JSON Pointer into the documents as written. An existing path always counts as a file: prefix `./` to force a file, or add `@latest` to force the Scalar Registry. `--ignore <pointer...>` skips changes at or under a JSON Pointer, so `/properties/legacy` also skips `/properties/legacy/type` but not `/properties/legacyId`. A change above the pointer, such as all of `/properties` being added, is still reported in full. Put it after the two schemas.
104
104
 
105
+ ### Manage Scalar-hosted MCP servers
106
+
107
+ ```sh
108
+ scalar mcp list --json --no-input
109
+ scalar mcp create --name Petstore --api acme/petstore@1.0.0 --json --no-input
110
+ scalar mcp create --name Docs --project <project-uid> --json --no-input
111
+ scalar mcp get <server-id> --json --no-input
112
+ scalar mcp update <server-id> --name 'Public API' --no-input
113
+ scalar mcp delete <server-id> --yes --no-input
114
+ ```
115
+
116
+ Use server UUIDs from `mcp list` for `get`, `update`, and `delete`. Creation accepts exactly one existing Scalar Registry API (`namespace/slug[@version]`) or Scalar Docs project UID (`project list --json`). An API reference without a version selects its current version; the selected version is pinned. Docs projects track their active publish. Source content must already be available to the MCP service. API tool exposure follows the API description and the server uses the same default additional headers as servers created in Scalar Dashboard.
117
+
118
+ Creation reports a created server, without waiting for endpoint readiness. `mcp get` reports each environment's served version, or `null` when none is served; a version is not a health check. After an interrupted create, inspect `mcp list` before repeating the command. Changing a slug changes its address. Deletion stops the server's endpoints; `--yes` explicitly confirms deletion and is required in JSON or noninteractive mode.
119
+
120
+ JSON server metadata contains `id` (server UUID), `uid` (Core record UID), `name`, `namespace`, `slug`, and `url`. `list` returns an array of that metadata; `update` returns one object. `create` adds `status: "created"`. `get` adds an `environments` array with `name`, `version`, `isPrivate`, and `url`. `delete` returns `{ "id": "…", "uid": "…", "deleted": true }`. Tool configuration and credentials are excluded. Errors use stderr and a nonzero exit code.
121
+
122
+ Addresses use `https://mcp.scalar.com` by default. Set `MCP_URL` to the MCP host for a nonproduction deployment, alongside the CLI's `BASE_URL` service setting. These commands manage hosted servers; they do not start a local MCP runtime.
123
+
105
124
  ## Install
106
125
 
107
126
  Standalone binary, no Node.js required:
@@ -407,3 +426,15 @@ are not mutation-result streams and do not gain `--json` from this feature.
407
426
  URL input for `document format`, `upgrade`, `markdown`, `mock`, `serve`, `postman`, and `share`, plus Registry and schema publish input, has a 10-second download deadline. `registry get` and `schema get` use the same deadline. It includes reading the response body, but is not a total command runtime limit. Downloads are not automatically retried.
408
427
 
409
428
  File and download failures report the input, a known cause when available, and a recovery step on stderr, with exit code 1. Diagnostic URLs omit credentials, query strings, and fragments. Remote error bodies are not echoed because they may contain credentials; HTTP status remains available. Successful document output is unchanged.
429
+
430
+ ### Access-group emails
431
+
432
+ ```sh
433
+ scalar access-group email add partners alex@example.com
434
+ scalar access-group email remove partners alex@example.com --json
435
+ scalar access-group get partners --json
436
+ ```
437
+
438
+ These commands manage individual addresses in the current team's access group by slug. Addresses are lowercased; repeated adds and removals are safe to retry. Both mutations support `--json`, print `null` on success in JSON mode, and require no confirmation prompt. Invalid addresses and API failures exit nonzero. If a request times out, inspect the group with `get --json` to check whether the change completed.
439
+
440
+ No invitation is sent and no team membership is created. Removing an email preserves independent grants from domains, other groups, and team membership.