Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
---
title: feedback
title: cli feedback
description: Send feedback about the Sentry CLI
---

Send feedback about your experience with the CLI.

## Commands

### `sentry feedback`

Submit feedback about the CLI directly to the Sentry team.
## Usage

```bash
sentry feedback <message>
sentry cli feedback <message>
```

**Arguments:**
Expand All @@ -25,13 +21,13 @@ sentry feedback <message>

```bash
# Send positive feedback
sentry feedback i love this tool
sentry cli feedback i love this tool

# Report an issue
sentry feedback the issue view is confusing
sentry cli feedback the issue view is confusing

# Suggest an improvement
sentry feedback would be great to have a search command
sentry cli feedback would be great to have a search command
```

## Notes
Expand Down
13 changes: 13 additions & 0 deletions docs/src/content/docs/commands/cli/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: cli
description: CLI-related commands for managing the Sentry CLI itself
---

Commands for managing the Sentry CLI itself, including sending feedback and upgrading to newer versions.

## Commands

| Command | Description |
|---------|-------------|
| [`feedback`](./feedback/) | Send feedback about the CLI |
| [`upgrade`](./upgrade/) | Update the CLI to the latest version |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: upgrade
title: cli upgrade
description: Update the Sentry CLI to the latest version
---

Expand All @@ -8,14 +8,12 @@ Self-update the Sentry CLI to the latest or a specific version.
## Usage

```bash
sentry upgrade # Update to latest version
sentry upgrade 0.5.0 # Update to specific version
sentry upgrade --check # Check for updates without installing
sentry upgrade --method npm # Force using npm to upgrade
sentry cli upgrade # Update to latest version
sentry cli upgrade 0.5.0 # Update to specific version
sentry cli upgrade --check # Check for updates without installing
sentry cli upgrade --method npm # Force using npm to upgrade
```

**Alias:** `sentry update`

## Options

| Option | Description |
Expand All @@ -41,21 +39,21 @@ The CLI auto-detects how it was installed and uses the same method to upgrade:
### Check for updates

```bash
sentry upgrade --check
sentry cli upgrade --check
```

```
Installation method: curl
Current version: 0.4.0
Latest version: 0.5.0

Run 'sentry upgrade' to update.
Run 'sentry cli upgrade' to update.
```

### Upgrade to latest

```bash
sentry upgrade
sentry cli upgrade
```

```
Expand All @@ -71,13 +69,13 @@ Successfully upgraded to 0.5.0.
### Upgrade to specific version

```bash
sentry upgrade 0.5.0
sentry cli upgrade 0.5.0
```

### Force installation method

If auto-detection fails or you want to switch installation methods:

```bash
sentry upgrade --method npm
sentry cli upgrade --method npm
```
2 changes: 1 addition & 1 deletion docs/src/content/docs/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ The Sentry CLI provides commands for interacting with various Sentry resources.
| Command | Description |
|---------|-------------|
| [`auth`](./auth/) | Authentication management |
| [`cli`](./cli/) | CLI-related commands (feedback, upgrade) |
| [`org`](./org/) | Organization operations |
| [`project`](./project/) | Project operations |
| [`issue`](./issue/) | Issue tracking |
| [`event`](./event/) | Event inspection |
| [`api`](./api/) | Direct API access |
| [`feedback`](./feedback/) | Send feedback about the CLI |

## Global Options

Expand Down
33 changes: 7 additions & 26 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,41 +364,22 @@ sentry api /organizations/ --include
sentry api /projects/my-org/my-project/issues/ --paginate
```

### Upgrade
### Cli

Update the Sentry CLI to the latest version
CLI-related commands

#### `sentry cli feedback <message...>`

#### `sentry upgrade <version>`
Send feedback about the CLI

#### `sentry cli upgrade <version>`

Update the Sentry CLI to the latest version

**Flags:**
- `--check - Check for updates without installing`
- `--method <value> - Installation method to use (curl, npm, pnpm, bun, yarn)`

### Feedback

Send feedback about the CLI

#### `sentry feedback <message...>`

Send feedback about the CLI

**Examples:**

```bash
sentry feedback <message>

# Send positive feedback
sentry feedback i love this tool

# Report an issue
sentry feedback the issue view is confusing

# Suggest an improvement
sentry feedback would be great to have a search command
```

## Output Formats

