Conversation
🦋 Changeset detectedLatest commit: 9992ee2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
vercel api <tag> <operationId> as an alternative to raw pathsvercel <tag> <operationId>
|
Low Risk — New CLI feature gated behind VERCEL_AUTO_API env var — no changes to existing behavior without opt-in.
Assessed at 9992ee2. |
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-6bo0t97vs.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-6bo0t97vs.vercel.sh/tarballs/vercel.tgz"
}
}
}Python Runtime WheelA Python Workers WheelA |
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 1 (3%)
Unaffected packages - 39 (98%)
Results
This comment is automatically generated based on the affected testing strategy |
vercel <tag> <operationId> - Wire tryOpenApiFallback into teams command default case - Add resolveOpenApiTagForTeamsCli tag resolver - Download openapi.vercel.sh as test fixture - Add 30 unit tests covering x-vercel-cli metadata, displayColumns extraction, parseArrayColumns [] syntax, renderCard/renderTable, and tag+operationId resolution against the real spec Made-with: Cursor
Integrate both the OpenAPI fallback and the autoInstallVercelPlugin post-switch logic from main. Made-with: Cursor
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## vercel@51.6.0 ### Minor Changes - Add `vercel connex list` command ([#16018](#16018)) ### Patch Changes - Add OpenAPI-driven subcommand fallback behind `VERCEL_AUTO_API=1`. ([#15989](#15989)) When the env var is set, unrecognized CLI tokens are matched against OpenAPI tags and operation IDs from `openapi.vercel.sh`. This enables `vercel <tag> <operationId>` (e.g. `vercel user getAuthUser`) at the top level, and per-command fallthrough (e.g. `vercel projects getProject`) when a token doesn't match a native subcommand. When `x-vercel-cli.displayColumns` is present in the OpenAPI response schema, results render as a card (single object) or table (array) instead of raw JSON. - [experimental-services] add new job service type support ([#15944](#15944)) - Add naming and formatting utilities for OpenAPI CLI integration. ([#16010](#16010)) Introduces `foldNamingStyle` for case-insensitive matching across camelCase/kebab-case/snake_case, `humanReadableColumnLabel` for converting schema property paths to readable headers, and `inferCliSubcommandAliases` for auto-generating CLI aliases from HTTP methods. - Updated dependencies \[[`44d519b8660185754d8280517adbe0ab7268f540`](44d519b), [`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/detect-agent@1.2.3 - @vercel/build-utils@13.17.2 - @vercel/python@6.33.3 - @vercel/backends@0.0.64 - @vercel/elysia@0.1.67 - @vercel/express@0.1.77 - @vercel/fastify@0.1.70 - @vercel/go@3.5.0 - @vercel/h3@0.1.76 - @vercel/hono@0.2.70 - @vercel/hydrogen@1.3.6 - @vercel/koa@0.1.50 - @vercel/nestjs@0.2.71 - @vercel/next@4.16.8 - @vercel/node@5.7.9 - @vercel/redwood@2.4.12 - @vercel/remix-builder@5.7.2 - @vercel/ruby@2.3.2 - @vercel/rust@1.1.1 - @vercel/static-build@2.9.17 ## @vercel/backends@0.0.64 ### Patch Changes - Updated dependencies \[[`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/build-utils@13.17.2 ## @vercel/build-utils@13.17.2 ### Patch Changes - [experimental-services] add new job service type support ([#15944](#15944)) ## @vercel/cervel@0.0.51 ### Patch Changes - Updated dependencies \[]: - @vercel/backends@0.0.64 ## @vercel/client@17.3.6 ### Patch Changes - Updated dependencies \[[`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/build-utils@13.17.2 ## @vercel/config@0.2.1 ### Patch Changes - [experimental-services] add new job service type support ([#15944](#15944)) ## @vercel/detect-agent@1.2.3 ### Patch Changes - Add v0 to detect-agent supported agents ([#16016](#16016)) ## @vercel/elysia@0.1.67 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/express@0.1.77 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 - @vercel/cervel@0.0.51 ## @vercel/fastify@0.1.70 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/fs-detectors@5.18.2 ### Patch Changes - [experimental-services] add new job service type support ([#15944](#15944)) - Updated dependencies \[[`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/build-utils@13.17.2 ## @vercel/gatsby-plugin-vercel-builder@2.1.17 ### Patch Changes - Updated dependencies \[[`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/build-utils@13.17.2 ## @vercel/h3@0.1.76 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/hono@0.2.70 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/koa@0.1.50 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/nestjs@0.2.71 ### Patch Changes - Updated dependencies \[]: - @vercel/node@5.7.9 ## @vercel/node@5.7.9 ### Patch Changes - Updated dependencies \[[`2a6344e205910dafc05cb74a80f98165d95322d7`](2a6344e)]: - @vercel/build-utils@13.17.2 ## @vercel/python@6.33.3 ### Patch Changes - [experimental-services] add new job service type support ([#15944](#15944)) ## @vercel/static-build@2.9.17 ### Patch Changes - Updated dependencies \[]: - @vercel/gatsby-plugin-vercel-builder@2.1.17 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
Adds OpenAPI-driven subcommand resolution behind the
VERCEL_AUTO_API=1environment variable. When enabled:openapi.vercel.sh, enablingvercel <tag> <operationId>(e.g.vercel user getAuthUser,vercel teams list).vercel projectsfall through to OpenAPI tag/operation matching when a token doesn't match a native subcommand (e.g.vercel projects getProject).x-vercel-climetadata — operations opt in viax-vercel-cli.supportedSubcommands: truein the OpenAPI spec. Aliases (x-vercel-cli.aliases), positional arguments (x-vercel-cli.kind: 'argument'), and response formatting (x-vercel-cli.displayColumns) are all driven by the spec.displayColumnsis present in the response schema, results render as a card (single object) or table (array) instead of raw JSON.vercel apisubcommand itself is unchanged — it continues to handle direct endpoint paths and interactive mode only.New files
commands/api/display-columns.ts— card/table renderers driven bydisplayColumnsdot-notation pathscommands/api/operation-request-builder.ts— builds API requests from OpenAPI operation specs with interactive promptingutil/openapi/matches-cli-api-tag.ts— checks if a string matches an OpenAPI tagutil/openapi/resolve-by-tag-operation.ts— resolves tag + operationId to an endpointutil/openapi/resolve-subcommand-with-openapi.ts— merges native subcommands with OpenAPI fallbackutil/openapi/try-openapi-fallback.ts— reusable fallback entry point used by top-level and per-command routingTest plan
matches-cli-api-tag,resolve-by-tag-operation,resolve-subcommand-with-openapi,operation-request-builderclient._fetchteamId preservationVERCEL_AUTO_API=1 vercel user getAuthUserrenders card with displayColumnsVERCEL_AUTO_API=1 vercel teams listrenders tableVERCEL_AUTO_API=1 vercel teams get <teamId>renders cardvercel user getAuthUser(without env var) falls through to normal behaviorvercel projects liststill works as native subcommand