Skip to content

Commit 228794f

Browse files
cursoragentbetegon
andcommitted
docs: add missing subcommand examples and flag documentation
- Add dashboard revisions/restore examples to dashboard.md fragment - Add issue events subcommand and @latest/@most_frequent selectors to issue.md - Add cli defaults and cli import examples to cli.md fragment - Document auth login --url, --force, --timeout flags in auth.md - Document install script flags and env vars in getting-started.mdx Co-authored-by: Miguel Betegón <miguelbetegongarcia@gmail.com>
1 parent 33dd005 commit 228794f

5 files changed

Lines changed: 143 additions & 5 deletions

File tree

docs/src/content/docs/getting-started.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ The `--version` flag takes precedence over `SENTRY_VERSION` if both are set.
3636
The chosen channel is persisted so that `sentry cli upgrade` automatically
3737
tracks the same channel on future updates.
3838

39+
#### Install Script Options
40+
41+
The install script accepts these flags (passed after `--`):
42+
43+
```bash
44+
# Skip PATH modification (e.g., in CI where PATH is managed externally)
45+
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-modify-path
46+
47+
# Skip shell completion installation
48+
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-completions
49+
50+
# Skip agent skill installation (for Claude Code, Cursor, etc.)
51+
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-agent-skills
52+
```
53+
54+
Environment variables:
55+
56+
| Variable | Description |
57+
|----------|-------------|
58+
| `SENTRY_VERSION` | Pin version (e.g., `0.19.0`) or channel (`nightly`) |
59+
| `SENTRY_INSTALL_DIR` | Override binary install directory (default: `~/.sentry/bin`) |
60+
| `SENTRY_INIT` | Set to `1` to run `sentry init` after install |
61+
3962
#### Supported Platforms
4063

4164
{/* GENERATED:START platform-support */}

docs/src/fragments/commands/auth.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,28 @@ sentry auth login --token YOUR_SENTRY_API_TOKEN
2222

2323
### Self-hosted Sentry
2424

25+
The `--url` flag is required when first connecting to a self-hosted instance.
26+
This registers the host as trusted so subsequent commands don't need the flag:
27+
2528
```bash
26-
SENTRY_URL=https://sentry.example.com sentry auth login
29+
# OAuth login to a self-hosted instance (requires --url on first use)
30+
sentry auth login --url https://sentry.example.com
31+
32+
# Token-based auth with self-hosted
33+
sentry auth login --token YOUR_TOKEN --url https://sentry.example.com
2734
```
2835

29-
For token-based auth with self-hosted:
36+
See [Self-Hosted Sentry](../self-hosted/) for details.
37+
38+
### Re-authenticate and timeouts
3039

3140
```bash
32-
SENTRY_URL=https://sentry.example.com sentry auth login --token YOUR_TOKEN
33-
```
41+
# Force re-authentication (skip "already logged in" prompt)
42+
sentry auth login --force
3443

35-
See [Self-Hosted Sentry](../self-hosted/) for details.
44+
# Set a custom timeout for the OAuth flow (default: 900 seconds)
45+
sentry auth login --timeout 300
46+
```
3647

3748
### Logout
3849

docs/src/fragments/commands/cli.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,49 @@ sentry cli setup --no-agent-skills
9191
# Skip PATH and completion modifications
9292
sentry cli setup --no-modify-path --no-completions
9393
```
94+
95+
### View and manage defaults
96+
97+
```bash
98+
# Show all current defaults
99+
sentry cli defaults
100+
101+
# Set default organization
102+
sentry cli defaults org my-org
103+
104+
# Set default project
105+
sentry cli defaults project my-project
106+
107+
# Set Sentry URL (self-hosted)
108+
sentry cli defaults url https://sentry.example.com
109+
110+
# Disable telemetry
111+
sentry cli defaults telemetry off
112+
113+
# Clear a specific default
114+
sentry cli defaults org --clear
115+
116+
# Clear all defaults (with confirmation)
117+
sentry cli defaults --clear
118+
```
119+
120+
See [Configuration](../configuration/#persistent-defaults) for more details on defaults.
121+
122+
### Import settings from legacy `.sentryclirc`
123+
124+
```bash
125+
# Scan for and import legacy .sentryclirc settings
126+
sentry cli import
127+
128+
# Preview what would be imported
129+
sentry cli import --dry-run
130+
131+
# Skip confirmation prompts
132+
sentry cli import --yes
133+
134+
# Trust a specific self-hosted URL during import
135+
sentry cli import --url https://sentry.example.com
136+
137+
# Skip API validation of the imported token
138+
sentry cli import --skip-validation
139+
```

docs/src/fragments/commands/dashboard.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,29 @@ sentry dashboard widget delete 'My Dashboard' --title 'Error Count'
108108
sentry dashboard widget delete 12345 --index 2
109109
```
110110

111+
### View revision history
112+
113+
```bash
114+
# List revisions for a dashboard
115+
sentry dashboard revisions 'Frontend Performance'
116+
117+
# By dashboard ID
118+
sentry dashboard revisions 12345
119+
120+
# Paginate through revision history
121+
sentry dashboard revisions 12345 -c next
122+
```
123+
124+
### Restore a previous revision
125+
126+
```bash
127+
# Restore a specific revision (use `revisions` to find the revision ID)
128+
sentry dashboard restore 'Frontend Performance' --revision 3
129+
130+
# Restore by dashboard ID
131+
sentry dashboard restore 12345 --revision 1
132+
```
133+
111134
## Query Shorthand
112135

113136
The `--query` flag supports shorthand for aggregate functions:

docs/src/fragments/commands/issue.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,41 @@ Latest event:
7979
sentry issue view FRONT-ABC -w
8080
```
8181

82+
### List events for an issue
83+
84+
```bash
85+
# List recent events for an issue
86+
sentry issue events FRONT-ABC
87+
88+
# With search filter
89+
sentry issue events FRONT-ABC --query "browser:Chrome"
90+
91+
# Include full event body with stacktraces
92+
sentry issue events FRONT-ABC --full
93+
94+
# Limit and time range
95+
sentry issue events FRONT-ABC --limit 50 --period 24h
96+
97+
# Paginate through events
98+
sentry issue events FRONT-ABC -c next
99+
```
100+
101+
### Magic selectors
102+
103+
Use `@latest` and `@most_frequent` to quickly access common issues without looking up IDs:
104+
105+
```bash
106+
# View the most recently seen issue
107+
sentry issue view @latest
108+
109+
# Explain the most frequently occurring issue
110+
sentry issue explain @most_frequent
111+
112+
# Works with any issue subcommand
113+
sentry issue plan @latest
114+
sentry issue events @latest --limit 5
115+
```
116+
82117
### Explain and plan with Seer AI
83118

84119
```bash

0 commit comments

Comments
 (0)