### JSON Output
Expand Down
9 changes: 2 additions & 7 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import {
} from "@stricli/core";
import { apiCommand } from "./commands/api.js";
import { authRoute } from "./commands/auth/index.js";
import { cliRoute } from "./commands/cli/index.js";
import { eventRoute } from "./commands/event/index.js";
import { feedbackCommand } from "./commands/feedback.js";
import { helpCommand } from "./commands/help.js";
import { issueRoute } from "./commands/issue/index.js";
import { orgRoute } from "./commands/org/index.js";
import { projectRoute } from "./commands/project/index.js";
import { upgradeCommand } from "./commands/upgrade.js";
import { CLI_VERSION } from "./lib/constants.js";
import { CliError, getExitCode } from "./lib/errors.js";
import { error as errorColor } from "./lib/formatters/colors.js";
Expand All @@ -24,16 +23,12 @@ export const routes = buildRouteMap({
routes: {
help: helpCommand,
auth: authRoute,
cli: cliRoute,
org: orgRoute,
project: projectRoute,
issue: issueRoute,
event: eventRoute,
api: apiCommand,
upgrade: upgradeCommand,
feedback: feedbackCommand,
},
aliases: {
update: "upgrade",
},
defaultCommand: "help",
docs: {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/feedback.ts → src/commands/cli/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Allows users to submit feedback about the CLI.
* All arguments after 'feedback' are joined into a single message.
*
* @example sentry feedback i love this tool
* @example sentry feedback the issue view is confusing
* @example sentry cli feedback i love this tool
* @example sentry cli feedback the issue view is confusing
*/

// biome-ignore lint/performance/noNamespaceImport: Sentry SDK recommends namespace import
import * as Sentry from "@sentry/bun";
import { buildCommand } from "@stricli/core";
import type { SentryContext } from "../context.js";
import { ValidationError } from "../lib/errors.js";
import type { SentryContext } from "../../context.js";
import { ValidationError } from "../../lib/errors.js";

export const feedbackCommand = buildCommand({
docs: {
Expand Down
16 changes: 16 additions & 0 deletions src/commands/cli/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { buildRouteMap } from "@stricli/core";
import { feedbackCommand } from "./feedback.js";
import { upgradeCommand } from "./upgrade.js";

export const cliRoute = buildRouteMap({
routes: {
feedback: feedbackCommand,
upgrade: upgradeCommand,
},
docs: {
brief: "CLI-related commands",
fullDescription:
"Commands for managing the Sentry CLI itself, including sending feedback " +
"and upgrading to newer versions.",
},
});
22 changes: 12 additions & 10 deletions src/commands/upgrade.ts → src/commands/cli/upgrade.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* sentry upgrade
* sentry cli upgrade
*
* Self-update the Sentry CLI to the latest or a specific version.
*/

import { buildCommand } from "@stricli/core";
import type { SentryContext } from "../context.js";
import { CLI_VERSION } from "../lib/constants.js";
import { UpgradeError } from "../lib/errors.js";
import type { SentryContext } from "../../context.js";
import { CLI_VERSION } from "../../lib/constants.js";
import { UpgradeError } from "../../lib/errors.js";
import {
detectInstallationMethod,
executeUpgrade,
Expand All @@ -16,7 +16,7 @@ import {
parseInstallationMethod,
VERSION_PREFIX_REGEX,
versionExists,
} from "../lib/upgrade.js";
} from "../../lib/upgrade.js";

type UpgradeFlags = {
readonly check: boolean;
Expand All @@ -30,10 +30,10 @@ export const upgradeCommand = buildCommand({
"Check for updates and upgrade the Sentry CLI to the latest or a specific version.\n\n" +
"By default, detects how the CLI was installed (npm, curl, etc.) and uses the same method to upgrade.\n\n" +
"Examples:\n" +
" sentry upgrade # Update to latest version\n" +
" sentry upgrade 0.5.0 # Update to specific version\n" +
" sentry upgrade --check # Check for updates without installing\n" +
" sentry upgrade --method npm # Force using npm to upgrade",
" sentry cli upgrade # Update to latest version\n" +
" sentry cli upgrade 0.5.0 # Update to specific version\n" +
" sentry cli upgrade --check # Check for updates without installing\n" +
" sentry cli upgrade --method npm # Force using npm to upgrade",
},
parameters: {
positional: {
Expand Down Expand Up @@ -94,7 +94,9 @@ export const upgradeCommand = buildCommand({
if (CLI_VERSION === target) {
stdout.write("\nYou are already on the target version.\n");
} else {
const cmd = version ? `sentry upgrade ${target}` : "sentry upgrade";
const cmd = version
? `sentry cli upgrade ${target}`
: "sentry cli upgrade";
stdout.write(`\nRun '${cmd}' to update.\n`);
}
return;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function getUpdateNotificationImpl(): string | null {
return null;
}

return `\n${muted("Update available:")} ${cyan(CLI_VERSION)} → ${cyan(latestVersion)} Run ${cyan('"sentry upgrade"')} to update.\n`;
return `\n${muted("Update available:")} ${cyan(CLI_VERSION)} → ${cyan(latestVersion)} Run ${cyan('"sentry cli upgrade"')} to update.\n`;
} catch (error) {
// DB access failed - report to Sentry but don't crash CLI
Sentry.captureException(error);
Expand Down
Loading
Loading