Skip to content

[cli] Add --format=json flag integration list#15007

Merged
bhrigu123 merged 10 commits intomainfrom
cli/integration-list-json-and-project-header
Feb 13, 2026
Merged

[cli] Add --format=json flag integration list#15007
bhrigu123 merged 10 commits intomainfrom
cli/integration-list-json-and-project-header

Conversation

@bhrigu123
Copy link
Copy Markdown
Contributor

@bhrigu123 bhrigu123 commented Feb 11, 2026

Summary

  • Adds --format=json option to vercel integration list
  • When scoped to a project (default behavior), the table header now shows Integration resources for project <name> in <team>: instead of the generic Integrations in <team>:, making it clear which project is filtering results
  • JSON output writes { "resources": [...] } to stdout with projects as a proper array

Test plan

  • Existing table output tests updated for new project-scoped header
  • --all flag tests verify header remains team-scoped
  • New test: --format=json returns structured JSON for linked project
  • New test: --format=json --all returns all resources as JSON
  • New test: --format option tracked in telemetry
  • All 18 tests pass via npx vitest run packages/cli/test/unit/commands/integration/list.test.ts
  • All 124 help snapshot tests pass

Examples

node ~/workspace/cli/vercel/packages/cli/dist/vc.js integration list --all --format=json
Vercel CLI 50.15.1
{
  "resources": [
    {
      "id": "store_6hQtxdIRPKTXPQlK",
      "name": "personal-postgres",
      "status": "available",
      "product": "Amazon Aurora PostgreSQL",
      "installationId": "icfg_xGbZ12cdaGVkYSBsVh2GhXTn",
      "projects": [
        "blog-nextjs-sanity-9"
      ]
    },
    {
      "id": "store_UedfcAWsGcIFYiv4",
      "name": "neon-blue-zebra",
      "status": "available",
      "product": "Neon",
      "installationId": "icfg_5WseCmZL4zuHHZrQWQfbwyYn",
      "projects": []
    },
    {
      "id": "ir_ZMi45a9iQ0wZ3Mv1",
      "name": "project-violet-ocean",
      "status": "available",
      "product": "Sanity",
      "installationId": "icfg_F0ouW6AeDTtZRp0SNJSNLmSe",
      "projects": [
        "blog-nextjs-sanity-9"
      ]
    },
  ]
}
node ~/workspace/cli/vercel/packages/cli/dist/vc.js integration list
Vercel CLI 50.15.1
> Integration resources for project blog-nextjs-sanity-9 in bhrigu-srivastava:
Name                        Status             Product                         Integration         Projects                                          
ddb-resource                ● Available        Amazon DynamoDB                 aws-dynamodb        v0-daily-journal-app, blog-nextjs-sanity-9        
personal-postgres           ● Available        Amazon Aurora PostgreSQL        aws-apg             blog-nextjs-sanity-9                              
project-violet-ocean        ● Available        Sanity                          project             blog-nextjs-sanity-9

🤖 Generated with Claude Code

Note

Low Risk Change

This PR adds a new --format=json output option to a CLI list command with proper validation, updated header messaging, and comprehensive tests - no security, auth, or data integrity changes.

  • Adds --format=json flag to integration list command with JSON output to stdout
  • Updates table header to show project-scoped context when filtering by project
  • Adds tests for JSON output, --all flag combination, and telemetry tracking

Risk assessment for commit b50125a.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: b50125a

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

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 11, 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-dibmurrkc.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-dibmurrkc.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 11, 2026

🧪 Unit Test Strategy

