You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(output): add Zod schema registration to OutputConfig for self-documenting JSON fields
Add an optional `schema` field to `OutputConfig<T>` so commands can
register a Zod schema describing their JSON output. The schema is used to:
- Enrich `--help` output with available JSON field names and types
- Enrich the `--fields` flag brief with available field names
- Populate `CommandInfo.jsonFields` for `sentry help` and SKILL.md generation
- Generate per-command JSON field tables in SKILL.md reference docs
Creates `SentryIssueSchema` and registers schemas on all 7 list commands
(issue, team, repo, trace, span, log, trial).
Updates agent guidance to mention `count`, `userCount`, `firstSeen`,
`lastSeen` fields and warn against unnecessary `sentry api` fallbacks.
Closes#566
Copy file name to clipboardExpand all lines: docs/src/content/docs/agent-guidance.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The `sentry` CLI follows conventions from well-known tools — if you're familia
22
22
23
23
## Context Window Tips
24
24
25
-
- Use `--fields id,title,status` on list commands to reduce output size
25
+
- Use `--json --fields` to select specific fields and reduce output size. Run `<command> --help` to see available fields. Example: `sentry issue list --json --fields shortId,title,count,userCount,lastSeen`
26
26
- Use `--json` when piping output between commands or processing programmatically
27
27
- Use `--limit` to cap the number of results (default is usually 10–100)
28
28
- Prefer `sentry issue view PROJECT-123` over listing and filtering manually
-**Confusing `--query` syntax**: The `--query` flag uses Sentry search syntax (e.g., `is:unresolved`, `assigned:me`), not free text search.
159
159
-**Not using `--web`**: View commands support `-w`/`--web` to open the resource in the browser — useful for sharing links.
160
160
-**Fetching API schemas instead of using the CLI**: Prefer `sentry schema` to browse the API and `sentry api` to make requests — the CLI handles authentication and endpoint resolution, so there's rarely a need to download OpenAPI specs separately.
161
+
-**Using `sentry api` when CLI commands suffice**: `sentry issue list --json` already includes `count`, `userCount`, `firstSeen`, `lastSeen`, `priority`, and other fields at the top level. Use `--fields` to select specific fields. Run `--help` to see all available fields. Only fall back to `sentry api` for data the CLI doesn't expose.
Copy file name to clipboardExpand all lines: plugins/sentry-cli/skills/sentry-cli/SKILL.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The `sentry` CLI follows conventions from well-known tools — if you're familia
32
32
33
33
### Context Window Tips
34
34
35
-
- Use `--fields id,title,status` on list commands to reduce output size
35
+
- Use `--json --fields` to select specific fields and reduce output size. Run `<command> --help` to see available fields. Example: `sentry issue list --json --fields shortId,title,count,userCount,lastSeen`
36
36
- Use `--json` when piping output between commands or processing programmatically
37
37
- Use `--limit` to cap the number of results (default is usually 10–100)
38
38
- Prefer `sentry issue view PROJECT-123` over listing and filtering manually
-**Confusing `--query` syntax**: The `--query` flag uses Sentry search syntax (e.g., `is:unresolved`, `assigned:me`), not free text search.
169
169
-**Not using `--web`**: View commands support `-w`/`--web` to open the resource in the browser — useful for sharing links.
170
170
-**Fetching API schemas instead of using the CLI**: Prefer `sentry schema` to browse the API and `sentry api` to make requests — the CLI handles authentication and endpoint resolution, so there's rarely a need to download OpenAPI specs separately.
171
+
-**Using `sentry api` when CLI commands suffice**: `sentry issue list --json` already includes `count`, `userCount`, `firstSeen`, `lastSeen`, `priority`, and other fields at the top level. Use `--fields` to select specific fields. Run `--help` to see all available fields. Only fall back to `sentry api` for data the CLI doesn't expose.
0 commit comments