Skip to content

Commit a254576

Browse files
betegonclaude
andcommitted
docs: remove DB schema details and direct access examples
Users should use `sentry auth token` and `sentry auth status` instead of querying the database directly. Remove the auth table schema, sqlite3 examples, and direct database access encouragement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dc99816 commit a254576

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

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

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -86,40 +86,16 @@ This is typically handled automatically when tokens expire.
8686

8787
## Credential Storage
8888

89-
We store credentials in a SQLite database at `~/.sentry/cli.db` with restricted file permissions (mode 600). The database uses a single-row `auth` table with the following columns:
89+
Credentials are stored in a SQLite database at `~/.sentry/cli.db` with restricted file permissions (mode 600).
9090

91-
| Column | Type | Description |
92-
|--------|------|-------------|
93-
| `token` | TEXT | OAuth access token |
94-
| `refresh_token` | TEXT | OAuth refresh token |
95-
| `expires_at` | INTEGER | Token expiry (ms since epoch) |
96-
| `issued_at` | INTEGER | Token issue time (ms since epoch) |
97-
| `updated_at` | INTEGER | Last modification time (ms since epoch) |
91+
Use `sentry auth token` to retrieve your current access token, or `sentry auth status` to check authentication state.
9892

9993
### Environment Variable Precedence
10094

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

10397
1. `SENTRY_AUTH_TOKEN` environment variable
10498
2. `SENTRY_TOKEN` environment variable (legacy)
105-
3. The `auth` table in the SQLite database
99+
3. The stored token in the SQLite database
106100

107101
When a token comes from an environment variable, the CLI skips expiry checks and automatic refresh.
108-
109-
### Direct Database Access
110-
111-
If you need to inspect your stored credentials or integrate the CLI's auth with other tools, you can query the database directly. The config directory defaults to `~/.sentry/` but can be overridden with the `SENTRY_CONFIG_DIR` environment variable.
112-
113-
```bash
114-
# Read the current access token
115-
sqlite3 ~/.sentry/cli.db "SELECT token FROM auth WHERE id = 1;"
116-
117-
# Check token expiry
118-
sqlite3 ~/.sentry/cli.db "SELECT datetime(expires_at / 1000, 'unixepoch') FROM auth WHERE id = 1;"
119-
```
120-
121-
Keep in mind a few caveats when accessing the database from outside the CLI:
122-
123-
- **Token expiry** — Check `expires_at` before using the token. The CLI automatically refreshes expired tokens, but reading the database directly will not trigger a refresh.
124-
- **WAL mode** — The database uses SQLite WAL (Write-Ahead Logging). Open it in read-only mode to avoid lock contention with a running CLI process.
125-
- **Env var precedence** — If `SENTRY_AUTH_TOKEN` or `SENTRY_TOKEN` is set, the CLI ignores the database value. Follow the same precedence in external tools.

docs/src/content/docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ We store credentials and caches in a SQLite database (`cli.db`) inside the confi
145145
- Region URL mappings
146146
- Project aliases (for monorepo support)
147147

148-
Other tools can query the database directly to inspect stored credentials and cached data. See [Credential Storage](./commands/auth/#credential-storage) in the auth command docs for the full schema and access details.
148+
See [Credential Storage](./commands/auth/#credential-storage) in the auth command docs for more details.

plugins/sentry-cli/skills/sentry-cli/SKILL.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ Refresh your authentication token
8686

8787
```bash
8888
sentry auth refresh
89-
90-
# Read the current access token
91-
sqlite3 ~/.sentry/cli.db "SELECT token FROM auth WHERE id = 1;"
92-
93-
# Check token expiry
94-
sqlite3 ~/.sentry/cli.db "SELECT datetime(expires_at / 1000, 'unixepoch') FROM auth WHERE id = 1;"
9589
```
9690

9791
#### `sentry auth status`

0 commit comments

Comments
 (0)