Skip to content

Commit 7d544d6

Browse files
committed
Merge branch 'main' into feat/dashboard-widget-commands
# Conflicts: # plugins/sentry-cli/skills/sentry-cli/SKILL.md # src/app.ts # src/commands/dashboard/create.ts # src/commands/dashboard/index.ts # src/commands/dashboard/list.ts # src/commands/dashboard/resolve.ts # src/commands/dashboard/view.ts # src/lib/api-client.ts # src/lib/api/dashboards.ts # src/lib/formatters/human.ts # src/types/dashboard.ts # test/commands/dashboard/create.test.ts # test/commands/dashboard/list.test.ts # test/types/dashboard.test.ts
2 parents 0d179ef + b71258d commit 7d544d6

File tree

164 files changed

+10787
-3878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+10787
-3878
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ jobs:
110110
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
111111
- if: steps.cache.outputs.cache-hit != 'true'
112112
run: bun install --frozen-lockfile
113+
- name: Generate API Schema
114+
run: bun run generate:schema
113115
- name: Check SKILL.md
114116
id: check
115117
run: bun run check:skill
@@ -143,6 +145,7 @@ jobs:
143145
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
144146
- if: steps.cache.outputs.cache-hit != 'true'
145147
run: bun install --frozen-lockfile
148+
- run: bun run generate:schema
146149
- run: bun run lint
147150
- run: bun run typecheck
148151
- run: bun run check:deps
@@ -167,6 +170,8 @@ jobs:
167170
key: node-modules-${{ hashFiles('bun.lock', 'patches/**') }}
168171
- if: steps.cache.outputs.cache-hit != 'true'
169172
run: bun install --frozen-lockfile
173+
- name: Generate API Schema
174+
run: bun run generate:schema
170175
- name: Unit Tests
171176
run: bun run test:unit
172177
- name: Isolated Tests
@@ -412,6 +417,8 @@ jobs:
412417
path: dist-bin
413418
- name: Make binary executable
414419
run: chmod +x dist-bin/sentry-linux-x64
420+
- name: Generate API Schema
421+
run: bun run generate:schema
415422
- name: E2E Tests
416423
env:
417424
SENTRY_CLI_BINARY: ${{ github.workspace }}/dist-bin/sentry-linux-x64

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@ docs/.astro
5353
# Finder (MacOS) folder config
5454
.DS_Store
5555

56+
# Generated files (rebuilt at build time)
57+
src/generated/
58+
5659
# OpenCode
5760
.opencode/

AGENTS.md

Lines changed: 187 additions & 52 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,99 @@
11
# Changelog
22

