Skip to content

feat(cli): add project access-summary subcommand#15813

Merged
brookemosby merged 13 commits intomainfrom
brooke/cli-parity-project-access-summary
Apr 3, 2026
Merged

feat(cli): add project access-summary subcommand#15813
brookemosby merged 13 commits intomainfrom
brooke/cli-parity-project-access-summary

Conversation

@brookemosby
Copy link
Copy Markdown
Contributor

Summary

  • New vercel project access-summary [name] (alias project summary) calling GET /v1/projects/{id}/members/summary.
  • Resolves the project via link or optional name (same pattern as other project subcommands).
  • Human-readable table by default; --format json prints the API payload to stdout.
  • Note: the API may return 401/403 for teams without the relevant access-groups entitlement; the route is public in OpenAPI.

Test plan

  • pnpm --dir packages/cli run vitest-run test/unit/commands/project/access-summary.test.ts

Made with Cursor

- 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
@brookemosby brookemosby requested review from a team as code owners April 1, 2026 21:00
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 5dd2553

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Minor

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
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 1, 2026

Low Risk — New CLI subcommand with tests, telemetry, and error handling — additive feature, no auth/schema/billing changes.

  • .changeset/cli-project-access-summary.md: new changeset for minor version bump
  • packages/cli/src/commands/project/access-summary.ts: new subcommand fetching /v1/projects/{id}/members/summary API
  • packages/cli/src/util/agent-output.ts: extended variant type to include 'access-summary' for error handling

Assessed at 5dd2553.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-eaoyyjlv8.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-eaoyyjlv8.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

Python Runtime Wheel

A vercel-runtime wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_RUNTIME_PYTHON="vercel-runtime @ https://vercel-eaoyyjlv8.vercel.sh/tarballs/vercel_runtime-0.13.0.dev1775167240+bf90e40-py3-none-any.whl"

Python Workers Wheel

A vercel-workers wheel was also built for this PR.
To use in your Python project builds, also set this environment variable:

VERCEL_WORKERS_PYTHON="vercel-workers @ https://vercel-eaoyyjlv8.vercel.sh/tarballs/vercel_workers-0.1.0.dev1775167240+bf90e40-py3-none-any.whl"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

🧪 Unit Test Strategy

Comparing: d034d905dd2553 (view diff)

Strategy: Affected packages only

✅ Only testing packages that have been modified or depend on modified packages.

Affected packages - 1 (3%)
  1. vercel
Unaffected packages - 39 (98%)
  1. @vercel-internals/get-package-json
  2. @vercel/backends
  3. @vercel/build-utils
  4. @vercel/cervel
  5. @vercel/cli-auth
  6. @vercel/client
  7. @vercel/config
  8. @vercel/detect-agent
  9. @vercel/edge
  10. @vercel/elysia
  11. @vercel/error-utils
  12. @vercel/express
  13. @vercel/fastify
  14. @vercel/firewall
  15. @vercel/frameworks
  16. @vercel/fs-detectors
  17. @vercel/functions
  18. @vercel/gatsby-plugin-vercel-builder
  19. @vercel/go
  20. @vercel/h3
  21. @vercel/hono
  22. @vercel/hydrogen
  23. @vercel/koa
  24. @vercel/nestjs
  25. @vercel/next
  26. @vercel/node
  27. @vercel/oidc
  28. @vercel/oidc-aws-credentials-provider
  29. @vercel/python
  30. @vercel/python-analysis
  31. @vercel/redwood
  32. @vercel/related-projects
  33. @vercel/remix-builder
  34. @vercel/routing-utils
  35. @vercel/ruby
  36. @vercel/rust
  37. @vercel/static-build
  38. @vercel/static-config
  39. examples

Results

  • Unit tests: Only affected packages will run unit tests
  • E2E tests: Running in parallel via E2E Tests workflow
  • Type checks: Only affected packages will run type checks

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
@brookemosby brookemosby enabled auto-merge (squash) April 3, 2026 16:05
@brookemosby brookemosby merged commit 9ee62d5 into main Apr 3, 2026
300 of 302 checks passed
@brookemosby brookemosby deleted the brooke/cli-parity-project-access-summary branch April 3, 2026 16:06
ofhouse pushed a commit that referenced this pull request Apr 3, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants