Skip to content

Commit bcaf09d

Browse files
committed
docs: fix documentation gaps and auto-sync REFERENCE_FILES
Fix genuine documentation gaps not covered by auto-generation (#569): - Add SENTRY_AUTH_TOKEN/SENTRY_TOKEN to configuration.md - Add SENTRY_INSTALL_DIR/SENTRY_NO_CACHE to configuration.md - Add project:admin scope to DEVELOPMENT.md and self-hosted.md - Expand README commands table from 6 to 14 entries - Fix credential storage path (config.db -> cli.db) in auth docs - Fix SENTRY_AUTH_TOKEN priority label (was marked legacy, is primary) - Add missing examples for auth logout/refresh/token, project create/delete, cli setup - Align curl install flags (-fsS) between README and docs site Close automation gap from #569: make generate-skill.ts auto-update the REFERENCE_FILES array in agent-skills.ts so new command groups are automatically included in runtime skill installation. Extend check-skill.ts to detect drift in agent-skills.ts and update CI auto-commit to include the file.
1 parent 6c7223a commit bcaf09d

14 files changed

Lines changed: 185 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
run: |
126126
git config user.name "github-actions[bot]"
127127
git config user.email "github-actions[bot]@users.noreply.github.com"
128-
git add plugins/sentry-cli/skills/sentry-cli/ docs/public/.well-known/skills/index.json docs/src/content/docs/commands/
128+
git add plugins/sentry-cli/skills/sentry-cli/ docs/public/.well-known/skills/index.json docs/src/content/docs/commands/ src/lib/agent-skills.ts
129129
git commit -m "chore: regenerate skill files and command docs"
130130
git push
131131
- name: Fail for fork PRs with stale generated files

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ When creating your Sentry OAuth application:
5959

6060
- **Redirect URI**: Not required for device flow
6161
- **Scopes**: The CLI requests these scopes:
62-
- `project:read`, `project:write`
62+
- `project:read`, `project:write`, `project:admin`
6363
- `org:read`
6464
- `event:read`, `event:write`
6565
- `member:read`

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
### Install Script (Recommended)
2020

2121
```bash
22-
curl -fsSL https://cli.sentry.dev/install | bash
22+
curl https://cli.sentry.dev/install -fsS | bash
2323
```
2424

2525
### Homebrew
@@ -72,10 +72,18 @@ sentry issue plan PROJ-ABC
7272
|---------|-------------|
7373
| `sentry auth` | Login, logout, check authentication status |
7474
| `sentry org` | List and view organizations |
75-
| `sentry project` | List and view projects |
75+
| `sentry project` | List, view, create, and delete projects |
7676
| `sentry issue` | List, view, explain, and plan issues |
7777
| `sentry event` | View event details |
78+
| `sentry trace` | List and view distributed traces |
79+
| `sentry span` | List and view spans |
80+
| `sentry log` | List and view logs (with streaming) |
81+
| `sentry dashboard` | List, view, and create dashboards with widgets |
82+
| `sentry sourcemap` | Inject debug IDs and upload sourcemaps |
83+
| `sentry init` | Initialize Sentry in your project |
84+
| `sentry schema` | Browse the Sentry API schema |
7885
| `sentry api` | Make direct API requests |
86+
| `sentry cli` | Upgrade, setup, fix, and send feedback |
7987

8088
For detailed documentation, visit [cli.sentry.dev](https://cli.sentry.dev).
8189

docs/src/content/docs/commands/auth.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@ SENTRY_URL=https://sentry.example.com sentry auth login --token YOUR_TOKEN
9696

9797
See [Self-Hosted Sentry](../self-hosted/) for details.
9898

99+
### Logout
100+
101+
```bash
102+
sentry auth logout
103+
```
104+
105+
### Refresh token
106+
107+
```bash
108+
sentry auth refresh
109+
```
110+
111+
### Print stored token
112+
113+
```bash
114+
sentry auth token
115+
```
116+
99117
### Check auth status
100118

101119
```bash
@@ -118,14 +136,14 @@ sentry auth whoami
118136

119137
## Credential Storage
120138

121-
Auth tokens are stored in a SQLite database at `~/.sentry/config.db` with restricted file permissions.
139+
Auth tokens are stored in a SQLite database at `~/.sentry/cli.db` with restricted file permissions.
122140

123141
## Environment Variable Precedence
124142

125143
The CLI checks for auth tokens in the following order, using the first one found:
126144

127-
1. `SENTRY_AUTH_TOKEN` environment variable (legacy)
128-
2. `SENTRY_TOKEN` environment variable
129-
3. The stored token in the SQLite database
145+
1. `SENTRY_AUTH_TOKEN` environment variable
146+
2. `SENTRY_TOKEN` environment variable (legacy alias)
147+
3. The stored OAuth token in the SQLite database
130148

131149
When a token comes from an environment variable, the CLI skips expiry checks and automatic refresh.

docs/src/content/docs/commands/cli.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,16 @@ Feedback is sent via Sentry's telemetry system. If telemetry is disabled (`SENTR
144144
```bash
145145
sentry cli fix
146146
```
147+
148+
### Configure shell integration
149+
150+
```bash
151+
# Run full setup (PATH, completions, agent skills)
152+
sentry cli setup
153+
154+
# Skip agent skill installation
155+
sentry cli setup --no-agent-skills
156+
157+
# Skip PATH and completion modifications
158+
sentry cli setup --no-modify-path --no-completions
159+
```

docs/src/content/docs/commands/project.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,26 @@ DSN: https://abc123@sentry.io/123456
117117
# Open project in browser
118118
sentry project view my-org/frontend -w
119119
```
120+
121+
### Create a project
122+
123+
```bash
124+
# Create a new project
125+
sentry project create my-new-app javascript-nextjs
126+
127+
# Create under a specific org and team
128+
sentry project create my-org/my-new-app python --team backend-team
129+
130+
# Preview without creating
131+
sentry project create my-new-app node --dry-run
132+
```
133+
134+
### Delete a project
135+
136+
```bash
137+
# Delete a project (will prompt for confirmation)
138+
sentry project delete my-org/old-project
139+
140+
# Delete without confirmation
141+
sentry project delete my-org/old-project --yes
142+
```

docs/src/content/docs/configuration.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ The Sentry CLI can be configured through environment variables and a local datab
77

88
## Environment Variables
99

10+
### `SENTRY_AUTH_TOKEN`
11+
12+
Authentication token for the Sentry API. This is the primary way to authenticate in CI/CD pipelines and scripts where interactive login is not possible.
13+
14+
```bash
15+
export SENTRY_AUTH_TOKEN=sntrys_YOUR_TOKEN_HERE
16+
```
17+
18+
You can create auth tokens in your [Sentry account settings](https://sentry.io/settings/account/api/auth-tokens/). When set, this takes precedence over any stored OAuth token from `sentry auth login`.
19+
20+
### `SENTRY_TOKEN`
21+
22+
Legacy alias for `SENTRY_AUTH_TOKEN`. If both are set, `SENTRY_AUTH_TOKEN` takes precedence.
23+
1024
### `SENTRY_HOST`
1125

1226
Base URL of your Sentry instance. **Only needed for [self-hosted Sentry](./self-hosted/).** SaaS users (sentry.io) should not set this.
@@ -125,6 +139,22 @@ Disable the automatic update check that runs periodically in the background.
125139
export SENTRY_CLI_NO_UPDATE_CHECK=1
126140
```
127141

142+
### `SENTRY_INSTALL_DIR`
143+
144+
Override the directory where the CLI binary is installed. Used by the install script and `sentry cli upgrade` to control the binary location.
145+
146+
```bash
147+
export SENTRY_INSTALL_DIR=/usr/local/bin
148+
```
149+
150+
### `SENTRY_NO_CACHE`
151+
152+
Disable API response caching. When set, the CLI will not cache API responses and will always make fresh requests.
153+
154+
```bash
155+
export SENTRY_NO_CACHE=1
156+
```
157+
128158
## Global Options
129159

130160
These flags are accepted by every command. They are not shown in individual command `--help` output, but are always available.

docs/src/content/docs/self-hosted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export SENTRY_CLIENT_ID=your-client-id
4444
If your instance is on an older version or you prefer not to create an OAuth application, you can use an API token instead:
4545

4646
1. Go to **Settings → Developer Settings → Personal Tokens** in your Sentry instance (or visit `https://sentry.example.com/settings/account/api/auth-tokens/new-token/`)
47-
2. Create a new token with the following scopes: `project:read`, `project:write`, `org:read`, `event:read`, `event:write`, `member:read`, `team:read`
47+
2. Create a new token with the following scopes: `project:read`, `project:write`, `project:admin`, `org:read`, `event:read`, `event:write`, `member:read`, `team:read`
4848
3. Pass it to the CLI:
4949

5050
```bash

plugins/sentry-cli/skills/sentry-cli/references/auth.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,25 @@ SENTRY_URL=https://sentry.example.com sentry auth login --token YOUR_TOKEN
3636

3737
Log out of Sentry
3838

39+
**Examples:**
40+
41+
```bash
42+
sentry auth logout
43+
```
44+
3945
### `sentry auth refresh`
4046

4147
Refresh your authentication token
4248

4349
**Flags:**
4450
- `--force - Force refresh even if token is still valid`
4551

52+
**Examples:**
53+
54+
```bash
55+
sentry auth refresh
56+
```
57+
4658
### `sentry auth status`
4759

4860
View authentication status
@@ -67,6 +79,12 @@ sentry auth whoami
6779

6880
Print the stored authentication token
6981

82+
**Examples:**
83+
84+
```bash
85+
sentry auth token
86+
```
87+
7088
### `sentry auth whoami`
7189

7290
Show the currently authenticated user

plugins/sentry-cli/skills/sentry-cli/references/projects.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ Create a new project
1919
- `-t, --team <value> - Team to create the project under`
2020
- `-n, --dry-run - Validate inputs and show what would be created without creating it`
2121

22+
**Examples:**
23+
24+
```bash
25+
# Create a new project
26+
sentry project create my-new-app javascript-nextjs
27+
28+
# Create under a specific org and team
29+
sentry project create my-org/my-new-app python --team backend-team
30+
31+
# Preview without creating
32+
sentry project create my-new-app node --dry-run
33+
```
34+
2235
### `sentry project delete <org/project>`
2336

2437
Delete a project
@@ -28,6 +41,16 @@ Delete a project
2841
- `-f, --force - Force deletion without confirmation`
2942
- `-n, --dry-run - Validate and show what would be deleted without deleting`
3043

44+
**Examples:**
45+
46+
```bash
47+
# Delete a project (will prompt for confirmation)
48+
sentry project delete my-org/old-project
49+
50+
# Delete without confirmation
51+
sentry project delete my-org/old-project --yes
52+
```
53+
3154
### `sentry project list <org/project>`
3255

3356
List projects

0 commit comments

Comments
 (0)