33
<!-- Craft will auto-populate this file -->
4+
## 0.16.0
5+
6+
### New Features ✨
7+
8+
#### Init
9+
10+
- Support org/project positional to pin org and project name by @MathurAditya724 in [#428](https://github.com/getsentry/cli/pull/428)
11+
- Show feedback hint after successful setup by @betegon in [#430](https://github.com/getsentry/cli/pull/430)
12+
- Add --team flag to relay team selection to project creation by @MathurAditya724 in [#403](https://github.com/getsentry/cli/pull/403)
13+
- Enforce canonical feature display order by @betegon in [#388](https://github.com/getsentry/cli/pull/388)
14+
- Accept multiple delimiter formats for --features flag by @betegon in [#386](https://github.com/getsentry/cli/pull/386)
15+
- Add git safety checks before wizard modifies files by @betegon in [#379](https://github.com/getsentry/cli/pull/379)
16+
- Add experimental warning before wizard runs by @betegon in [#378](https://github.com/getsentry/cli/pull/378)
17+
- Add init command for guided Sentry project setup by @betegon in [#283](https://github.com/getsentry/cli/pull/283)
18+
19+
#### Issue List
20+
21+
- Auto-compact when table exceeds terminal height by @BYK in [#395](https://github.com/getsentry/cli/pull/395)
22+
- Redesign table to match Sentry web UI by @BYK in [#372](https://github.com/getsentry/cli/pull/372)
23+
24+
#### Other
25+
26+
- (auth) Allow re-authentication without manual logout by @BYK in [#417](https://github.com/getsentry/cli/pull/417)
27+
- (trial) Auto-prompt for Seer trial + sentry trial list/start commands by @BYK in [#399](https://github.com/getsentry/cli/pull/399)
28+
- Add --json flag to help command for agent introspection by @BYK in [#432](https://github.com/getsentry/cli/pull/432)
29+
- Add `sentry span list` and `sentry span view` commands by @betegon in [#393](https://github.com/getsentry/cli/pull/393)
30+
- Support SENTRY_HOST as alias for SENTRY_URL by @betegon in [#409](https://github.com/getsentry/cli/pull/409)
31+
- Add --dry-run flag to mutating commands by @BYK in [#387](https://github.com/getsentry/cli/pull/387)
32+
- Return-based output with OutputConfig on buildCommand by @BYK in [#380](https://github.com/getsentry/cli/pull/380)
33+
- Add --fields flag for context-window-friendly JSON output by @BYK in [#373](https://github.com/getsentry/cli/pull/373)
34+
- Magic `@` selectors (`@latest`, `@most_frequent`) for issue commands by @BYK in [#371](https://github.com/getsentry/cli/pull/371)
35+
- Input hardening against agent hallucinations by @BYK in [#370](https://github.com/getsentry/cli/pull/370)
36+
- Add response caching for read-only API calls by @BYK in [#330](https://github.com/getsentry/cli/pull/330)
37+
38+
### Bug Fixes 🐛
39+
40+
#### Dsn
41+
42+
- Make code scanner monorepo-aware and extend --fresh to bypass DSN cache by @betegon in [#420](https://github.com/getsentry/cli/pull/420)
43+
- Prevent silent exit during uncached DSN auto-detection (#411) by @BYK in [#414](https://github.com/getsentry/cli/pull/414)
44+
45+
#### Init
46+
47+
- Align multiselect hint lines with clack's visual frame by @MathurAditya724 in [#435](https://github.com/getsentry/cli/pull/435)
48+
- Make URLs clickable with OSC 8 terminal hyperlinks by @MathurAditya724 in [#423](https://github.com/getsentry/cli/pull/423)
49+
- Remove implementation detail from help text by @betegon in [#385](https://github.com/getsentry/cli/pull/385)
50+
- Truncate uncommitted file list to first 5 entries by @MathurAditya724 in [#381](https://github.com/getsentry/cli/pull/381)
51+
52+
#### Other
53+
54+
- (api) Convert --data to query params for GET requests by @BYK in [#383](https://github.com/getsentry/cli/pull/383)
55+
- (docs) Remove double borders and fix column alignment on landing page tables by @betegon in [#369](https://github.com/getsentry/cli/pull/369)
56+
- (help) Hide plural aliases from help output by @betegon in [#441](https://github.com/getsentry/cli/pull/441)
57+
- (trace) Show span IDs in trace view and fix event_id mapping by @betegon in [#400](https://github.com/getsentry/cli/pull/400)
58+
- Show human-friendly names in trial list and surface plan trials by @BYK in [#412](https://github.com/getsentry/cli/pull/412)
59+
- Add trace ID validation to trace view + UUID dash-stripping by @BYK in [#375](https://github.com/getsentry/cli/pull/375)
60+
61+
### Documentation 📚
62+
63+
- (commands) Add alias info to subcommand help output by @betegon in [#442](https://github.com/getsentry/cli/pull/442)
64+
- Update AGENTS.md with patterns from span commands work by @BYK in [#433](https://github.com/getsentry/cli/pull/433)
65+
- Update credential storage docs and remove stale config.json references by @betegon in [#408](https://github.com/getsentry/cli/pull/408)
66+
67+
### Internal Changes 🔧
68+
69+
#### Init
70+
71+
- Remove --force flag by @betegon in [#377](https://github.com/getsentry/cli/pull/377)
72+
- Remove dead determine-pm step label by @betegon in [#374](https://github.com/getsentry/cli/pull/374)
73+
74+
#### Tests
75+
76+
- Consolidate unit tests subsumed by property tests by @BYK in [#422](https://github.com/getsentry/cli/pull/422)
77+
- Remove redundant and low-value tests by @BYK in [#418](https://github.com/getsentry/cli/pull/418)
78+
79+
#### Other
80+
81+
- (lint) Enforce command output conventions via Biome plugins by @BYK in [#439](https://github.com/getsentry/cli/pull/439)
82+
- (log/list) Convert non-follow paths to return CommandOutput by @BYK in [#410](https://github.com/getsentry/cli/pull/410)
83+
- Unified trace-target parsing and resolution by @BYK in [#438](https://github.com/getsentry/cli/pull/438)
84+
- Centralize slug normalization warning in parseOrgProjectArg by @BYK in [#436](https://github.com/getsentry/cli/pull/436)
85+
- Unify commands as generators with HumanRenderer factory, remove stdout plumbing by @BYK in [#416](https://github.com/getsentry/cli/pull/416)
86+
- Convert list command handlers to return data instead of writing stdout by @BYK in [#404](https://github.com/getsentry/cli/pull/404)
87+
- Split api-client.ts into focused domain modules by @BYK in [#405](https://github.com/getsentry/cli/pull/405)
88+
- Migrate non-streaming commands to CommandOutput with markdown rendering by @BYK in [#398](https://github.com/getsentry/cli/pull/398)
89+
- Convert Tier 2-3 commands to return-based output and consola by @BYK in [#394](https://github.com/getsentry/cli/pull/394)
90+
- Convert remaining Tier 1 commands to return-based output by @BYK in [#382](https://github.com/getsentry/cli/pull/382)
91+
- Converge Tier 1 commands to writeOutput helper by @BYK in [#376](https://github.com/getsentry/cli/pull/376)
92+
93+
### Other
94+
95+
- Minify JSON on read and pretty-print on write in init local ops by @MathurAditya724 in [#396](https://github.com/getsentry/cli/pull/396)
96+
497
## 0.15.0
598

699
### New Features ✨

biome.jsonc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"extends": ["ultracite/core"],
4+
"plugins": [
5+
"./lint-rules/no-stdout-write-in-commands.grit",
6+
"./lint-rules/no-process-stdout-in-commands.grit"
7+
],
48
"files": {
59
"includes": ["!docs", "!test/init-eval/templates"]
610
},
@@ -77,6 +81,31 @@
7781
}
7882
}
7983
}
84+
},
85+
{
86+
// Commands must use colorTag() from markdown.ts — not raw chalk.
87+
// Raw chalk bypasses the plain-output pipeline (NO_COLOR, SENTRY_PLAIN_OUTPUT).
88+
"includes": ["src/commands/**/*.ts"],
89+
"linter": {
90+
"rules": {
91+
"style": {
92+
"noRestrictedImports": {
93+
"level": "error",
94+
"options": {
95+
"paths": {
96+
"@stricli/core": {
97+
"importNames": ["buildCommand"],
98+
"message": "Import buildCommand from '../lib/command.js' instead. The wrapper injects telemetry, --log-level, and --verbose."
99+
},
100+
"chalk": {
101+
"message": "Use colorTag() from formatters/markdown.js for colored output. Raw chalk bypasses the plain-output pipeline (NO_COLOR, SENTRY_PLAIN_OUTPUT)."
102+
}
103+
}
104+
}
105+
}
106+
}
107+
}
108+
}
80109
}
81110
]
82111
}

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@ sentry auth refresh
8484

8585
This is typically handled automatically when tokens expire.
8686

87-
## Configuration
87+
## Credential Storage
8888

89-
Credentials are stored in `~/.sentry/config.json` with restricted file permissions (mode 600).
89+
Credentials are stored in a SQLite database at `~/.sentry/cli.db` with restricted file permissions (mode 600).
9090

91-
**Config structure:**
91+
Use `sentry auth token` to retrieve your current access token, or `sentry auth status` to check authentication state.
9292

93-
```json
94-
{
95-
"auth": {
96-
"token": "...",
97-
"refreshToken": "...",
98-
"expiresAt": "2024-12-31T00:00:00Z"
99-
}
100-
}
101-
```
93+
### Environment Variable Precedence
94+
95+
The CLI checks for auth tokens in the following order, using the first one found:
96+
97+
1. `SENTRY_AUTH_TOKEN` environment variable (legacy)
98+
2. `SENTRY_TOKEN` environment variable
99+
3. The stored token in the SQLite database
100+
101+
When a token comes from an environment variable, the CLI skips expiry checks and automatic refresh.

docs/src/content/docs/configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,11 @@ The `sentry api` command also uses `--verbose` to show full HTTP request/respons
144144

145145
## Credential Storage
146146

147-
Credentials are stored in a SQLite database at `~/.sentry/` (or the path set by `SENTRY_CONFIG_DIR`) with restricted file permissions (mode 600) for security. The database also caches:
147+
We store credentials and caches in a SQLite database (`cli.db`) inside the config directory (`~/.sentry/` by default, overridable via `SENTRY_CONFIG_DIR`). The database file and its WAL side-files are created with restricted permissions (mode 600) so that only the current user can read them. The database also caches:
148148

149149
- Organization and project defaults
150150
- DSN resolution results
151151
- Region URL mappings
152152
- Project aliases (for monorepo support)
153+
154+
See [Credential Storage](./commands/auth/#credential-storage) in the auth command docs for more details.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
file($name, $body) where {
2+
$name <: r".*src/commands/.*",
3+
$body <: contains `process.stdout` as $access,
4+
register_diagnostic(span=$access, message="Don't use process.stdout in commands. Yield CommandOutput and let the buildCommand wrapper handle output.")
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
file($name, $body) where {
2+
$name <: r".*src/commands/.*",
3+
$body <: contains `stdout.write($args)` as $call,
4+
register_diagnostic(span=$call, message="Don't call stdout.write() in commands. Yield CommandOutput instead and let the buildCommand wrapper handle output rendering.")
5+
}

0 commit comments

Comments
 (0)