Comparing: f278d46b50125a (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

@bhrigu123 bhrigu123 changed the title [cli] Add --json flag and project-scoped header to integration list [cli] Add --json flag integration list Feb 11, 2026
@bhrigu123 bhrigu123 marked this pull request as ready for review February 11, 2026 20:24
@bhrigu123 bhrigu123 requested review from a team as code owners February 11, 2026 20:25
@bhrigu123 bhrigu123 force-pushed the cli/integration-list-json-and-project-header branch from 2ddf638 to e6eacd4 Compare February 11, 2026 22:11
bhrigu123 and others added 3 commits February 11, 2026 14:29
When scoped to a project, the table header now shows which project is
being used as a filter. Also adds --json/--format support following the
same pattern as `integration discover`, outputting a `{ resources }` object
with projects as a proper array.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tonypan2
Copy link
Copy Markdown
Contributor

  • might be worthwhile to show project ids as well

  • i think we use installationId is public facing stuff instead of configurationId

  • also "integration": "project", in the sample output looks suspicious - is that a bug? i expect it to say "integration": "sanity"

Copy link
Copy Markdown
Contributor

@tonypan2 tonypan2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some questions

@bhrigu123
Copy link
Copy Markdown
Contributor Author

  • might be worthwhile to show project ids as well

Hm there doesn't seem to be a very clean way to show both project names and ids when we want to show them in a single list. Either I could have "[projectName], [projectId]" as each array item (which makes JSON arrays not very useful), or have them in separate lists (which will create confusion between their mapping). Hence just showing the names. There are other vc project commands to get the ids from name if needed. LMK if you prefer to show those IDs here somehow.

  • i think we use installationId is public facing stuff instead of configurationId

When visiting a resource page on dashboard, we do have the icfg_* on the URL. So I think that should be the public id users will have.

  • also "integration": "project", in the sample output looks suspicious - is that a bug? i expect it to say "integration": "sanity"

Wow good eye 👀 I just saw their product name is configured as project on admin: https://admin.vercel.com/read-integration/products?slug=sanity Asking about it on slack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bhrigu123 bhrigu123 changed the title [cli] Add --json flag integration list [cli] Add --format=json flag integration list Feb 11, 2026
@tonypan2
Copy link
Copy Markdown
Contributor

re installation id (from https://examples.vercel.com/docs/integrations/create-integration/marketplace-api/reference/partner/get-installation)
CleanShot 2026-02-11 at 15 51 35@2x

… in JSON output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bhrigu123 bhrigu123 merged commit f171eb9 into main Feb 13, 2026
75 checks passed
@bhrigu123 bhrigu123 deleted the cli/integration-list-json-and-project-header branch February 13, 2026 04:55
mehulkar pushed a commit that referenced this pull request Feb 13, 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 publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). 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@50.17.0

### Minor Changes

- Install builder packages on demand
([#15023](#15023))

- Display functions exceeding 250MB uncompressed size limit with total
size and breakdown of largest dependencies (requires environment
variable VERCEL_ANALYZE_BUILD_OUTPUT=1).
([#14067](#14067))

### Patch Changes

- Add `--format=json` option to `vercel integration list` and show
project name in table header when results are scoped to a project
([#15007](#15007))

- Fix builder import resolution from pre-installed depenencies
([#15041](#15041))

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging

-   Updated dependencies \[]:
    -   @vercel/static-build@2.8.37
    -   @vercel/build-utils@13.4.0
    -   @vercel/next@4.15.28
    -   @vercel/redwood@2.4.9
    -   @vercel/rust@1.0.5

## @vercel/client@17.2.41

### Patch Changes

- Updated dependencies
\[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]:
    -   @vercel/routing-utils@5.3.3
    -   @vercel/build-utils@13.4.0

## @vercel/fs-detectors@5.8.6

### Patch Changes

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging

- Updated dependencies
\[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]:
    -   @vercel/routing-utils@5.3.3
    -   @vercel/frameworks@3.17.1

## @vercel/routing-utils@5.3.3

### Patch Changes

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging


<!-- VADE_RISK_START -->
> [!NOTE]
> Low Risk Change
>
> This PR is an automated Changesets release that only updates version
numbers in package.json files and adds changelog entries - no source
code changes are present.
> 
> - Deletes changeset markdown files after consuming them
> - Bumps version numbers in 4 package.json files
> - Adds changelog entries documenting previous changes
>
> <sup>Risk assessment for [commit
9186d29](https://github.com/vercel/vercel/commit/9186d293adee9d555b8582f5c1d0cec87689acf1).</sup>
<!-- VADE_RISK_END -->

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.

3 participants