diff --git a/docs/public/.well-known/skills/index.json b/docs/public/.well-known/skills/index.json index 2ddb8279c..51bd5ce26 100644 --- a/docs/public/.well-known/skills/index.json +++ b/docs/public/.well-known/skills/index.json @@ -7,18 +7,22 @@ "SKILL.md", "references/api.md", "references/auth.md", - "references/dashboards.md", - "references/events.md", - "references/issues.md", - "references/logs.md", - "references/organizations.md", - "references/projects.md", + "references/cli.md", + "references/dashboard.md", + "references/event.md", + "references/init.md", + "references/issue.md", + "references/log.md", + "references/org.md", + "references/project.md", "references/release.md", - "references/setup.md", + "references/repo.md", + "references/schema.md", "references/sourcemap.md", - "references/teams.md", - "references/traces.md", - "references/trials.md" + "references/span.md", + "references/team.md", + "references/trace.md", + "references/trial.md" ] } ] diff --git a/plugins/sentry-cli/skills/sentry-cli/SKILL.md b/plugins/sentry-cli/skills/sentry-cli/SKILL.md index 7f4c6170d..386b56080 100644 --- a/plugins/sentry-cli/skills/sentry-cli/SKILL.md +++ b/plugins/sentry-cli/skills/sentry-cli/SKILL.md @@ -276,7 +276,7 @@ Work with Sentry organizations - `sentry org list` — List organizations - `sentry org view ` — View details of an organization -→ Full flags and examples: `references/organizations.md` +→ Full flags and examples: `references/org.md` ### Project @@ -287,7 +287,7 @@ Work with Sentry projects - `sentry project list ` — List projects - `sentry project view ` — View details of a project -→ Full flags and examples: `references/projects.md` +→ Full flags and examples: `references/project.md` ### Issue @@ -299,7 +299,7 @@ Manage Sentry issues - `sentry issue plan ` — Generate a solution plan using Seer AI - `sentry issue view ` — View details of a specific issue -→ Full flags and examples: `references/issues.md` +→ Full flags and examples: `references/issue.md` ### Event @@ -307,9 +307,9 @@ View Sentry events - `sentry event view ` — View details of a specific event -→ Full flags and examples: `references/events.md` +→ Full flags and examples: `references/event.md` -### Api +### API Make an authenticated API request @@ -317,7 +317,7 @@ Make an authenticated API request → Full flags and examples: `references/api.md` -### Cli +### CLI CLI-related commands @@ -326,7 +326,7 @@ CLI-related commands - `sentry cli setup` — Configure shell integration - `sentry cli upgrade ` — Update the Sentry CLI to the latest version -→ Full flags and examples: `references/setup.md` +→ Full flags and examples: `references/cli.md` ### Dashboard @@ -339,7 +339,7 @@ Manage Sentry dashboards - `sentry dashboard widget edit ` — Edit a widget in a dashboard - `sentry dashboard widget delete ` — Delete a widget from a dashboard -→ Full flags and examples: `references/dashboards.md` +→ Full flags and examples: `references/dashboard.md` ### Release @@ -363,7 +363,7 @@ Work with Sentry repositories - `sentry repo list ` — List repositories -→ Full flags and examples: `references/teams.md` +→ Full flags and examples: `references/repo.md` ### Team @@ -371,7 +371,7 @@ Work with Sentry teams - `sentry team list ` — List teams -→ Full flags and examples: `references/teams.md` +→ Full flags and examples: `references/team.md` ### Log @@ -380,7 +380,7 @@ View Sentry logs - `sentry log list ` — List logs from a project - `sentry log view ` — View details of one or more log entries -→ Full flags and examples: `references/logs.md` +→ Full flags and examples: `references/log.md` ### Sourcemap @@ -398,7 +398,7 @@ List and view spans in projects or traces - `sentry span list ` — List spans in a project or trace - `sentry span view ` — View details of specific spans -→ Full flags and examples: `references/traces.md` +→ Full flags and examples: `references/span.md` ### Trace @@ -408,7 +408,7 @@ View distributed traces - `sentry trace view ` — View details of a specific trace - `sentry trace logs ` — View logs associated with a trace -→ Full flags and examples: `references/traces.md` +→ Full flags and examples: `references/trace.md` ### Trial @@ -417,7 +417,7 @@ Manage product trials - `sentry trial list ` — List product trials - `sentry trial start ` — Start a product trial -→ Full flags and examples: `references/trials.md` +→ Full flags and examples: `references/trial.md` ### Init @@ -425,7 +425,7 @@ Initialize Sentry in your project (experimental) - `sentry init ` — Initialize Sentry in your project (experimental) -→ Full flags and examples: `references/setup.md` +→ Full flags and examples: `references/init.md` ### Schema @@ -433,7 +433,7 @@ Browse the Sentry API schema - `sentry schema ` — Browse the Sentry API schema -→ Full flags and examples: `references/setup.md` +→ Full flags and examples: `references/schema.md` ## Global Options diff --git a/plugins/sentry-cli/skills/sentry-cli/references/api.md b/plugins/sentry-cli/skills/sentry-cli/references/api.md index 94311f2ac..98f449e44 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/api.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/api.md @@ -1,13 +1,13 @@ --- name: sentry-cli-api version: 0.25.0-dev.0 -description: Make arbitrary Sentry API requests +description: Make an authenticated API request requires: bins: ["sentry"] auth: true --- -# API Command +# API Commands Make an authenticated API request diff --git a/plugins/sentry-cli/skills/sentry-cli/references/auth.md b/plugins/sentry-cli/skills/sentry-cli/references/auth.md index 5c339cfc7..95af69231 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/auth.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/auth.md @@ -1,13 +1,13 @@ --- name: sentry-cli-auth version: 0.25.0-dev.0 -description: Authenticate with Sentry via OAuth or API tokens +description: Authenticate with Sentry requires: bins: ["sentry"] auth: true --- -# Authentication Commands +# Auth Commands Authenticate with Sentry diff --git a/plugins/sentry-cli/skills/sentry-cli/references/setup.md b/plugins/sentry-cli/skills/sentry-cli/references/cli.md similarity index 56% rename from plugins/sentry-cli/skills/sentry-cli/references/setup.md rename to plugins/sentry-cli/skills/sentry-cli/references/cli.md index 93b6786a6..cd7fbf62a 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/setup.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/cli.md @@ -1,20 +1,16 @@ --- -name: sentry-cli-setup +name: sentry-cli-cli version: 0.25.0-dev.0 -description: Configure the CLI, install integrations, and manage upgrades +description: CLI-related commands requires: bins: ["sentry"] auth: true --- -# CLI Setup Commands +# CLI Commands CLI-related commands -Initialize Sentry in your project (experimental) - -Browse the Sentry API schema - ### `sentry cli feedback ` Send feedback about the CLI @@ -99,69 +95,4 @@ sentry cli upgrade nightly sentry cli upgrade stable ``` -### `sentry init ` - -Initialize Sentry in your project (experimental) - -**Flags:** -- `-y, --yes - Non-interactive mode (accept defaults)` -- `--dry-run - Preview changes without applying them` -- `--features ... - Features to enable: errors,tracing,logs,replay,metrics,profiling,sourcemaps,crons,ai-monitoring,user-feedback` -- `-t, --team - Team slug to create the project under` - -**Examples:** - -```bash -# Interactive setup -sentry init - -# Non-interactive with auto-yes -sentry init -y - -# Dry run to preview changes -sentry init --dry-run - -# Target a subdirectory -sentry init ./my-app - -# Use a specific org (auto-detect project) -sentry init acme/ - -# Use a specific org and project -sentry init acme/my-app - -# Assign a team when creating a new project -sentry init acme/ --team backend - -# Enable specific features -sentry init --features profiling,replay -``` - -### `sentry schema ` - -Browse the Sentry API schema - -**Flags:** -- `--all - Show all endpoints in a flat list` -- `-q, --search - Search endpoints by keyword` - -**Examples:** - -```bash -# List all API resources -sentry schema - -# Browse issue endpoints -sentry schema issues - -# View details for a specific operation -sentry schema issues list - -# Search for monitoring-related endpoints -sentry schema --search monitor - -# Flat list of every endpoint -sentry schema --all -``` - All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/dashboards.md b/plugins/sentry-cli/skills/sentry-cli/references/dashboard.md similarity index 98% rename from plugins/sentry-cli/skills/sentry-cli/references/dashboards.md rename to plugins/sentry-cli/skills/sentry-cli/references/dashboard.md index cab03c77d..7f769d5cf 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/dashboards.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/dashboard.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-dashboards +name: sentry-cli-dashboard version: 0.25.0-dev.0 -description: List, view, and create Sentry dashboards +description: Manage Sentry dashboards requires: bins: ["sentry"] auth: true diff --git a/plugins/sentry-cli/skills/sentry-cli/references/events.md b/plugins/sentry-cli/skills/sentry-cli/references/event.md similarity index 91% rename from plugins/sentry-cli/skills/sentry-cli/references/events.md rename to plugins/sentry-cli/skills/sentry-cli/references/event.md index d40f97260..7e8556551 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/events.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/event.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-events +name: sentry-cli-event version: 0.25.0-dev.0 -description: View individual error events +description: View Sentry events requires: bins: ["sentry"] auth: true diff --git a/plugins/sentry-cli/skills/sentry-cli/references/init.md b/plugins/sentry-cli/skills/sentry-cli/references/init.md new file mode 100644 index 000000000..9651cfb9b --- /dev/null +++ b/plugins/sentry-cli/skills/sentry-cli/references/init.md @@ -0,0 +1,52 @@ +--- +name: sentry-cli-init +version: 0.25.0-dev.0 +description: Initialize Sentry in your project (experimental) +requires: + bins: ["sentry"] + auth: true +--- + +# Init Commands + +Initialize Sentry in your project (experimental) + +### `sentry init ` + +Initialize Sentry in your project (experimental) + +**Flags:** +- `-y, --yes - Non-interactive mode (accept defaults)` +- `--dry-run - Preview changes without applying them` +- `--features ... - Features to enable: errors,tracing,logs,replay,metrics,profiling,sourcemaps,crons,ai-monitoring,user-feedback` +- `-t, --team - Team slug to create the project under` + +**Examples:** + +```bash +# Interactive setup +sentry init + +# Non-interactive with auto-yes +sentry init -y + +# Dry run to preview changes +sentry init --dry-run + +# Target a subdirectory +sentry init ./my-app + +# Use a specific org (auto-detect project) +sentry init acme/ + +# Use a specific org and project +sentry init acme/my-app + +# Assign a team when creating a new project +sentry init acme/ --team backend + +# Enable specific features +sentry init --features profiling,replay +``` + +All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/issues.md b/plugins/sentry-cli/skills/sentry-cli/references/issue.md similarity index 98% rename from plugins/sentry-cli/skills/sentry-cli/references/issues.md rename to plugins/sentry-cli/skills/sentry-cli/references/issue.md index 11ea0bd9d..7421a766c 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/issues.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/issue.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-issues +name: sentry-cli-issue version: 0.25.0-dev.0 -description: List, view, and analyze Sentry issues with AI +description: Manage Sentry issues requires: bins: ["sentry"] auth: true diff --git a/plugins/sentry-cli/skills/sentry-cli/references/logs.md b/plugins/sentry-cli/skills/sentry-cli/references/log.md similarity index 96% rename from plugins/sentry-cli/skills/sentry-cli/references/logs.md rename to plugins/sentry-cli/skills/sentry-cli/references/log.md index 301a8ba52..0d930a5a3 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/logs.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/log.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-logs +name: sentry-cli-log version: 0.25.0-dev.0 -description: List and stream logs from Sentry projects +description: View Sentry logs requires: bins: ["sentry"] auth: true diff --git a/plugins/sentry-cli/skills/sentry-cli/references/organizations.md b/plugins/sentry-cli/skills/sentry-cli/references/org.md similarity index 88% rename from plugins/sentry-cli/skills/sentry-cli/references/organizations.md rename to plugins/sentry-cli/skills/sentry-cli/references/org.md index 7bf43a45d..79b7d7347 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/organizations.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/org.md @@ -1,13 +1,13 @@ --- -name: sentry-cli-organizations +name: sentry-cli-org version: 0.25.0-dev.0 -description: List and view Sentry organizations +description: Work with Sentry organizations requires: bins: ["sentry"] auth: true --- -# Organization Commands +# Org Commands Work with Sentry organizations diff --git a/plugins/sentry-cli/skills/sentry-cli/references/projects.md b/plugins/sentry-cli/skills/sentry-cli/references/project.md similarity index 96% rename from plugins/sentry-cli/skills/sentry-cli/references/projects.md rename to plugins/sentry-cli/skills/sentry-cli/references/project.md index b24a4b4eb..20a710ed0 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/projects.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/project.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-projects +name: sentry-cli-project version: 0.25.0-dev.0 -description: Create, list, and manage Sentry projects +description: Work with Sentry projects requires: bins: ["sentry"] auth: true diff --git a/plugins/sentry-cli/skills/sentry-cli/references/release.md b/plugins/sentry-cli/skills/sentry-cli/references/release.md index 2bb473051..40c26723f 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/release.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/release.md @@ -1,13 +1,13 @@ --- name: sentry-cli-release version: 0.25.0-dev.0 -description: Sentry CLI release commands +description: Work with Sentry releases requires: bins: ["sentry"] auth: true --- -# release Commands +# Release Commands Work with Sentry releases diff --git a/plugins/sentry-cli/skills/sentry-cli/references/teams.md b/plugins/sentry-cli/skills/sentry-cli/references/repo.md similarity index 55% rename from plugins/sentry-cli/skills/sentry-cli/references/teams.md rename to plugins/sentry-cli/skills/sentry-cli/references/repo.md index 5a04b3bba..302d961bd 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/teams.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/repo.md @@ -1,18 +1,16 @@ --- -name: sentry-cli-teams +name: sentry-cli-repo version: 0.25.0-dev.0 -description: List teams and repositories in a Sentry organization +description: Work with Sentry repositories requires: bins: ["sentry"] auth: true --- -# Team & Repository Commands +# Repo Commands Work with Sentry repositories -Work with Sentry teams - ### `sentry repo list ` List repositories @@ -49,38 +47,4 @@ sentry repo list my-org/ -c next sentry repo list --json ``` -### `sentry team list ` - -List teams - -**Flags:** -- `-n, --limit - Maximum number of teams to list - (default: "30")` -- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` -- `-c, --cursor - Navigate pages: "next", "prev", "first" (or raw cursor string)` - -**JSON Fields** (use `--json --fields` to select specific fields): - -| Field | Type | Description | -|-------|------|-------------| -| `id` | string | Team ID | -| `slug` | string | Team slug | -| `name` | string | Team name | -| `dateCreated` | string | Creation date (ISO 8601) | -| `isMember` | boolean | Whether you are a member | -| `teamRole` | string \| null | Your role in the team | -| `memberCount` | number | Number of members | - -**Examples:** - -```bash -# List teams -sentry team list my-org/ - -# Paginate through teams -sentry team list my-org/ -c next - -# Output as JSON -sentry team list --json -``` - All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/schema.md b/plugins/sentry-cli/skills/sentry-cli/references/schema.md new file mode 100644 index 000000000..8fce7b515 --- /dev/null +++ b/plugins/sentry-cli/skills/sentry-cli/references/schema.md @@ -0,0 +1,41 @@ +--- +name: sentry-cli-schema +version: 0.25.0-dev.0 +description: Browse the Sentry API schema +requires: + bins: ["sentry"] + auth: true +--- + +# Schema Commands + +Browse the Sentry API schema + +### `sentry schema ` + +Browse the Sentry API schema + +**Flags:** +- `--all - Show all endpoints in a flat list` +- `-q, --search - Search endpoints by keyword` + +**Examples:** + +```bash +# List all API resources +sentry schema + +# Browse issue endpoints +sentry schema issues + +# View details for a specific operation +sentry schema issues list + +# Search for monitoring-related endpoints +sentry schema --search monitor + +# Flat list of every endpoint +sentry schema --all +``` + +All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/sourcemap.md b/plugins/sentry-cli/skills/sentry-cli/references/sourcemap.md index 85ca449a9..f0001e5c1 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/sourcemap.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/sourcemap.md @@ -1,13 +1,13 @@ --- name: sentry-cli-sourcemap version: 0.25.0-dev.0 -description: Sentry CLI sourcemap commands +description: Manage sourcemaps requires: bins: ["sentry"] auth: true --- -# sourcemap Commands +# Sourcemap Commands Manage sourcemaps diff --git a/plugins/sentry-cli/skills/sentry-cli/references/span.md b/plugins/sentry-cli/skills/sentry-cli/references/span.md new file mode 100644 index 000000000..72818ea8d --- /dev/null +++ b/plugins/sentry-cli/skills/sentry-cli/references/span.md @@ -0,0 +1,80 @@ +--- +name: sentry-cli-span +version: 0.25.0-dev.0 +description: List and view spans in projects or traces +requires: + bins: ["sentry"] + auth: true +--- + +# Span Commands + +List and view spans in projects or traces + +### `sentry span list ` + +List spans in a project or trace + +**Flags:** +- `-n, --limit - Number of spans (<=1000) - (default: "25")` +- `-q, --query - Filter spans (e.g., "op:db", "duration:>100ms", "project:backend")` +- `-s, --sort - Sort order: date, duration - (default: "date")` +- `-t, --period - Time period (e.g., "1h", "24h", "7d", "30d") - (default: "7d")` +- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` +- `-c, --cursor - Navigate pages: "next", "prev", "first" (or raw cursor string)` + +**JSON Fields** (use `--json --fields` to select specific fields): + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Span ID | +| `parent_span` | string \| null | Parent span ID | +| `span.op` | string \| null | Span operation (e.g. http.client, db) | +| `description` | string \| null | Span description | +| `span.duration` | number \| null | Duration (ms) | +| `timestamp` | string | Timestamp (ISO 8601) | +| `project` | string | Project slug | +| `transaction` | string \| null | Transaction name | +| `trace` | string | Trace ID | + +**Examples:** + +```bash +# List recent spans in the current project +sentry span list + +# Find all DB spans +sentry span list -q "op:db" + +# Slow spans in the last 24 hours +sentry span list -q "duration:>100ms" --period 24h + +# List spans within a specific trace +sentry span list abc123def456abc123def456abc12345 + +# Paginate through results +sentry span list -c next +``` + +### `sentry span view ` + +View details of specific spans + +**Flags:** +- `--spans - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")` +- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` + +**Examples:** + +```bash +# View a single span +sentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 + +# View multiple spans at once +sentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 b2c3d4e5f6789012 + +# With explicit org/project +sentry span view my-org/backend/abc123def456abc123def456abc12345 a1b2c3d4e5f67890 +``` + +All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/team.md b/plugins/sentry-cli/skills/sentry-cli/references/team.md new file mode 100644 index 000000000..0a7e17177 --- /dev/null +++ b/plugins/sentry-cli/skills/sentry-cli/references/team.md @@ -0,0 +1,48 @@ +--- +name: sentry-cli-team +version: 0.25.0-dev.0 +description: Work with Sentry teams +requires: + bins: ["sentry"] + auth: true +--- + +# Team Commands + +Work with Sentry teams + +### `sentry team list ` + +List teams + +**Flags:** +- `-n, --limit - Maximum number of teams to list - (default: "30")` +- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` +- `-c, --cursor - Navigate pages: "next", "prev", "first" (or raw cursor string)` + +**JSON Fields** (use `--json --fields` to select specific fields): + +| Field | Type | Description | +|-------|------|-------------| +| `id` | string | Team ID | +| `slug` | string | Team slug | +| `name` | string | Team name | +| `dateCreated` | string | Creation date (ISO 8601) | +| `isMember` | boolean | Whether you are a member | +| `teamRole` | string \| null | Your role in the team | +| `memberCount` | number | Number of members | + +**Examples:** + +```bash +# List teams +sentry team list my-org/ + +# Paginate through teams +sentry team list my-org/ -c next + +# Output as JSON +sentry team list --json +``` + +All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags. diff --git a/plugins/sentry-cli/skills/sentry-cli/references/traces.md b/plugins/sentry-cli/skills/sentry-cli/references/trace.md similarity index 55% rename from plugins/sentry-cli/skills/sentry-cli/references/traces.md rename to plugins/sentry-cli/skills/sentry-cli/references/trace.md index 4bc2109ec..1d463e56d 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/traces.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/trace.md @@ -1,84 +1,16 @@ --- -name: sentry-cli-traces +name: sentry-cli-trace version: 0.25.0-dev.0 -description: List and inspect traces and spans for performance analysis +description: View distributed traces requires: bins: ["sentry"] auth: true --- -# Trace & Span Commands - -List and view spans in projects or traces +# Trace Commands View distributed traces -### `sentry span list ` - -List spans in a project or trace - -**Flags:** -- `-n, --limit - Number of spans (<=1000) - (default: "25")` -- `-q, --query - Filter spans (e.g., "op:db", "duration:>100ms", "project:backend")` -- `-s, --sort - Sort order: date, duration - (default: "date")` -- `-t, --period - Time period (e.g., "1h", "24h", "7d", "30d") - (default: "7d")` -- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` -- `-c, --cursor - Navigate pages: "next", "prev", "first" (or raw cursor string)` - -**JSON Fields** (use `--json --fields` to select specific fields): - -| Field | Type | Description | -|-------|------|-------------| -| `id` | string | Span ID | -| `parent_span` | string \| null | Parent span ID | -| `span.op` | string \| null | Span operation (e.g. http.client, db) | -| `description` | string \| null | Span description | -| `span.duration` | number \| null | Duration (ms) | -| `timestamp` | string | Timestamp (ISO 8601) | -| `project` | string | Project slug | -| `transaction` | string \| null | Transaction name | -| `trace` | string | Trace ID | - -**Examples:** - -```bash -# List recent spans in the current project -sentry span list - -# Find all DB spans -sentry span list -q "op:db" - -# Slow spans in the last 24 hours -sentry span list -q "duration:>100ms" --period 24h - -# List spans within a specific trace -sentry span list abc123def456abc123def456abc12345 - -# Paginate through results -sentry span list -c next -``` - -### `sentry span view ` - -View details of specific spans - -**Flags:** -- `--spans - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")` -- `-f, --fresh - Bypass cache, re-detect projects, and fetch fresh data` - -**Examples:** - -```bash -# View a single span -sentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 - -# View multiple spans at once -sentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 b2c3d4e5f6789012 - -# With explicit org/project -sentry span view my-org/backend/abc123def456abc123def456abc12345 a1b2c3d4e5f67890 -``` - ### `sentry trace list ` List recent traces in a project diff --git a/plugins/sentry-cli/skills/sentry-cli/references/trials.md b/plugins/sentry-cli/skills/sentry-cli/references/trial.md similarity index 94% rename from plugins/sentry-cli/skills/sentry-cli/references/trials.md rename to plugins/sentry-cli/skills/sentry-cli/references/trial.md index c140aae94..70a13e56f 100644 --- a/plugins/sentry-cli/skills/sentry-cli/references/trials.md +++ b/plugins/sentry-cli/skills/sentry-cli/references/trial.md @@ -1,7 +1,7 @@ --- -name: sentry-cli-trials +name: sentry-cli-trial version: 0.25.0-dev.0 -description: List and start product trials +description: Manage product trials requires: bins: ["sentry"] auth: true diff --git a/script/generate-skill.ts b/script/generate-skill.ts index 32e34e03e..8530d4602 100644 --- a/script/generate-skill.ts +++ b/script/generate-skill.ts @@ -7,7 +7,7 @@ * * Produces: * - SKILL.md: compact index with agent guidance + command summaries - * - references/*.md: full per-group command documentation + * - references/*.md: full per-route command documentation * - index.json: skill discovery manifest for .well-known * * Usage: @@ -82,66 +82,6 @@ const PACKAGE_MANAGER_REGEX = / = { - auth: "auth", - org: "organizations", - project: "projects", - issue: "issues", - event: "events", - api: "api", - dashboard: "dashboards", - team: "teams", - repo: "teams", - log: "logs", - trace: "traces", - span: "traces", - trial: "trials", - cli: "setup", - init: "setup", - schema: "setup", -}; - -/** Display titles for reference file groups */ -const REFERENCE_TITLES: Record = { - auth: "Authentication Commands", - organizations: "Organization Commands", - projects: "Project Commands", - issues: "Issue Commands", - events: "Event Commands", - api: "API Command", - dashboards: "Dashboard Commands", - teams: "Team & Repository Commands", - logs: "Log Commands", - traces: "Trace & Span Commands", - trials: "Trial Commands", - setup: "CLI Setup Commands", -}; - -/** Brief descriptions for reference file frontmatter */ -const REFERENCE_DESCRIPTIONS: Record = { - auth: "Authenticate with Sentry via OAuth or API tokens", - organizations: "List and view Sentry organizations", - projects: "Create, list, and manage Sentry projects", - issues: "List, view, and analyze Sentry issues with AI", - events: "View individual error events", - api: "Make arbitrary Sentry API requests", - dashboards: "List, view, and create Sentry dashboards", - teams: "List teams and repositories in a Sentry organization", - logs: "List and stream logs from Sentry projects", - traces: "List and inspect traces and spans for performance analysis", - trials: "List and start product trials", - setup: "Configure the CLI, install integrations, and manage upgrades", -}; - /** * Preferred display order for routes in the SKILL.md index. * Routes not listed here appear after these in alphabetical order. @@ -623,11 +563,25 @@ function generateFullCommandDoc(cmd: CommandInfo): string { return lines.join("\n"); } +/** Known acronyms that should be fully uppercased in titles */ +const TITLE_ACRONYMS = new Set(["api", "cli"]); + +/** Capitalize a route name for display, uppercasing known acronyms */ +function capitalize(s: string): string { + if (TITLE_ACRONYMS.has(s)) { + return s.toUpperCase(); + } + return s.charAt(0).toUpperCase() + s.slice(1); +} + /** - * Generate a complete reference file for a group of routes. + * Generate a complete reference file for a single route. * - * @param refName - Reference file key (e.g., "issues", "traces") - * @param groupRoutes - Routes belonging to this reference group + * Title and description are derived from route metadata — no manual + * mapping required. Each route produces its own reference file. + * + * @param refName - Reference file key (same as route name) + * @param groupRoutes - Single-element array with the route * @param version - CLI version for frontmatter */ function generateReferenceFile( @@ -635,9 +589,9 @@ function generateReferenceFile( groupRoutes: RouteInfo[], version: string ): string { - const title = REFERENCE_TITLES[refName] ?? `${refName} Commands`; - const description = - REFERENCE_DESCRIPTIONS[refName] ?? `Sentry CLI ${refName} commands`; + const route = groupRoutes[0]; + const title = `${capitalize(refName)} Commands`; + const description = route.brief; const lines: string[] = []; @@ -655,18 +609,13 @@ function generateReferenceFile( lines.push(`# ${title}`); lines.push(""); - // Brief from each route - for (const route of groupRoutes) { - lines.push(route.brief); - lines.push(""); - } + lines.push(route.brief); + lines.push(""); // Full command docs - for (const route of groupRoutes) { - for (const cmd of route.commands) { - lines.push(generateFullCommandDoc(cmd)); - lines.push(""); - } + for (const cmd of route.commands) { + lines.push(generateFullCommandDoc(cmd)); + lines.push(""); } // Note about global flags @@ -693,7 +642,7 @@ function generateCompactCommandLine(cmd: CommandInfo): string { /** * Generate the compact command reference section for SKILL.md. - * Each route group gets a heading, brief, command list, and a pointer to the reference file. + * Each route gets a heading, brief, command list, and a pointer to its reference file. */ function generateCompactCommandsSection( routeInfos: RouteInfo[], @@ -710,8 +659,7 @@ function generateCompactCommandsSection( continue; } - const titleCase = route.name.charAt(0).toUpperCase() + route.name.slice(1); - lines.push(`### ${titleCase}`); + lines.push(`### ${capitalize(route.name)}`); lines.push(""); lines.push(route.brief); lines.push(""); @@ -720,9 +668,8 @@ function generateCompactCommandsSection( lines.push(generateCompactCommandLine(cmd)); } - // Add reference file pointer (fallback matches groupRoutesByReference) - const refName = ROUTE_TO_REFERENCE[route.name] ?? route.name; - const refFile = referenceFiles.get(refName); + // Add reference file pointer (1:1 route-to-file mapping) + const refFile = referenceFiles.get(route.name); if (refFile) { lines.push(""); lines.push(`→ Full flags and examples: \`references/${refFile}\``); @@ -782,8 +729,11 @@ async function generateSupplementarySections(): Promise { type GeneratedFiles = Map; /** - * Group routes by their reference file mapping. - * Returns a map of reference file name → array of routes. + * Map each route to its own reference file (1:1 mapping). + * + * Every visible route produces its own reference file, matching the + * strategy used by generate-command-docs.ts. This eliminates the + * need for manual route-to-reference mappings that can go stale. */ function groupRoutesByReference( routeInfos: RouteInfo[] @@ -793,16 +743,13 @@ function groupRoutesByReference( if (route.name === "help") { continue; } - const refName = ROUTE_TO_REFERENCE[route.name] ?? route.name; - const existing = groups.get(refName) ?? []; - existing.push(route); - groups.set(refName, existing); + groups.set(route.name, [route]); } return groups; } /** - * Generate all skill files: SKILL.md index + per-group reference files. + * Generate all skill files: SKILL.md index + per-route reference files. * * @returns Map of relative file paths → content */ @@ -816,7 +763,7 @@ async function generateAllSkillFiles( const supplementary = await generateSupplementarySections(); const agentGuidance = await loadAgentGuidance(); - // Group routes into reference files + // Map each route to its own reference file (1:1) const routeGroups = groupRoutesByReference(routeInfos); // Generate reference files diff --git a/test/lib/agent-skills.test.ts b/test/lib/agent-skills.test.ts index f3374be79..fc78fcb45 100644 --- a/test/lib/agent-skills.test.ts +++ b/test/lib/agent-skills.test.ts @@ -95,7 +95,7 @@ describe("agent-skills", () => { "references" ); expect(existsSync(refsDir)).toBe(true); - expect(existsSync(join(refsDir, "issues.md"))).toBe(true); + expect(existsSync(join(refsDir, "issue.md"))).toBe(true); }); test("creates intermediate directories", async () => {