Skip to content

Track CLI as source for marketplace installations#14713

Merged
tonypan2 merged 1 commit intomainfrom
01-23-track_cli_as_source_for_marketplace_installations
Jan 23, 2026
Merged

Track CLI as source for marketplace installations#14713
tonypan2 merged 1 commit intomainfrom
01-23-track_cli_as_source_for_marketplace_installations

Conversation

@tonypan2
Copy link
Copy Markdown
Contributor

Summary

  • Add source: 'cli' to the request body when provisioning marketplace integration resources via the CLI
  • This enables tracking CLI-initiated installations separately in telemetry/analytics (complements vercel/api#58640)

Test plan

  • Verify vercel integration add <slug> sends source: 'cli' in the POST to /v1/storage/stores/integration

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 23, 2026

🦋 Changeset detected

Latest commit: 551d06c

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 Jan 23, 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-hviq15crx.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-hviq15crx.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 23, 2026

🧪 Unit Test Strategy

Comparing: 0ccf09a551d06c (view diff)

Strategy: Affected packages only

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

Affected packages - 1 (2%)
  1. vercel
Unaffected packages - 40 (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/introspection
  24. @vercel/koa
  25. @vercel/nestjs
  26. @vercel/next
  27. @vercel/node
  28. @vercel/oidc
  29. @vercel/oidc-aws-credentials-provider
  30. @vercel/python
  31. @vercel/python-analysis
  32. @vercel/redwood
  33. @vercel/related-projects
  34. @vercel/remix-builder
  35. @vercel/routing-utils
  36. @vercel/ruby
  37. @vercel/rust
  38. @vercel/static-build
  39. @vercel/static-config
  40. examples

Results

  • Unit tests: Only affected packages will run unit tests
  • E2E tests: Handled separately (Version Packages PRs or run-e2e-tests label)
  • Type checks: Only affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

@tonypan2 tonypan2 force-pushed the 01-23-track_cli_as_source_for_marketplace_installations branch from 367010c to 551d06c Compare January 23, 2026 18:32
@tonypan2 tonypan2 marked this pull request as ready for review January 23, 2026 18:32
@tonypan2 tonypan2 requested a review from a team as a code owner January 23, 2026 18:32
@tonypan2 tonypan2 requested a review from a team January 23, 2026 18:33
@tonypan2 tonypan2 requested a review from tknickman January 23, 2026 18:33
@tonypan2 tonypan2 enabled auto-merge (squash) January 23, 2026 18:34
@tonypan2 tonypan2 merged commit 74edeef into main Jan 23, 2026
120 checks passed
@tonypan2 tonypan2 deleted the 01-23-track_cli_as_source_for_marketplace_installations branch January 23, 2026 18:46
tknickman pushed a commit that referenced this pull request Jan 23, 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
## vercel@50.5.0

### Minor Changes

- New, consistent --format command for machine readable output
([#14609](#14609))

-   api command ([#14715](#14715))

- Detect Augment and OpenCode agents
([#14635](#14635))

### Patch Changes

- Track CLI as source for marketplace integration installations
([#14713](#14713))

- Do not show default project settings when framework is detected
([#14608](#14608))

- Fix flakey link tests caused by Inquirer type-ahead search
([#14716](#14716))

- Updated dependencies
\[[`64b4577b6d702335478af47c8395bf36daf4f311`](64b4577),
[`1ba97e3af1c1240703df3297fbbf7af0f809dd56`](1ba97e3)]:
    -   @vercel/python@6.3.1
    -   @vercel/detect-agent@1.1.0

## @vercel/detect-agent@1.1.0

### Minor Changes

- Detect Augment and OpenCode agents
([#14635](#14635))

## @vercel/python@6.3.1

### Patch Changes

- isInstalled check only needs to check for python on the path.
([#14712](#14712))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
tonypan2 added a commit that referenced this pull request Feb 5, 2026
…add` path (#14868)

## Summary

Updates the legacy `integration add` path (`add.ts`) to pass CLI context
parameters to the web checkout flow:

- Add `source=cli` to `provisionResourceViaWebUI` and
`handleManualVerificationAction` URLs
- Add `defaultResourceName` parameter to pre-fill resource name in
checkout
- Keep `projectId` (Front derives `projectSlug` from it)

## How the two code paths work

```
OLD PATH (this PR) - via /api/marketplace/cli route
───────────────────────────────────────────────────
CLI (add.ts)                    Front (/api/marketplace/cli)      Front (checkout)
────────────                    ────────────────────────────      ────────────────
teamId ─────────────────────→   (auth)
integrationId ──────────────→   ────────────────────────────────→ (URL path)
productId ──────────────────→   → derives productSlug ──────────→ productSlug
projectId ──────────────────→   → fetches project ──────────────→ projectSlug (derived)
source=cli ─────────────────→   → forwards ─────────────────────→ source=cli ✅
defaultResourceName ────────→   → forwards ─────────────────────→ defaultResourceName ✅

NEW PATH - via auto-provision API (already working)
───────────────────────────────────────────────────
CLI (add-auto-provision.ts)     API (auto-provision)              Front (checkout)
───────────────────────────     ────────────────────              ────────────────
POST with name, metadata        Returns 422 fallback:
                                  url = checkout URL ───────────→ (base URL)
                                
CLI appends to returned URL:
  projectSlug ──────────────────────────────────────────────────→ projectSlug ✅
  source=cli ───────────────────────────────────────────────────→ source=cli ✅
  defaultResourceName ──────────────────────────────────────────→ defaultResourceName ✅
```

**Key difference:** The NEW path bypasses `/api/marketplace/cli` and
goes directly to checkout. The OLD path goes through the Front route
which rebuilds the URL - so the Front route must explicitly forward
params.

## Dependencies

**This CLI PR requires
[vercel/front#61528](vercel/front#61528 to
forward `source` and `defaultResourceName` through the
`/api/marketplace/cli` route. Without that Front PR, these params are
stripped before reaching checkout.

## Linear

- [MKT-2440](https://linear.app/vercel/issue/MKT-2440) - Track
cli-sourced installs (`source=cli`)
- [MKT-2467](https://linear.app/vercel/issue/MKT-2467) - Resource name
not preserved from CLI -> web (`defaultResourceName`)
- [MKT-2502](https://linear.app/vercel/issue/MKT-2502) - CLI web
fallback should auto connect projects (`projectSlug` - handled by
existing `projectId` flow)

## Related PRs

**This PR:**
- Depends on:
[vercel/front#61528](vercel/front#61528)
(forwards params through `/api/marketplace/cli`)

**Previous work:**
- #14734: feat(cli): Initial auto-provision support (NEW path)
- #14713: Track CLI as source for marketplace installations
- [vercel/front#60881](vercel/front#60881):
Auto-connect resource to project (checkout page support)

## Test plan

- [ ] Merge Front PR first
- [ ] Run `vc integration add <slug>` with linked project - verify URL
includes `source=cli`, `projectId`
- [ ] Run `vc integration add <slug>` without linked project - verify
URL includes `source=cli` only
- [ ] Test non-subscription billing fallback - verify
`defaultResourceName` is passed
- [ ] Test manual verification flow - verify authorization URL includes
`source=cli`

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.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