feat(cli): add project access-summary subcommand#15813
Conversation
- Calls GET /v1/projects/{id}/members/summary for linked or named project
- Table output by default; --format json for machine-readable output
- Alias: project summary; telemetry for access-summary subcommand
- Unit tests with mock API route
Made-with: Cursor
🦋 Changeset detectedLatest commit: 5dd2553 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 |
|
Low Risk — New CLI subcommand with tests, telemetry, and error handling — additive feature, no auth/schema/billing changes.
Assessed at 5dd2553. |
📦 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-eaoyyjlv8.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-eaoyyjlv8.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 |
Reflect new `vercel project access-summary` in column-width help output. Made-with: Cursor
Resolve project subcommand conflicts: keep access-summary from branch with main's members and access-groups. Refresh help snapshots. Made-with: Cursor
Match project members/access-groups: wrap resolution and fetch in try/catch, call exitWithNonInteractiveError with variant access-summary, use forReadOnlyCommand on getProjectByCwdOrLink, and outputAgentError for parse failures. Extend agent-output with ProjectSubcommandNonInteractiveVariant. Add unit test for --non-interactive API failure. Made-with: Cursor
The dev --help snapshot depended on NO_COLOR in the environment: when set, Output.print runs removeEmoji().trimStart() on help text and strips the leading newline/indent from buildHelpOutput. CI often omits NO_COLOR, so the snapshot failed there. Pass --no-color explicitly so behavior matches the committed snapshot everywhere. Made-with: Cursor
…variant - Match dev --help stderr with trimStart() so snapshots stay stable whether NO_COLOR triggers Output.removeEmoji().trimStart() or not (no --no-color argv). - Drop exported ProjectSubcommandNonInteractiveVariant; use an inline union. 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 ## [email protected] ### Minor Changes - Add `vercel tokens` subcommands (`ls`, `add`, `rm`) for auth token API parity with the dashboard. ([#15812](#15812)) - Add `vercel project access-summary` subcommand to list member counts by role for a project. ([#15813](#15813)) - Add `vercel project members` and `vercel project access-groups` commands, and fix `vercel teams members` to fetch all pages from the paginated team members API. ([#15786](#15786)) ### Patch Changes - Add `--id` flag to `vercel build` and `vercel env pull` to fetch deployment-scoped environment variables ([#15805](#15805)) - Updated dependencies \[]: - @vercel/[email protected] ## @vercel/[email protected] ### Minor Changes - Add Mastra framework preset ([#15076](#15076)) ## @vercel/[email protected] ### Patch Changes - Updated dependencies \[[`d034d90dcf78316ddacdcce8fd51329fb7eefe82`](d034d90)]: - @vercel/[email protected] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
vercel project access-summary [name](aliasproject summary) callingGET /v1/projects/{id}/members/summary.projectsubcommands).--format jsonprints the API payload to stdout.Test plan
pnpm --dir packages/cli run vitest-run test/unit/commands/project/access-summary.test.tsMade with Cursor