Skip to content

feat(cli): add integration list and delete commands - #1523

Merged
BYK merged 4 commits into
mainfrom
feat/cli-integration-list-delete
Oct 16, 2026
Merged

BYK merged 4 commits into
mainfrom
feat/cli-integration-list-delete

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

First step toward managing integrations from the CLI (#1519, #1520): sentry integration list (alias sentry integrations) and sentry integration delete [<org>/]<integration-id> (aliases remove, rm).

  • list uses the shared org-list framework (auto-detect, <org>/ pagination, --json). It sends includeConfig=0: Sentry fetches third-party config for any other value, including false, which can add seconds per request. The list includes disabled and pending-deletion installs, so the table shows the per-org status.
  • delete checks the integration exists, then supports --dry-run/--yes and type-to-confirm like the other delete commands.
  • org:integrations is now one of the default OAuth scopes (no admin scopes added; read-only logins still exclude it). Sentry requires it to uninstall an integration.
  • Logins from before this change lack the scope. delete checks the stored grant before the confirmation prompt, says the action needs elevated permissions, and re-runs authorization itself (new ensureScopesForAction in scope-recovery.ts), so the user isn't told to run a command. Without a TTY it can't prompt, so a 403 explains the stale login; a 403 after elevation explains the owner/manager role requirement.

Installing integrations isn't included; Sentry's install pipeline is tied to the browser session today (see #1519 and getsentry/sentry#127853).

via byk.

--

View Junior Session [Sentry]

Add `sentry integration list` (alias `sentry integrations`) and
`sentry integration delete` for integrations installed on an
organization. List sends includeConfig=0 so Sentry skips the slow
third-party config fetch. Delete explains the missing org:integrations
scope on 403, since the default login does not request it.

Refs #1519, #1520

Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
Co-Authored-By: Sergiy Deceive-skiy <sergiy.dybskiy@sentry.io>
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 16, 2026 8:33pm UTC

Request Review

…egration delete

Add org:integrations to the default OAuth scopes (no admin scopes).
integration delete now checks the stored grant before confirming and,
for older logins, explains it needs elevated permissions and re-runs
authorization itself instead of telling the user which command to run.
A 403 after that explains the org role requirement.

Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6e5dc3d. Configure here.

Comment thread packages/cli/src/lib/scope-recovery.ts
…on delete

Unattended runs must never block on the device flow, so elevation stays
interactive-only. The 403 detail and docs now say re-authorization is
skipped with --yes or --json instead of blaming a missing terminal.
Comment thread apps/cli-docs/src/fragments/commands/integration.md Outdated
Comment thread packages/cli/src/lib/complete.ts
Examples now live in docs.examples, so --help, the generated docs, and the
skill references render them from one place. The fragment keeps only the
permissions note. AGENTS.md now points examples at docs.examples and fixes
the stale fragment paths.
@BYK
BYK merged commit 3071fbc into main Oct 16, 2026
26 checks passed
@BYK
BYK deleted the feat/cli-integration-list-delete branch October 16, 2026 23:22

This branch was previously deployed

1 inactive deployment
Preview — a6ca279a Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant