Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/cli-docs/src/content/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ cli/
│ │ ├── help.ts # Help command
│ │ ├── info.ts # Print configuration and verify authentication
│ │ ├── init.ts # Initialize Sentry in your project (experimental)
│ │ ├── migrate.ts # Upgrade a project across a Sentry SDK major version
│ │ └── schema.ts # Browse the Sentry API schema
│ ├── lib/ # Shared utilities
│ └── types/ # TypeScript types and Zod schemas
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
// non-deterministically as error vs warning. See biome issue tracker.
"includes": [
"!test/init-eval/templates",
// Migration fixtures are intentionally v10-era code, and the `expected`
// files are byte-compared against codemod output. Formatting either side
// would rewrite the very thing under test.
"!test/lib/migrate/fixtures",
"!dist-build",
// The codemod package is a self-contained Codemod (jssg) project with
// its own tooling/tests (`codemods/sentry-v3-to-v4`); it uses the
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
},
"devDependencies": {
"@anthropic-ai/sdk": "^0.39.0",
"@babel/parser": "^8.0.4",
"@babel/types": "^8.0.4",
"@biomejs/biome": "2.3.8",
"@clack/prompts": "0.11.0",
"@hono/node-server": "^2.0.10",
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,14 @@ View Sentry logs

→ Full flags and examples: `references/log.md`

### Migrate

Upgrade a project across a Sentry SDK major version

- `sentry migrate` — Upgrade a project across a Sentry SDK major version

→ Full flags and examples: `references/migrate.md`

### Monitor

Work with Sentry cron monitors
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: sentry-cli-migrate
version: 0.43.0-dev.0
description: Upgrade a project across a Sentry SDK major version
requires:
bins: ["sentry"]
auth: true
---

# Migrate Commands

Upgrade a project across a Sentry SDK major version

### `sentry migrate`

Upgrade a project across a Sentry SDK major version

**Flags:**
- `--dry-run - Report what would change without writing anything`
- `--allow-dirty - Run even though the working tree has uncommitted changes`
- `--migration <value> - Run a specific migration instead of detecting one`
- `--cwd <value> - Directory to migrate (defaults to the current directory)`
- `--only <value> - Comma-separated task ids to run exclusively`
- `--skip <value> - Comma-separated task ids to skip`

All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags.
2 changes: 2 additions & 0 deletions packages/cli/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { listCommand as issueListCommand } from "./commands/issue/list.js";
import { localRoute } from "./commands/local/index.js";
import { logRoute } from "./commands/log/index.js";
import { listCommand as logListCommand } from "./commands/log/list.js";
import { migrateCommand } from "./commands/migrate.js";
import { monitorRoute } from "./commands/monitor/index.js";
import { listCommand as monitorListCommand } from "./commands/monitor/list.js";
import { orgRoute } from "./commands/org/index.js";
Expand Down Expand Up @@ -133,6 +134,7 @@ export const routes = buildRouteMap({
explore: exploreCommand,
feedback: feedbackRoute,
log: logRoute,
migrate: migrateCommand,
monitor: monitorRoute,
snapshots: snapshotsRoute,
sourcemap: sourcemapRoute,
Expand Down
Loading
Loading