diff --git a/.oxfmtrc.json b/.oxfmtrc.json index cfdcf9ee5..eb8570929 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -15,6 +15,7 @@ "packages/cli/CONTRIBUTING.md", "packages/cli/CHANGELOG.md", "packages/cli/AGENTS.md", + "packages/mcp-core/src/command-catalog.json", "packages/mcp-server-mocks/src/fixtures/**", "packages/codemod-cli3to4/tests/**", "**/worker-configuration.d.ts", diff --git a/packages/cli/DEVELOPMENT.md b/packages/cli/DEVELOPMENT.md index 8a29e6827..9aa99a3df 100644 --- a/packages/cli/DEVELOPMENT.md +++ b/packages/cli/DEVELOPMENT.md @@ -129,6 +129,15 @@ and any declared `permission` into the command's permission class, and `check:command-access` fails when a declaration contradicts the requests or a command declares no exposure. +`generate:command-catalog` (part of `generate:docs`) writes +`packages/mcp-core/src/command-catalog.json` from the same introspection +(`src/lib/command-catalog.ts`): for each command whose exposure is not +`hidden`, its permission class, exposure, parameters as JSON Schema, +completion kinds, local-path flags, examples, output fields, and API +operations. MCP servers import it from `@sentry/mcp-core/command-catalog` +and read it instead of building schemas at runtime. The file is committed; +`check:command-catalog` (in `ci:policy`) fails when it is stale. + Introspection derives canonical command paths, registered aliases, and group membership from the route tree. Groups collect their public commands' generated references, so adding a command requires no separate group mapping. A related API diff --git a/packages/cli/package.json b/packages/cli/package.json index 570c8ce90..1eaedadd8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -79,6 +79,7 @@ "generate:docs-sections": "tsx script/generate.ts docs-sections", "generate:schema": "tsx script/generate.ts schema", "generate:command-api": "tsx script/generate.ts command-api", + "generate:command-catalog": "tsx script/generate.ts command-catalog", "generate:command-docs": "tsx script/generate.ts command-docs", "eval:skill": "pnpm tsx script/eval-skill.ts", "bench": "pnpm tsx script/bench.ts", @@ -96,7 +97,8 @@ "check:installer-docs": "pnpm tsx script/check-installer-docs.ts", "check:destructive": "pnpm tsx script/check-destructive-commands.ts", "check:command-access": "pnpm tsx script/check-command-access.ts", - "ci:policy": "pnpm run check:patches && pnpm run check:deps && pnpm run check:errors && pnpm run check:fragments && pnpm run check:docs-sections && pnpm run check:env-coverage && pnpm run check:stale-refs && pnpm run check:doc-examples && pnpm run check:installer-docs && pnpm run check:destructive && pnpm run check:command-access" + "check:command-catalog": "tsx script/generate.ts command-catalog --check", + "ci:policy": "pnpm run check:patches && pnpm run check:deps && pnpm run check:errors && pnpm run check:fragments && pnpm run check:docs-sections && pnpm run check:env-coverage && pnpm run check:stale-refs && pnpm run check:doc-examples && pnpm run check:installer-docs && pnpm run check:destructive && pnpm run check:command-access && pnpm run check:command-catalog" }, "devDependencies": { "@anthropic-ai/sdk": "^0.39.0", diff --git a/packages/cli/script/generate-command-catalog.ts b/packages/cli/script/generate-command-catalog.ts new file mode 100644 index 000000000..c73f56ca5 --- /dev/null +++ b/packages/cli/script/generate-command-catalog.ts @@ -0,0 +1,58 @@ +/** + * Generate `command-catalog.json` (`src/lib/command-catalog.ts`) for the MCP + * servers, which read it instead of building schemas at runtime. It is + * written to mcp-core, where mcp-cloudflare can import it, and committed, so + * `--check` fails when it is stale. + * + * It runs after `command-api` in `script/generate.ts`, so it reads that + * step's output from disk: the route tree's own imports of those files were + * stubs or the previous run's when the tree loaded. + */ + +import { readFile, writeFile } from "node:fs/promises"; +import { routes } from "../src/app.js"; +import type { ApiReference } from "../src/lib/api-schema.js"; +import type { ApiAccess } from "../src/lib/command-access.js"; +import { extractCommandCatalog } from "../src/lib/command-catalog.js"; +import type { RouteMap } from "../src/lib/introspect.js"; + +const COMMAND_CATALOG_PATH = "../mcp-core/src/command-catalog.json"; + +async function readJson(path: string): Promise { + return JSON.parse(await readFile(path, "utf8")) as T; +} + +/** Write the catalog, or with `check`, exit 1 when the committed one is stale. */ +export async function emit({ check }: { check: boolean }): Promise { + const catalog = extractCommandCatalog( + routes as unknown as RouteMap, + await readJson>( + "src/generated/command-api.json", + ), + await readJson>( + "src/generated/command-api-access.json", + ), + ); + const content = `${JSON.stringify(catalog, null, 2)}\n`; + + if (check) { + const current = await readFile(COMMAND_CATALOG_PATH, "utf8").catch( + () => "", + ); + if (current !== content) { + console.error( + `✗ ${COMMAND_CATALOG_PATH} is stale. Run \`pnpm run generate:command-catalog\` in packages/cli and commit the result.`, + ); + process.exitCode = 1; + } else { + console.log( + `✓ ${COMMAND_CATALOG_PATH} is up to date (${catalog.commands.length} commands)`, + ); + } + return; + } + await writeFile(COMMAND_CATALOG_PATH, content); + console.log( + `Generated ${COMMAND_CATALOG_PATH} (${catalog.commands.length} commands)`, + ); +} diff --git a/packages/cli/script/generate.ts b/packages/cli/script/generate.ts index 585af2def..c8b65770f 100644 --- a/packages/cli/script/generate.ts +++ b/packages/cli/script/generate.ts @@ -194,9 +194,8 @@ const TREE_STEPS: readonly Step[] = [ { name: "docs-sections", load: () => import("./generate-docs-sections.js") }, { name: "skill", load: () => import("./generate-skill.js") }, { name: "sdk", load: () => import("./generate-sdk.js") }, - // Last: its emit waits for the worker `prepare` starts, and no step reads - // `command-api.json` or `command-api-access.json` back (only the CLI does, - // at runtime). + // Late: its emit waits for the worker `prepare` starts. Only + // `command-catalog` reads its output back. { name: "command-api", load: () => import("./generate-command-api.js"), @@ -204,6 +203,12 @@ const TREE_STEPS: readonly Step[] = [ void commandApiAnalysis(after("schema")); }, }, + // Reads `command-api.json` and `command-api-access.json` from disk, so it + // runs after `command-api`. + { + name: "command-catalog", + load: () => import("./generate-command-catalog.js"), + }, ]; const STEP_NAMES = [...PRE_TREE_STEPS, ...TREE_STEPS].map((step) => step.name); diff --git a/packages/cli/src/lib/command-catalog.ts b/packages/cli/src/lib/command-catalog.ts new file mode 100644 index 000000000..4c3a19532 --- /dev/null +++ b/packages/cli/src/lib/command-catalog.ts @@ -0,0 +1,204 @@ +/** + * The command catalog: what agents need to find and run each command, from + * the route tree's introspection. Build-time only: `generate:command-catalog` + * writes it to `@sentry/mcp-core/command-catalog`, and MCP servers read that + * generated JSON instead of building schemas at runtime. + * + * Commands with exposure `hidden` are left out: no MCP server lists them. + */ + +import type { + CommandCatalog, + CommandCatalogEntry, + JsonSchema, +} from "@sentry/mcp-core/command-catalog"; +import generatedCommandApi from "../generated/command-api.json"; +import type { ApiReference } from "./api-schema.js"; +import type { ApiAccess } from "./command-access.js"; +import { CHOICE_TARGET } from "./completion-target.js"; +import { + argumentCompletion, + buildCommandInfo, + type Command, + type FlagDef, + isCommand, + type PositionalParam, + publicTargetPaths, + type RouteMap, +} from "./introspect.js"; + +/** + * Type of one positional or flag value. Only Stricli `enum` flags reject + * other values; the values of a `choice` parser are suggestions. + */ +function valueSchema( + def: Pick, + enumValues?: readonly string[], +): JsonSchema { + if (enumValues) { + return { type: "string", enum: [...enumValues] }; + } + const { kind, values } = argumentCompletion(def.parse); + if (kind === CHOICE_TARGET && values) { + return { type: "string", examples: [...values] }; + } + // The same inference as the generated SDK's parameter types. + const numeric = + def.placeholder === "number" || + typeof def.default === "number" || + (typeof def.default === "string" && + def.default !== "" && + !Number.isNaN(Number(def.default))); + return { type: numeric ? "number" : "string" }; +} + +/** JSON Schema of one flag. */ +function flagSchema(def: FlagDef): JsonSchema { + const value: JsonSchema = + def.kind === "boolean" + ? { type: "boolean" } + : valueSchema(def, def.kind === "enum" ? def.values : undefined); + const schema: JsonSchema = def.variadic + ? { type: "array", items: value } + : value; + if (def.brief) schema.description = def.brief; + if (def.default !== undefined) { + schema.default = + value.type === "number" ? Number(def.default) : def.default; + } + return schema; +} + +/** JSON Schema of one positional. */ +function positionalSchema(param: PositionalParam, index: number): JsonSchema { + return { + ...valueSchema(param), + title: param.placeholder ?? `arg${index}`, + ...(param.brief ? { description: param.brief } : {}), + }; +} + +/** JSON Schema of a command's positionals and visible flags. */ +function parametersSchema(command: Command): JsonSchema { + const { positional, flags = {} } = command.parameters; + const properties: Record = {}; + const required: string[] = []; + + if (positional?.kind === "tuple" && positional.parameters.length > 0) { + const minItems = positional.parameters.filter((p) => !p.optional).length; + properties.positional = { + type: "array", + prefixItems: positional.parameters.map(positionalSchema), + items: false, + ...(minItems > 0 ? { minItems } : {}), + }; + if (minItems > 0) required.push("positional"); + } else if (positional?.kind === "array") { + properties.positional = { + type: "array", + items: positionalSchema(positional.parameter, 0), + }; + } + + const flagProperties: Record = {}; + const requiredFlags: string[] = []; + for (const [name, def] of Object.entries(flags)) { + if (def.hidden) continue; + flagProperties[name] = flagSchema(def); + const optional = def.optional ?? def.kind === "boolean"; + if (!optional && def.default === undefined) requiredFlags.push(name); + } + if (Object.keys(flagProperties).length > 0) { + properties.flags = { + type: "object", + properties: flagProperties, + ...(requiredFlags.length > 0 ? { required: requiredFlags } : {}), + additionalProperties: false, + }; + if (requiredFlags.length > 0) required.push("flags"); + } + + return { + type: "object", + properties, + ...(required.length > 0 ? { required } : {}), + additionalProperties: false, + }; +} + +/** Completion kinds of a command's positionals and visible flags. */ +function completions(command: Command): CommandCatalogEntry["completions"] { + const { positional, flags = {} } = command.parameters; + const params = + positional?.kind === "tuple" + ? positional.parameters + : positional + ? [positional.parameter] + : []; + const positionalKinds = params.map( + (param) => argumentCompletion(param.parse).kind, + ); + const flagKinds: Record = {}; + for (const [name, def] of Object.entries(flags)) { + if (def.hidden || def.kind === "boolean") continue; + const { kind } = argumentCompletion( + def.parse, + def.kind === "enum" ? def.values : undefined, + ); + if (kind) flagKinds[name] = kind; + } + const result: CommandCatalogEntry["completions"] = { + ...(positionalKinds.some((kind) => kind !== null) + ? { positional: positionalKinds } + : {}), + ...(Object.keys(flagKinds).length > 0 ? { flags: flagKinds } : {}), + }; + return Object.keys(result).length > 0 ? result : undefined; +} + +/** + * Build the catalog of every command an MCP server may list: each public + * command whose exposure is not `hidden`, sorted by path. + * + * @param routeMap - Top-level Stricli route map + * @param apiByCommand - API references by command path (`command-api.json`) + * @param apiAccessByCommand - API request class by command path + * (`command-api-access.json`); introspection's import when omitted + */ +export function extractCommandCatalog( + routeMap: RouteMap, + apiByCommand: Readonly< + Record + > = generatedCommandApi, + apiAccessByCommand?: Readonly>, +): CommandCatalog { + const commands: CommandCatalogEntry[] = []; + for (const [command, segments] of publicTargetPaths(routeMap)) { + if (!isCommand(command)) continue; + const info = buildCommandInfo( + command, + `sentry ${segments.join(" ")}`, + apiAccessByCommand, + ); + const { exposure } = info; + if (exposure === "hidden") continue; + const localPathFlags = info.flags + .filter((flag) => flag.localPath && !flag.hidden) + .map((flag) => flag.name); + const completion = completions(command); + commands.push({ + path: info.path, + brief: info.brief, + permission: info.permission, + exposure, + parameters: parametersSchema(command), + ...(completion ? { completions: completion } : {}), + ...(localPathFlags.length > 0 ? { localPathFlags } : {}), + examples: info.examples, + ...(info.jsonFields ? { outputFields: info.jsonFields } : {}), + apiOperations: [...(apiByCommand[info.path] ?? [])], + }); + } + commands.sort((a, b) => a.path.localeCompare(b.path)); + return { commands }; +} diff --git a/packages/cli/src/lib/introspect.ts b/packages/cli/src/lib/introspect.ts index 484b85590..6d00c9395 100644 --- a/packages/cli/src/lib/introspect.ts +++ b/packages/cli/src/lib/introspect.ts @@ -496,7 +496,7 @@ export type CommandCompletions = Record; * The kind and, for `choice` and `choice-list`, the values of one * argument: those of an `enum` flag, or the ones its parser completes. */ -function argumentCompletion( +export function argumentCompletion( parse: unknown, enumValues?: readonly string[], ): { kind: CompletionTarget | null; values?: readonly string[] } { diff --git a/packages/cli/test/lib/command-catalog.test.ts b/packages/cli/test/lib/command-catalog.test.ts new file mode 100644 index 000000000..634c83e9d --- /dev/null +++ b/packages/cli/test/lib/command-catalog.test.ts @@ -0,0 +1,187 @@ +/** + * The generated command catalog matches the route tree's introspection. + */ + +import { readFileSync } from "node:fs"; +import type { CommandCatalog } from "@sentry/mcp-core/command-catalog"; +import { describe, expect, test } from "vitest"; +import { routes } from "../../src/app.js"; +import generatedCommandApi from "../../src/generated/command-api.json"; +import { extractCommandCatalog } from "../../src/lib/command-catalog.js"; +import { + choiceParser, + parseFilePath, + parseOrgSlug, +} from "../../src/lib/completion-target.js"; +import { + type Command, + extractAllRoutes, + type RouteMap, +} from "../../src/lib/introspect.js"; + +const tree = routes as unknown as RouteMap; + +function committedCatalog(): CommandCatalog { + return JSON.parse( + readFileSync( + new URL("../../../mcp-core/src/command-catalog.json", import.meta.url), + "utf8", + ), + ); +} + +describe("command catalog", () => { + test("the committed file is the catalog of the current route tree", () => { + expect(committedCatalog()).toEqual(extractCommandCatalog(tree)); + }); + + test("lists every public command that is not hidden, with its introspection", () => { + const catalog = new Map( + extractCommandCatalog(tree).commands.map((entry) => [entry.path, entry]), + ); + const api: Record = generatedCommandApi; + const listed = extractAllRoutes(tree) + .flatMap((route) => route.commands) + .filter((info) => info.exposure !== "hidden"); + + const byPath = (a: string, b: string) => a.localeCompare(b); + expect([...catalog.keys()].sort(byPath)).toEqual( + listed.map((info) => info.path).sort(byPath), + ); + for (const info of listed) { + const entry = catalog.get(info.path); + const flags = info.flags.filter((flag) => !flag.hidden); + expect({ + brief: entry?.brief, + permission: entry?.permission, + exposure: entry?.exposure, + examples: entry?.examples, + outputFields: entry?.outputFields, + localPathFlags: entry?.localPathFlags ?? [], + apiOperations: entry?.apiOperations, + }).toEqual({ + brief: info.brief, + permission: info.permission, + exposure: info.exposure, + examples: info.examples, + outputFields: info.jsonFields, + localPathFlags: flags + .filter((flag) => flag.localPath) + .map((flag) => flag.name), + apiOperations: api[info.path] ?? [], + }); + expect( + Object.keys(entry?.parameters.properties?.flags?.properties ?? {}), + ).toEqual(flags.map((flag) => flag.name)); + expect( + entry?.parameters.properties?.positional?.prefixItems?.length ?? + (entry?.parameters.properties?.positional ? 1 : 0), + ).toBe(info.positionals.length); + } + }); + + test("describes positionals and visible flags as JSON Schema", () => { + const command: Command = { + brief: "Do a thing", + parameters: { + positional: { + kind: "tuple", + parameters: [ + { placeholder: "org", brief: "Organization", parse: parseOrgSlug }, + { placeholder: "name", optional: true }, + ], + }, + flags: { + limit: { kind: "parsed", brief: "Max items", default: "25" }, + sort: { kind: "enum", values: ["new", "old"], default: "new" }, + period: { + kind: "parsed", + brief: "Time range", + parse: choiceParser(["24h", "7d"]), + optional: true, + }, + file: { kind: "parsed", brief: "Input", parse: parseFilePath }, + tag: { kind: "parsed", variadic: true, optional: true }, + dry: { kind: "boolean", default: false }, + secret: { kind: "boolean", hidden: true }, + }, + }, + __exposure: "stdio-only", + }; + const hidden: Command = { ...command, __exposure: undefined }; + const thing: RouteMap = { + brief: "Things", + getAllEntries: () => [ + { name: { original: "do" }, target: command, hidden: false }, + { name: { original: "internal" }, target: hidden, hidden: false }, + ], + }; + const root: RouteMap = { + brief: "CLI", + getAllEntries: () => [ + { name: { original: "thing" }, target: thing, hidden: false }, + ], + }; + + expect( + extractCommandCatalog(root, { "sentry thing do": [{ fn: "doThing" }] }), + ).toEqual({ + commands: [ + { + path: "sentry thing do", + brief: "Do a thing", + permission: "read", + exposure: "stdio-only", + parameters: { + type: "object", + properties: { + positional: { + type: "array", + prefixItems: [ + { type: "string", title: "org", description: "Organization" }, + { type: "string", title: "name" }, + ], + items: false, + minItems: 1, + }, + flags: { + type: "object", + properties: { + limit: { + type: "number", + description: "Max items", + default: 25, + }, + sort: { + type: "string", + enum: ["new", "old"], + default: "new", + }, + period: { + type: "string", + examples: ["24h", "7d"], + description: "Time range", + }, + file: { type: "string", description: "Input" }, + tag: { type: "array", items: { type: "string" } }, + dry: { type: "boolean", default: false }, + }, + required: ["file"], + additionalProperties: false, + }, + }, + required: ["positional", "flags"], + additionalProperties: false, + }, + completions: { + positional: ["org", null], + flags: { sort: "choice", period: "choice", file: "file" }, + }, + localPathFlags: ["file"], + examples: [], + apiOperations: [{ fn: "doThing" }], + }, + ], + }); + }); +}); diff --git a/packages/mcp-core/package.json b/packages/mcp-core/package.json index d194b987d..d64b1bdea 100644 --- a/packages/mcp-core/package.json +++ b/packages/mcp-core/package.json @@ -29,6 +29,10 @@ "types": "./dist/api-client/index.d.ts", "default": "./dist/api-client/index.js" }, + "./command-catalog": { + "types": "./dist/command-catalog.d.ts", + "default": "./dist/command-catalog.js" + }, "./constants": { "types": "./dist/constants.d.ts", "default": "./dist/constants.js" diff --git a/packages/mcp-core/src/command-catalog.json b/packages/mcp-core/src/command-catalog.json new file mode 100644 index 000000000..d80b562b5 --- /dev/null +++ b/packages/mcp-core/src/command-catalog.json @@ -0,0 +1,15577 @@ +{ + "commands": [ + { + "path": "sentry agent-conversation list", + "brief": "List recent agent conversations", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "/ (all projects), /, or (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of conversations (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Any matching span selects its conversation; totals include all spans in selected projects and time range" + }, + "sort": { + "type": "string", + "enum": [ + "conversation.age", + "-conversation.age", + "conversation.timeSpan", + "-conversation.timeSpan", + "conversation.generationDuration", + "-conversation.generationDuration", + "conversation.errors", + "-conversation.errors", + "conversation.llmCalls", + "-conversation.llmCalls", + "conversation.toolCalls", + "-conversation.toolCalls", + "conversation.toolErrors", + "-conversation.toolErrors", + "conversation.inputTokens", + "-conversation.inputTokens", + "conversation.outputTokens", + "-conversation.outputTokens", + "conversation.totalTokens", + "-conversation.totalTokens", + "conversation.totalCost", + "-conversation.totalCost" + ], + "description": "One conversation field; prefix - for descending (default: -conversation.age; ID breaks ties)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: conversationId, webUrl, title, flow, errors, llmCalls, toolCalls, totalTokens, totalCost, startTimestamp, endTimestamp, traceCount, traceIds, firstInput, lastOutput, user, toolNames, toolErrors" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "sort": "choice", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List recent agent conversations\nsentry agent-conversation list", + "# Explicit organization (all projects)\nsentry agent-conversation list my-org/", + "# One project\nsentry agent-conversation list my-org/my-project", + "# Find a project across organizations\nsentry agent-conversation list my-project", + "# Show more, last 24 hours\nsentry agent-conversation list --limit 50 --period 24h", + "# Sort by highest error count\nsentry agent-conversation list --sort -conversation.errors", + "# Sort by lowest total cost\nsentry agent-conversation list --sort conversation.totalCost", + "# Find conversations with errors\nsentry agent-conversation list -q \"conversation.errors:>0\"", + "# Find conversations for an agent\nsentry agent-conversation list -q \"gen_ai.agent.name:my-agent\"", + "# Find conversations with more than two tool calls\nsentry agent-conversation list -q \"conversation.toolCalls:>2\"", + "# Find conversations that used a tool\nsentry agent-conversation list -q \"gen_ai.tool.name:search_issues\"", + "# Paginate through project results\nsentry agent-conversation list my-org/my-project -c next" + ], + "outputFields": [ + { + "name": "conversationId", + "type": "string", + "optional": false + }, + { + "name": "webUrl", + "type": "string", + "optional": true + }, + { + "name": "title", + "type": "string | null", + "optional": true + }, + { + "name": "flow", + "type": "array", + "optional": false + }, + { + "name": "errors", + "type": "number", + "optional": false + }, + { + "name": "llmCalls", + "type": "number", + "optional": false + }, + { + "name": "toolCalls", + "type": "number", + "optional": false + }, + { + "name": "totalTokens", + "type": "number", + "optional": false + }, + { + "name": "totalCost", + "type": "number", + "optional": false + }, + { + "name": "startTimestamp", + "type": "number", + "optional": false + }, + { + "name": "endTimestamp", + "type": "number", + "optional": false + }, + { + "name": "traceCount", + "type": "number", + "optional": false + }, + { + "name": "traceIds", + "type": "array", + "optional": false + }, + { + "name": "firstInput", + "type": "string | null", + "optional": false + }, + { + "name": "lastOutput", + "type": "string | null", + "optional": false + }, + { + "name": "user", + "type": "object | null", + "optional": true + }, + { + "name": "toolNames", + "type": "array", + "optional": false + }, + { + "name": "toolErrors", + "type": "number", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationAiConversations" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry agent-conversation view", + "brief": "View an agent conversation transcript", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/conversation-id", + "description": "Organization slug (optional) and conversation ID" + } + }, + "flags": { + "type": "object", + "properties": { + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# View full transcript (organization auto-detected)\nsentry agent-conversation view conv-123", + "# Explicit organization\nsentry agent-conversation view my-org/conv-123", + "# JSON output\nsentry agent-conversation view my-org/conv-123 --json" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "retrieveOrganizationAiConversation" + } + ] + }, + { + "path": "sentry alert issues create", + "brief": "Create an issue alert rule", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "target", + "description": "/, auto-detected project, or (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Rule name" + }, + "condition": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trigger condition JSON or name such as first-seen (repeatable, or pass one JSON array)" + }, + "action": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Action object JSON (repeatable, or pass one JSON array)" + }, + "frequency": { + "type": "number", + "description": "Frequency in minutes", + "default": 30 + }, + "environment": { + "type": "string", + "description": "Environment filter" + }, + "filter": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter object JSON (repeatable, or pass one JSON array)" + }, + "filter-match": { + "type": "string", + "examples": [ + "all", + "any" + ], + "description": "Filter match mode: all or any" + }, + "owner": { + "type": "string", + "description": "Owner (team:user style value accepted by Sentry API)" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: org, id, name, status, dryRun, body, project" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + } + }, + "required": [ + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "name": "text", + "condition": "choice-list", + "action": "text", + "frequency": "text", + "environment": "environment", + "filter": "text", + "filter-match": "choice", + "owner": "owner", + "fields": "choice-list" + } + }, + "examples": [ + "# Alert on new issues and email a team\nsentry alert issues create my-org/my-project --name 'New Issues' --condition '{\"type\":\"first_seen_event\",\"comparison\":true,\"conditionResult\":true}' --action '{\"type\":\"email\",\"data\":{},\"config\":{\"targetType\":\"team\",\"targetIdentifier\":\"1\"}}'", + "# Preview a high-priority alert that emails a user at most every 30 minutes\nsentry alert issues create my-org/my-project --name 'High Priority' --condition '{\"type\":\"new_high_priority_issue\",\"comparison\":true,\"conditionResult\":true}' --action '{\"type\":\"email\",\"data\":{},\"config\":{\"targetType\":\"user\",\"targetIdentifier\":\"56789\"}}' --frequency 30 --dry-run", + "# Alert on new issues and regressions, using trigger names\nsentry alert issues create my-org/my-project --name 'New or Regressed' --condition first-seen,regression --action '{\"type\":\"email\",\"data\":{},\"config\":{\"targetType\":\"team\",\"targetIdentifier\":\"1\"}}'", + "# Alert when an issue sees more than 50 events in a day (filters only, checked on every event)\nsentry alert issues create my-org/my-project --name 'Busy Issues' --filter '{\"type\":\"event_frequency_count\",\"comparison\":{\"value\":50,\"interval\":\"1d\"},\"conditionResult\":true}' --action '{\"type\":\"email\",\"data\":{},\"config\":{\"targetType\":\"team\",\"targetIdentifier\":\"1\"}}' --frequency 1440" + ], + "outputFields": [ + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": true + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Rule status (active, disabled)", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "body", + "type": "object", + "description": "Request body that would be sent (--dry-run)", + "optional": true + }, + { + "name": "project", + "type": "string", + "description": "Project slug", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "createOrganizationWorkflow" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDetectors", + "note": "Known query context: query=type:error. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry alert issues delete", + "brief": "Delete an issue alert rule", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project/rule-id-or-name", + "description": "Rule id or name (same as view)" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dryRun, deleted, org, id, name, project" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Delete an issue alert rule (prompts for confirmation)\nsentry alert issues delete my-org/my-project/12345", + "# Delete a rule selected by name without prompting\nsentry alert issues delete my-org/my-project/'My Rule' --yes", + "# Preview the deletion\nsentry alert issues delete my-org/my-project/12345 --dry-run" + ], + "outputFields": [ + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "deleted", + "type": "boolean", + "description": "True when the rule was deleted", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + }, + { + "name": "project", + "type": "string", + "description": "Project slug", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "deleteOrganizationWorkflow" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationWorkflows" + } + ] + }, + { + "path": "sentry alert issues edit", + "brief": "Edit an issue alert rule", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project/rule-id-or-name", + "description": "Rule id or name (same as view)" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New rule name" + }, + "status": { + "type": "string", + "examples": [ + "active", + "disabled" + ], + "description": "Rule status: active or disabled" + }, + "condition": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trigger condition JSON or name such as first-seen (repeatable, or pass one JSON array)" + }, + "action": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Action object JSON (repeatable, or pass one JSON array)" + }, + "frequency": { + "type": "string", + "description": "Frequency in minutes" + }, + "environment": { + "type": "string", + "description": "Environment value (pass empty string to clear)" + }, + "filter": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter object JSON (repeatable, or pass one JSON array)" + }, + "filter-match": { + "type": "string", + "examples": [ + "all", + "any" + ], + "description": "Filter match mode: all or any" + }, + "owner": { + "type": "string", + "description": "Owner value (pass empty string to clear)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, name, organizationId, createdBy, dateCreated, dateUpdated, triggers, actionFilters, environment, config, detectorIds, enabled, lastTriggered, owner, org, project, status" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "name": "text", + "status": "choice", + "condition": "choice-list", + "action": "text", + "frequency": "text", + "environment": "environment", + "filter": "text", + "filter-match": "choice", + "owner": "owner", + "fields": "choice-list" + } + }, + "examples": [ + "# Rename an issue alert rule\nsentry alert issues edit my-org/my-project/12345 --name 'Prod errors'", + "# Disable a rule selected by name\nsentry alert issues edit my-org/my-project/'Old name' --status disabled", + "# Rename and enable a rule (organization and project auto-detected)\nsentry alert issues edit 12345 --name 'Renamed' --status active", + "# Replace the rule's conditions\nsentry alert issues edit my-org/my-project/12345 --condition '{\"type\":\"first_seen_event\",\"comparison\":true,\"conditionResult\":true}'" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + }, + { + "name": "organizationId", + "type": "string", + "optional": false + }, + { + "name": "createdBy", + "type": "string | null", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "optional": false + }, + { + "name": "dateUpdated", + "type": "string", + "optional": false + }, + { + "name": "triggers", + "type": "object | null", + "optional": false + }, + { + "name": "actionFilters", + "type": "array | null", + "optional": false + }, + { + "name": "environment", + "type": "string | null", + "optional": false + }, + { + "name": "config", + "type": "object", + "optional": false + }, + { + "name": "detectorIds", + "type": "array | null", + "optional": false + }, + { + "name": "enabled", + "type": "boolean", + "optional": false + }, + { + "name": "lastTriggered", + "type": "string | null", + "optional": false + }, + { + "name": "owner", + "type": "string | null", + "optional": false + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "project", + "type": "string", + "description": "Project slug", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Rule status (active, disabled)", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationWorkflow" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationWorkflows" + }, + { + "fn": "updateOrganizationWorkflow" + } + ] + }, + { + "path": "sentry alert issues list", + "brief": "List issue alert rules", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "/ (all projects), /, or (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "limit": { + "type": "number", + "description": "Maximum number of issue alert rules to list", + "default": 25 + }, + "query": { + "type": "string", + "description": "Filter rules by name" + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Pagination cursor (use \"next\" for next page, \"prev\" for previous)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "cursor": "choice", + "fields": "text" + } + }, + "examples": [ + "# List issue alert rules (project auto-detected)\nsentry alert issues list", + "# List issue alert rules for a project\nsentry alert issues list my-org/my-project", + "# Filter rules by name\nsentry alert issues list my-org/my-project --query \"spike\"", + "# List issue alert rules for all projects in an organization\nsentry alert issues list my-org/", + "# Find a project across organizations\nsentry alert issues list frontend" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationWorkflows" + } + ] + }, + { + "path": "sentry alert issues view", + "brief": "View an issue alert rule", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project/rule-id-or-name", + "description": "Issue alert rule ID or name" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open issue alert rules page in browser", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# View an issue alert rule by ID (organization and project auto-detected)\nsentry alert issues view 12345", + "# View by ID in an explicit project\nsentry alert issues view my-org/my-project/12345", + "# View by name\nsentry alert issues view my-org/my-project/'Error Spike'" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationWorkflows" + } + ] + }, + { + "path": "sentry alert metrics create", + "brief": "Create a metric alert rule", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "target", + "description": "Target project or organization" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Rule name" + }, + "query": { + "type": "string", + "description": "Metric query filter string" + }, + "aggregate": { + "type": "string", + "description": "Aggregate expression (for example count(), p95(span.duration))" + }, + "dataset": { + "type": "string", + "examples": [ + "errors", + "events", + "spans", + "logs", + "metrics", + "sessions" + ], + "description": "Dataset: errors, events, spans, logs, metrics, sessions (error-events is errors; transaction(s) routes to spans)" + }, + "time-window": { + "type": "string", + "examples": [ + "1", + "5", + "10", + "15", + "30", + "60", + "120", + "240", + "360", + "720", + "1440" + ], + "description": "Evaluation window in minutes" + }, + "trigger": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trigger object JSON (repeatable, or pass one JSON array)" + }, + "project": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project slug filter (repeatable or comma-separated)" + }, + "environment": { + "type": "string", + "description": "Environment filter" + }, + "owner": { + "type": "string", + "description": "Owner value accepted by Sentry API" + }, + "workflow": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alert (workflow) id to notify (repeatable or comma-separated)" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: org, id, name, status, dryRun, body" + } + }, + "required": [ + "name", + "query", + "aggregate", + "dataset", + "time-window" + ], + "additionalProperties": false + } + }, + "required": [ + "positional", + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "name": "text", + "query": "text", + "aggregate": "aggregate", + "dataset": "choice", + "time-window": "choice", + "trigger": "text", + "project": "project-list", + "environment": "environment", + "owner": "owner", + "workflow": "workflow-list", + "fields": "choice-list" + } + }, + "examples": [ + "# Alert when P95 span duration goes above 500ms\nsentry alert metrics create my-org/ --name 'P95 latency' --project my-project --query 'environment:prod' --aggregate 'p95(span.duration)' --dataset spans --time-window 5 --trigger '{\"alertThreshold\":500}'", + "# Preview an alert on any matching log line that notifies through an existing alert\nsentry alert metrics create my-org/ --name 'AI chat failures' --project my-project --query 'action:ai.chat result:error' --aggregate 'count()' --dataset logs --time-window 5 --trigger '{\"alertThreshold\":0,\"resolveThreshold\":0}' --workflow 12345 --dry-run" + ], + "outputFields": [ + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": true + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Rule status (active, disabled)", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "body", + "type": "object", + "description": "Request body that would be sent (--dry-run)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "createOrganizationProjectDetector" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry alert metrics delete", + "brief": "Delete a metric alert rule", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/rule-id-or-name", + "description": "Rule id or name (same as view)" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dryRun, deleted, org, id, name" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Delete a metric alert rule (prompts for confirmation)\nsentry alert metrics delete my-org/12345", + "# Delete a rule selected by name without prompting\nsentry alert metrics delete my-org/'P95 alert' --yes" + ], + "outputFields": [ + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "deleted", + "type": "boolean", + "description": "True when the rule was deleted", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "deleteOrganizationDetector" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDetector" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDetectors", + "note": "Known query context: query=type:metric_issue. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry alert metrics edit", + "brief": "Edit a metric alert rule", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/rule-id-or-name", + "description": "Rule id or name (same as view)" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "New rule name" + }, + "status": { + "type": "string", + "examples": [ + "active", + "disabled" + ], + "description": "active or disabled" + }, + "query": { + "type": "string", + "description": "Metric query filter" + }, + "aggregate": { + "type": "string", + "description": "Aggregate expression" + }, + "dataset": { + "type": "string", + "examples": [ + "errors", + "events", + "spans", + "logs", + "metrics", + "sessions" + ], + "description": "Dataset: errors, events, spans, logs, metrics, sessions (error-events is errors; transaction(s) routes to spans)" + }, + "time-window": { + "type": "string", + "examples": [ + "1", + "5", + "10", + "15", + "30", + "60", + "120", + "240", + "360", + "720", + "1440" + ], + "description": "Evaluation window in minutes" + }, + "trigger": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trigger object JSON (repeatable, or pass one JSON array)" + }, + "project": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Project slug filter (repeatable or comma-separated)" + }, + "environment": { + "type": "string", + "description": "Environment value (pass empty string to clear)" + }, + "owner": { + "type": "string", + "description": "Owner value (pass empty string to clear)" + }, + "workflow": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Replace connected alert (workflow) ids (repeatable or comma-separated; empty string disconnects all)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: owner, createdBy, latestGroup, description, id, projectId, name, type, workflowIds, dateCreated, dateUpdated, dataSources, conditionGroup, config, enabled, org, status" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "name": "text", + "status": "choice", + "query": "text", + "aggregate": "aggregate", + "dataset": "choice", + "time-window": "choice", + "trigger": "text", + "project": "project-list", + "environment": "environment", + "owner": "owner", + "workflow": "workflow-list", + "fields": "choice-list" + } + }, + "examples": [ + "# Rename a metric alert rule\nsentry alert metrics edit my-org/12345 --name 'Error budget'", + "# Disable a rule\nsentry alert metrics edit my-org/12345 --status disabled", + "# Change the query and time window\nsentry alert metrics edit my-org/12345 --query \"environment:prod event.type:error\" --time-window 15", + "# Switch the dataset\nsentry alert metrics edit my-org/12345 --time-window 15 --dataset spans" + ], + "outputFields": [ + { + "name": "owner", + "type": "object | null", + "optional": true + }, + { + "name": "createdBy", + "type": "string | null", + "optional": true + }, + { + "name": "latestGroup", + "type": "object | null", + "optional": true + }, + { + "name": "description", + "type": "string | null", + "optional": true + }, + { + "name": "id", + "type": "string", + "description": "Alert rule ID", + "optional": false + }, + { + "name": "projectId", + "type": "string | null", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Alert rule name", + "optional": false + }, + { + "name": "type", + "type": "string", + "optional": false + }, + { + "name": "workflowIds", + "type": "array | null", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "optional": false + }, + { + "name": "dateUpdated", + "type": "string", + "optional": false + }, + { + "name": "dataSources", + "type": "array | null", + "optional": false + }, + { + "name": "conditionGroup", + "type": "object | null", + "optional": false + }, + { + "name": "config", + "type": "object", + "optional": false + }, + { + "name": "enabled", + "type": "boolean", + "optional": false + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Rule status (active, disabled)", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDetector" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDetectors", + "note": "Known query context: query=type:metric_issue. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationDetector" + } + ] + }, + { + "path": "sentry alert metrics list", + "brief": "List metric alert rules", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "target", + "description": "/, / (project ignored), or (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "limit": { + "type": "number", + "description": "Maximum number of metric alert rules to list", + "default": 25 + }, + "query": { + "type": "string", + "description": "Filter rules by name" + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Pagination cursor (use \"next\" for next page, \"prev\" for previous)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "cursor": "choice", + "fields": "text" + } + }, + "examples": [ + "# List metric alert rules (organization auto-detected)\nsentry alert metrics list", + "# List metric alert rules for an organization\nsentry alert metrics list my-org/", + "# Fetch the next page\nsentry alert metrics list my-org/ -c next" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDetectors", + "note": "Known query context: query=type:metric_issue. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry alert metrics view", + "brief": "View a metric alert rule", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/rule-id-or-name", + "description": "Metric alert rule ID or name" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open metric alert rules page in browser", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# View a metric alert rule by ID (organization auto-detected)\nsentry alert metrics view 12345", + "# View by ID in an explicit organization\nsentry alert metrics view my-org/12345", + "# View by name\nsentry alert metrics view my-org/'P95 latency alert'", + "# Inspect native thresholds and notification workflows\nsentry alert metrics view my-org/12345 --json" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDetector" + }, + { + "fn": "getOrganizationWorkflow" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDetectors", + "note": "Known query context: query=type:metric_issue. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry api", + "brief": "Make an authenticated API request", + "permission": "method", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "endpoint", + "description": "API endpoint relative to /api/0/, or an absolute HTTP(S) URL" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "method": { + "type": "string", + "examples": [ + "GET", + "POST", + "PUT", + "DELETE", + "PATCH" + ], + "description": "The HTTP method for the request", + "default": "GET" + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "data": { + "type": "string", + "description": "Inline JSON body for the request (like curl -d)" + }, + "field": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Add a typed parameter (key=value, key[sub]=value, key[]=value)" + }, + "raw-field": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Add a string parameter without JSON parsing" + }, + "header": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Add a HTTP request header in key:value format" + }, + "input": { + "type": "string", + "description": "The file to use as body for the HTTP request (use \"-\" to read from standard input)" + }, + "silent": { + "type": "boolean", + "description": "Do not print the response body", + "default": false + }, + "verbose": { + "type": "boolean", + "description": "Include full HTTP request and response in the output", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show the resolved request without sending it", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "api-endpoint" + ], + "flags": { + "method": "choice", + "cursor": "choice", + "data": "text", + "field": "text", + "raw-field": "text", + "header": "text", + "input": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "input" + ], + "examples": [ + "# List organizations\nsentry api organizations/", + "# Read a page and its pagination metadata\nsentry api organizations/ -f per_page=2 --json", + "# Continue the same query using shared pagination\nsentry api organizations/ -f per_page=2 --cursor next --json", + "# Return to the previously visited page\nsentry api organizations/ -f per_page=2 --cursor prev --json", + "# Get a specific issue\nsentry api issues/123456789/", + "# Create a release\nsentry api organizations/my-org/releases/ -X POST -F version=1.0.0", + "# Update an issue status\nsentry api issues/123456789/ -X PUT -F status=resolved", + "# Send an inline JSON body\nsentry api issues/123456789/ -X PUT -d '{\"status\":\"resolved\"}'", + "# Set a nested field\nsentry api projects/my-org/my-project/ -X PUT -F options[sampleRate]=0.5", + "# Assign an issue\nsentry api issues/123456789/ -X PUT --field assignedTo=\"user@example.com\"", + "# Delete a project\nsentry api projects/my-org/my-project/ -X DELETE", + "# Add custom headers\nsentry api organizations/ -H \"X-Custom: value\"", + "# Read the request body from a file\nsentry api projects/my-org/my-project/releases/ -X POST --input release.json", + "# Show the full HTTP request and response\nsentry api organizations/ --verbose", + "# Preview the request without sending it\nsentry api organizations/ --dry-run", + "# Save a binary response, such as an event attachment, to a file\nsentry api \"https://sentry.io/api/0/projects/my-org/my-project/events/EVENT_ID/attachments/ATTACHMENT_ID/?download=1\" > screenshot.png" + ], + "apiOperations": [] + }, + { + "path": "sentry attribute list", + "brief": "List attribute keys for spans, logs, or metrics", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "target", + "description": "/ (all projects), /, or (search)" + }, + { + "type": "string", + "title": "filter", + "description": "Text in attribute names and/or has: terms, e.g. 'gen_ai has:http.method'" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "dataset": { + "type": "string", + "examples": [ + "spans", + "logs", + "metrics" + ], + "description": "Dataset to list attributes for (spans, logs, metrics)", + "default": "spans" + }, + "type": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Only show attributes of these types: string, number, boolean, array. Repeat the flag for each type or pass a comma-separated list (e.g. --type string,number)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "limit": { + "type": "number", + "description": "Maximum number of attributes to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project", + "text" + ], + "flags": { + "dataset": "choice", + "type": "choice-list", + "period": "period", + "limit": "text", + "cursor": "choice", + "fields": "text" + } + }, + "examples": [ + "# List span attribute keys for a project\nsentry attribute list my-org/my-project", + "# List log attribute keys across the whole organization\nsentry attribute list my-org/ --dataset logs", + "# String attributes whose names contain gen_ai (case-sensitive)\nsentry attribute list my-org/ gen_ai --type string", + "# Discover candidates alongside an attribute\nsentry attribute list my-org/ has:gen_ai.request.model", + "# Discover candidates alongside several keys (one quoted argument)\nsentry attribute list my-org/ 'has:gen_ai.request.model has:gen_ai.usage.input_tokens'", + "# Text and has: filters together\nsentry attribute list my-org/ 'gen_ai has:http.method'", + "# Discover candidates using the last 24 hours (includes built-in and virtual keys)\nsentry attribute list my-org/ --period 24h", + "# Show more than the default 25\nsentry attribute list my-org/my-project -n 100", + "# Show the next page of the previous listing (same flags)\nsentry attribute list my-org/my-project -n 100 -c next", + "# Filter spans that have a discovered key\nsentry span list my-org/my-project -q 'has:gen_ai.request.model'", + "# Find a custom numeric attribute by name\nsentry attribute list my-org/my-project cart.total --type number", + "# Show a discovered typed key as a span column\nsentry span list my-org/my-project --fields 'tags[cart.total,number]'", + "# Group a metric by a discovered attribute\nsentry explore my-org/ --dataset metrics -m llm.token_usage -F gen_ai.request.model", + "# Select fields as JSON\nsentry attribute list my-org/ --json --fields key,type,source" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationTraceItemAttributes" + } + ] + }, + { + "path": "sentry auth list", + "brief": "List stored accounts", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, active, host, userId, email, username, name, usable, expiresAt, envVar" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Show stored accounts (* marks the active one)\nsentry auth list" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Account ID", + "optional": false + }, + { + "name": "active", + "type": "boolean", + "description": "Whether commands use this account", + "optional": false + }, + { + "name": "host", + "type": "string", + "description": "Sentry server URL", + "optional": true + }, + { + "name": "userId", + "type": "string", + "description": "User ID", + "optional": true + }, + { + "name": "email", + "type": "string", + "description": "User email", + "optional": true + }, + { + "name": "username", + "type": "string", + "description": "Username", + "optional": true + }, + { + "name": "name", + "type": "string", + "description": "User display name", + "optional": true + }, + { + "name": "usable", + "type": "boolean", + "description": "Whether the credential can still be used or refreshed", + "optional": false + }, + { + "name": "expiresAt", + "type": "number", + "description": "Token expiry (Unix milliseconds)", + "optional": true + }, + { + "name": "envVar", + "type": "string", + "description": "Env var providing the token, if not stored", + "optional": true + } + ], + "apiOperations": [] + }, + { + "path": "sentry auth status", + "brief": "View authentication status", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "show-token": { + "type": "boolean", + "description": "Show the stored token (masked by default)", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Check authentication status\nsentry auth status", + "# Include the raw token\nsentry auth status --show-token" + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry auth whoami", + "brief": "Show the currently authenticated identity", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Show the current user\nsentry auth whoami" + ], + "apiOperations": [] + }, + { + "path": "sentry build download", + "brief": "Download a build artifact", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "build-id", + "description": "ID of the build to download" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "output": { + "type": "string", + "description": "Output path (default: preprod_artifact_. in the current directory)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "output": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Download a build artifact by ID\nsentry build download 1234567890", + "# Download to a specific path\nsentry build download 1234567890 --output ./app.ipa", + "# Output the result as JSON\nsentry build download 1234567890 --json" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationPreprodArtifactInstallDetails" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry build upload", + "brief": "Upload builds to a project", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "path", + "description": "Path(s) to the build(s) to upload (APK, AAB, IPA, or XCArchive)" + } + }, + "flags": { + "type": "object", + "properties": { + "build-configuration": { + "type": "string", + "description": "Build configuration for the upload (defaults to the current version)" + }, + "release-notes": { + "type": "string", + "description": "Release notes for the build" + }, + "install-group": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Install group(s) for this build (repeatable); builds sharing a group show updates for each other" + }, + "dsym": { + "type": "array", + "items": { + "type": "string" + }, + "description": "dSYM bundle, directory of bundles, or ZIP for a single IPA (repeatable)" + }, + "head-sha": { + "type": "string", + "description": "VCS commit SHA (defaults to the current commit)" + }, + "base-sha": { + "type": "string", + "description": "VCS base commit SHA (defaults to the merge-base with the base ref)" + }, + "vcs-provider": { + "type": "string", + "examples": [ + "github", + "github_enterprise", + "gitlab", + "bitbucket", + "bitbucket_server" + ], + "description": "VCS provider (defaults to the current remote's provider)" + }, + "head-repo-name": { + "type": "string", + "description": "Head repository name, e.g. owner/repo (defaults to the current)" + }, + "base-repo-name": { + "type": "string", + "description": "Base repository name, e.g. owner/repo (for forks)" + }, + "head-ref": { + "type": "string", + "description": "Head branch/reference (defaults to the current branch)" + }, + "base-ref": { + "type": "string", + "description": "Base branch/reference (defaults to the merge-base tracking ref)" + }, + "pr-number": { + "type": "string", + "description": "Pull request number (auto-detected in pull_request GitHub Actions runs)" + }, + "force-git-metadata": { + "type": "boolean", + "description": "Force collecting git metadata even outside CI (conflicts with --no-git-metadata)" + }, + "no-git-metadata": { + "type": "boolean", + "description": "Disable automatic git metadata collection" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "build-configuration": "text", + "release-notes": "text", + "install-group": "text", + "dsym": "file", + "head-sha": "git-commit", + "base-sha": "git-commit", + "vcs-provider": "choice", + "head-repo-name": "git-repo", + "base-repo-name": "git-repo", + "head-ref": "vcs-ref", + "base-ref": "vcs-ref", + "pr-number": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "dsym" + ], + "examples": [ + "# Upload an Android build\nsentry build upload ./app-release.apk", + "# Upload an XCArchive directory\nsentry build upload ./MyApp.xcarchive", + "# Upload an IPA with a build configuration\nsentry build upload ./MyApp.ipa --build-configuration Release", + "# Attach debug symbols to an IPA\nsentry build upload ./MyApp.ipa --dsym ./MyApp.app.dSYM --dsym ./frameworks-dsyms.zip", + "# Upload with release notes\nsentry build upload ./app.aab --build-configuration Release --release-notes \"Nightly\"", + "# Tag a build with install groups\nsentry build upload ./app.aab --install-group qa --install-group beta", + "# Attach explicit git metadata\nsentry build upload ./app.aab --head-sha \"$GIT_SHA\" --pr-number 42 --base-ref main" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry cli completion", + "brief": "Print the shell completion script", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "examples": [ + "bash", + "zsh", + "fish" + ], + "title": "shell", + "description": "Shell to generate completions for (bash, zsh, or fish)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "choice" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Print completions for your current shell (auto-detected from $SHELL)\nsentry cli completion", + "# Install zsh completions\nsentry cli completion zsh > ~/.local/share/zsh/site-functions/_sentry", + "# Load bash completions into the current shell\neval \"$(sentry cli completion bash)\"", + "# Install fish completions\nsentry cli completion fish > ~/.config/fish/completions/sentry.fish" + ], + "apiOperations": [] + }, + { + "path": "sentry cli defaults", + "brief": "View and manage default settings", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "organization", + "project", + "telemetry", + "agent-skills", + "graphics", + "tips", + "url", + "headers", + "ca-cert" + ], + "title": "key value", + "description": "Setting key and optional value" + } + }, + "flags": { + "type": "object", + "properties": { + "clear": { + "type": "boolean", + "description": "Clear the specified default, or all defaults if no key is given", + "default": false + }, + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "choice" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Show all current defaults\nsentry cli defaults", + "# Same as above (aliases: ls, show)\nsentry cli defaults list", + "# Set the default organization\nsentry cli defaults org my-org", + "# Set the default project\nsentry cli defaults project my-project", + "# Set the default Sentry URL (self-hosted)\nsentry cli defaults url https://sentry.example.com", + "# Set custom HTTP headers (self-hosted, e.g. for IAP/proxies)\nsentry cli defaults headers \"X-IAP: token\"", + "# Set a custom CA certificate (self-hosted, behind a TLS proxy)\nsentry cli defaults ca-cert /path/to/ca.pem", + "# Disable telemetry\nsentry cli defaults telemetry off", + "# Stop installing agent skills on upgrade\nsentry cli defaults agent-skills off", + "# Disable inline terminal images\nsentry cli defaults graphics off", + "# Hide Tip: hints in command output\nsentry cli defaults tips off", + "# Clear a single default\nsentry cli defaults org --clear", + "# Clear all defaults without prompting\nsentry cli defaults --clear --yes" + ], + "apiOperations": [] + }, + { + "path": "sentry cli feedback", + "brief": "Send feedback about the CLI", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "message", + "description": "Your feedback message" + } + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Send positive feedback\nsentry cli feedback i love this tool", + "# Report an issue\nsentry cli feedback the issue view is confusing" + ], + "apiOperations": [] + }, + { + "path": "sentry cli fix", + "brief": "Diagnose and repair CLI database issues", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean", + "description": "Show what would be fixed without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Fix database issues\nsentry cli fix", + "# Fix root-owned files\nsudo sentry cli fix", + "# Show what would be fixed without making changes\nsentry cli fix --dry-run" + ], + "apiOperations": [] + }, + { + "path": "sentry cli import", + "brief": "Import settings from legacy .sentryclirc files", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "url": { + "type": "string", + "description": "Explicitly trust this URL (bypasses same-file trust check)" + }, + "skip-validation": { + "type": "boolean", + "description": "Skip token validation against the Sentry API", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "url": "text", + "fields": "text" + } + }, + "examples": [ + "# Scan for .sentryclirc files and import interactively\nsentry cli import", + "# Preview what would be imported\nsentry cli import --dry-run", + "# Skip the confirmation prompt (CI-safe)\nsentry cli import --yes", + "# Explicitly trust a self-hosted URL\nsentry cli import --url https://sentry.example.com", + "# Skip API validation of the imported token\nsentry cli import --skip-validation" + ], + "apiOperations": [] + }, + { + "path": "sentry code-mappings upload", + "brief": "Upload code mappings for stack trace linking", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the code mappings JSON file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "repo": { + "type": "string", + "description": "Repository name (e.g., owner/repo). Auto-detected from git remote if omitted." + }, + "default-branch": { + "type": "string", + "description": "Default branch name. Auto-detected from git remote HEAD if omitted." + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "repo": "git-repo", + "default-branch": "vcs-ref", + "fields": "text" + } + }, + "examples": [ + "# Upload code mappings from a JSON file\nsentry code-mappings upload mappings.json", + "# Specify the repository explicitly\nsentry code-mappings upload mappings.json --repo owner/repo", + "# Specify the repository and default branch\nsentry code-mappings upload mappings.json --repo owner/repo --default-branch develop", + "# Output as JSON\nsentry code-mappings upload mappings.json --json" + ], + "apiOperations": [ + { + "fn": "bulkUpsertOrganizationCodeMappings" + }, + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dart-symbol-map upload", + "brief": "Upload a Dart/Flutter symbol map to Sentry", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the dart symbol map JSON file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "debug-id": { + "type": "string", + "description": "Debug ID (UUID) from the companion native debug file" + }, + "no-upload": { + "type": "boolean", + "description": "Validate the file without uploading (dry-run)", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "required": [ + "debug-id" + ], + "additionalProperties": false + } + }, + "required": [ + "positional", + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "debug-id": "text", + "fields": "text" + } + }, + "examples": [ + "# Upload a Dart symbol map with a debug ID\nsentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json", + "# Validate without uploading\nsentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --no-upload", + "# Output as JSON\nsentry dart-symbol-map upload --debug-id 12345678-1234-1234-1234-123456789abc mapping.json --json" + ], + "apiOperations": [ + { + "fn": "assembleProjectDebugFiles" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard create", + "brief": "Create a dashboard", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/title", + "description": "[] " + } + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, title, widgets, dateCreated, createdBy, projects, environment, period, url" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Create a dashboard (organization auto-detected)\nsentry dashboard create 'Frontend Performance'", + "# Create a dashboard in an explicit organization\nsentry dashboard create my-org/ 'My Dashboard'", + "# Use the organization of an explicit project\nsentry dashboard create my-org/my-project 'My Dashboard'" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "optional": false + }, + { + "name": "title", + "type": "string", + "optional": false + }, + { + "name": "widgets", + "type": "array", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "optional": true + }, + { + "name": "createdBy", + "type": "object", + "optional": true + }, + { + "name": "projects", + "type": "array", + "optional": true + }, + { + "name": "environment", + "type": "array", + "optional": true + }, + { + "name": "period", + "type": "string | null", + "optional": true + }, + { + "name": "url", + "type": "string", + "description": "Dashboard URL", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "createOrganizationDashboard" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard list", + "brief": "List dashboards", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/title-filter", + "description": "[<org/project>] [<name-glob>]" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "limit": { + "type": "number", + "description": "Maximum number of dashboards to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, title, dateCreated, createdBy, widgetDisplay" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List dashboards (organization auto-detected)\nsentry dashboard list", + "# List dashboards in an explicit organization\nsentry dashboard list my-org/", + "# Use the organization of an explicit project\nsentry dashboard list my-org/my-project", + "# Filter by title glob\nsentry dashboard list 'Backend*'", + "# Filter within an organization\nsentry dashboard list my-org/ '*API*'", + "# Fetch the next page\nsentry dashboard list -c next", + "# Fetch the previous page\nsentry dashboard list -c prev", + "# Output JSON with the pagination envelope\nsentry dashboard list --json", + "# Open the dashboard list in the browser\nsentry dashboard list -w" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "optional": false + }, + { + "name": "title", + "type": "string", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "optional": true + }, + { + "name": "createdBy", + "type": "object", + "optional": true + }, + { + "name": "widgetDisplay", + "type": "array", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard restore", + "brief": "Restore a dashboard revision", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/dashboard", + "description": "[<org/project>] <dashboard-id-or-title>" + } + }, + "flags": { + "type": "object", + "properties": { + "revision": { + "type": "string", + "description": "Revision ID to restore" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dashboard, orgSlug, revisionId" + } + }, + "required": [ + "revision" + ], + "additionalProperties": false + } + }, + "required": [ + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "revision": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Restore by dashboard title and revision number\nsentry dashboard restore 'Frontend Performance' --revision 3", + "# Restore by dashboard ID\nsentry dashboard restore 12345 --revision 42", + "# Pass the organization explicitly\nsentry dashboard restore my-org/ 12345 --revision 42", + "# Output the restored dashboard as JSON\nsentry dashboard restore 12345 --revision 42 --json" + ], + "outputFields": [ + { + "name": "dashboard", + "type": "object", + "description": "Restored dashboard", + "optional": false + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "revisionId", + "type": "string", + "description": "Restored revision ID", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard revisions", + "brief": "List dashboard revisions", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/dashboard", + "description": "[<org/project>] <dashboard-id-or-title>" + } + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of revisions to list", + "default": 25 + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, title, dateCreated, createdBy, source" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List revisions by dashboard title\nsentry dashboard revisions 'Frontend Performance'", + "# List revisions by dashboard ID\nsentry dashboard revisions 12345", + "# Pass the organization explicitly\nsentry dashboard revisions my-org/ 12345", + "# Fetch the next page\nsentry dashboard revisions my-org/ 12345 -c next", + "# Output as JSON\nsentry dashboard revisions my-org/ 12345 --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "optional": false + }, + { + "name": "title", + "type": "string", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "optional": false + }, + { + "name": "createdBy", + "type": "object | null", + "optional": false + }, + { + "name": "source", + "type": "string", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard view", + "brief": "View a dashboard", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/dashboard", + "description": "[<org/project>] <dashboard-id-or-title>" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "refresh": { + "type": "string", + "description": "Auto-refresh interval in seconds (default: 60, min: 10)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"" + }, + "renderer": { + "type": "string", + "enum": [ + "auto", + "kitty", + "sixel" + ], + "description": "Graphics renderer (falls back to auto when unavailable)", + "default": "auto" + }, + "no-graphics-cap": { + "type": "boolean", + "description": "Use the terminal-native graphics width (may fall back to ASCII for very large dashboards)", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, title, period, fetchedAt, url, dateCreated, environment, widgets" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "refresh": "text", + "period": "period", + "renderer": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# View a dashboard by title\nsentry dashboard view 'Frontend Performance'", + "# View a dashboard by ID\nsentry dashboard view 12345", + "# View by ID in an explicit organization\nsentry dashboard view my-org/12345", + "# Include project context in the same argument\nsentry dashboard view my-org/my-project/12345", + "# Pass the organization separately, e.g. for titles that contain a slash\nsentry dashboard view my-org/ \"incidents/2026\"", + "# Override the time period\nsentry dashboard view 12345 --period 7d", + "# Render charts with sixel graphics\nsentry dashboard view 12345 --renderer sixel", + "# Auto-refresh every 30 seconds\nsentry dashboard view 'Backend Performance' --refresh 30", + "# Output as JSON\nsentry dashboard view 12345 --json", + "# Open in the browser\nsentry dashboard view 12345 -w" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Dashboard ID", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Dashboard title", + "optional": false + }, + { + "name": "period", + "type": "string", + "description": "Time range of the widget data", + "optional": false + }, + { + "name": "fetchedAt", + "type": "string", + "description": "When the data was fetched (ISO 8601)", + "optional": false + }, + { + "name": "url", + "type": "string", + "description": "Dashboard URL", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "description": "Creation date (ISO 8601)", + "optional": true + }, + { + "name": "environment", + "type": "array", + "description": "Environment filter", + "optional": true + }, + { + "name": "widgets", + "type": "array", + "description": "Widgets with their query results", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDashboard" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEventsTimeseries" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry dashboard widget add", + "brief": "Add a widget to a dashboard", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/dashboard/title", + "description": "[<org/project>] <dashboard> <title>" + } + }, + "flags": { + "type": "object", + "properties": { + "display": { + "type": "string", + "examples": [ + "line", + "area", + "stacked_area", + "bar", + "table", + "big_number", + "top_n", + "details", + "categorical_bar", + "heatmap", + "wheel", + "rage_and_dead_clicks", + "server_tree", + "text", + "agents_traces_table" + ], + "description": "Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table)" + }, + "dataset": { + "type": "string", + "examples": [ + "issue", + "error-events", + "spans", + "logs", + "tracemetrics", + "preprod-app-size" + ], + "description": "Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue" + }, + "query": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Aggregate expression (e.g. count, p95:span.duration)" + }, + "where": { + "type": "string", + "description": "Search conditions filter (e.g. is:unresolved)" + }, + "group-by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Group-by column (repeatable)" + }, + "sort": { + "type": "string", + "description": "Order by (prefix - for desc, e.g. -count)" + }, + "limit": { + "type": "string", + "description": "Result limit" + }, + "col": { + "type": "string", + "examples": [ + "0", + "1", + "2", + "3", + "4", + "5" + ], + "description": "Grid column position (0-based, 0–5)" + }, + "row": { + "type": "string", + "description": "Grid row position (0-based)" + }, + "width": { + "type": "string", + "examples": [ + "1", + "2", + "3", + "4", + "5", + "6" + ], + "description": "Widget width in grid columns (1–6)" + }, + "height": { + "type": "string", + "description": "Widget height in grid rows (min 1)" + }, + "layout": { + "type": "string", + "examples": [ + "sequential", + "dense" + ], + "description": "Layout mode: sequential (append in order) or dense (fill gaps)", + "default": "sequential" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dashboard, widget, url" + } + }, + "required": [ + "display" + ], + "additionalProperties": false + } + }, + "required": [ + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "display": "choice", + "dataset": "choice", + "query": "aggregate-shorthand", + "where": "text", + "group-by": "field", + "sort": "aggregate-shorthand", + "limit": "text", + "col": "choice", + "row": "text", + "width": "choice", + "height": "text", + "layout": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# Add a counter widget\nsentry dashboard widget add 'My Dashboard' \"Error Count\" --display big_number --query count", + "# Use a dashboard ID in an explicit organization\nsentry dashboard widget add my-org/12345 \"Error Count\" --display big_number --query count", + "# Line chart with group-by\nsentry dashboard widget add 'My Dashboard' \"Errors by Browser\" --display line --query count --group-by browser.name", + "# Table with multiple aggregates, sorted descending\nsentry dashboard widget add 'My Dashboard' \"Top Endpoints\" --display table --query count --query p95:span.duration --group-by transaction --sort -count --limit 10", + "# Bar chart with a search filter\nsentry dashboard widget add 'My Dashboard' \"Slow Requests\" --display bar --query p95:span.duration --where \"span.op:http.client\" --group-by span.description", + "# P95 latency KPI\nsentry dashboard widget add 'My Dashboard' \"P95\" --display big_number --query p95:span.duration", + "# Throughput KPI\nsentry dashboard widget add 'My Dashboard' \"Throughput\" --display big_number --query epm", + "# Custom metric percentiles from the tracemetrics dataset\nsentry dashboard widget add 'My Dashboard' \"Latency\" --display line --dataset tracemetrics --query \"p50(value,completion.duration_ms,distribution,none)\" --query \"p90(value,completion.duration_ms,distribution,none)\"" + ], + "outputFields": [ + { + "name": "dashboard", + "type": "object", + "description": "The saved dashboard", + "optional": false + }, + { + "name": "widget", + "type": "object", + "description": "The added or edited widget", + "optional": false + }, + { + "name": "url", + "type": "string", + "description": "Dashboard URL", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDashboard" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationDashboard" + } + ] + }, + { + "path": "sentry dashboard widget delete", + "brief": "Delete a widget from a dashboard", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/dashboard", + "description": "[<org/project>] <dashboard-id-or-title>" + } + }, + "flags": { + "type": "object", + "properties": { + "index": { + "type": "string", + "description": "Widget index (0-based)" + }, + "title": { + "type": "string", + "description": "Widget title to match" + }, + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dryRun, deleted, widgetTitle, widgetCount, url" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "index": "text", + "title": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Delete a widget by title\nsentry dashboard widget delete 'My Dashboard' --title 'Error Rate'", + "# Delete a widget by index\nsentry dashboard widget delete 12345 --index 0", + "# Preview the deletion\nsentry dashboard widget delete 12345 --index 0 --dry-run" + ], + "outputFields": [ + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "deleted", + "type": "boolean", + "description": "True when the widget was deleted", + "optional": true + }, + { + "name": "widgetTitle", + "type": "string", + "description": "Title of the deleted widget", + "optional": false + }, + { + "name": "widgetCount", + "type": "number", + "description": "Dashboard widget count after the delete (before it, with --dry-run)", + "optional": false + }, + { + "name": "url", + "type": "string", + "description": "Dashboard URL", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDashboard" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationDashboard" + } + ] + }, + { + "path": "sentry dashboard widget edit", + "brief": "Edit a widget in a dashboard", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/dashboard", + "description": "[<org/project>] <dashboard-id-or-title>" + } + }, + "flags": { + "type": "object", + "properties": { + "index": { + "type": "string", + "description": "Widget index (0-based)" + }, + "title": { + "type": "string", + "description": "Widget title to match" + }, + "new-title": { + "type": "string", + "description": "New widget title" + }, + "display": { + "type": "string", + "examples": [ + "line", + "area", + "stacked_area", + "bar", + "table", + "big_number", + "top_n", + "details", + "categorical_bar", + "heatmap", + "wheel", + "rage_and_dead_clicks", + "server_tree", + "text", + "agents_traces_table" + ], + "description": "Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table)" + }, + "dataset": { + "type": "string", + "examples": [ + "issue", + "error-events", + "spans", + "logs", + "tracemetrics", + "preprod-app-size" + ], + "description": "Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue" + }, + "query": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Aggregate expression (e.g. count, p95:span.duration)" + }, + "where": { + "type": "string", + "description": "Search conditions filter (e.g. is:unresolved)" + }, + "group-by": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Group-by column (repeatable)" + }, + "sort": { + "type": "string", + "description": "Order by (prefix - for desc, e.g. -count)" + }, + "limit": { + "type": "string", + "description": "Result limit" + }, + "col": { + "type": "string", + "examples": [ + "0", + "1", + "2", + "3", + "4", + "5" + ], + "description": "Grid column position (0-based, 0–5)" + }, + "row": { + "type": "string", + "description": "Grid row position (0-based)" + }, + "width": { + "type": "string", + "examples": [ + "1", + "2", + "3", + "4", + "5", + "6" + ], + "description": "Widget width in grid columns (1–6)" + }, + "height": { + "type": "string", + "description": "Widget height in grid rows (min 1)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: dashboard, widget, url" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "dashboard" + ], + "flags": { + "index": "text", + "title": "text", + "new-title": "text", + "display": "choice", + "dataset": "choice", + "query": "aggregate-shorthand", + "where": "text", + "group-by": "field", + "sort": "aggregate-shorthand", + "limit": "text", + "col": "choice", + "row": "text", + "width": "choice", + "height": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Change a widget's display type\nsentry dashboard widget edit 12345 --title 'Error Rate' --display bar", + "# Change the query of a widget selected by index\nsentry dashboard widget edit 'My Dashboard' --index 0 --query p95:span.duration", + "# Rename a widget\nsentry dashboard widget edit 12345 --title 'Old Name' --new-title 'New Name'", + "# Move and resize a widget\nsentry dashboard widget edit 12345 --index 0 --col 0 --row 0 --width 6 --height 2" + ], + "outputFields": [ + { + "name": "dashboard", + "type": "object", + "description": "The saved dashboard", + "optional": false + }, + { + "name": "widget", + "type": "object", + "description": "The added or edited widget", + "optional": false + }, + { + "name": "url", + "type": "string", + "description": "Dashboard URL", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationDashboard" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationDashboards" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationDashboard" + } + ] + }, + { + "path": "sentry debug-files bundle-jvm", + "brief": "Create a JVM source bundle for source context", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Directory containing JVM source files" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "output": { + "type": "string", + "description": "Output directory for the bundle ZIP" + }, + "debug-id": { + "type": "string", + "description": "Debug ID (UUID) to stamp on the bundle" + }, + "exclude": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional directory names to exclude (repeatable)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "required": [ + "output", + "debug-id" + ], + "additionalProperties": false + } + }, + "required": [ + "positional", + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory" + ], + "flags": { + "output": "directory", + "debug-id": "text", + "exclude": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Bundle JVM sources with a debug ID\nsentry debug-files bundle-jvm --output ./out --debug-id <uuid> ./src", + "# Exclude additional directories\nsentry debug-files bundle-jvm --output ./out --debug-id <uuid> --exclude generated --exclude build-tools ./src", + "# Output as JSON\nsentry debug-files bundle-jvm --output ./out --debug-id <uuid> --json ./src" + ], + "apiOperations": [] + }, + { + "path": "sentry debug-files bundle-sources", + "brief": "Bundle a debug file's source files for source context", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the debug information file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "output": { + "type": "string", + "description": "Output path for the source bundle ZIP (default: <path>.src.zip)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "output": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Bundle a debug file's referenced source files (run on the build machine)\nsentry debug-files bundle-sources ./libexample.so", + "# Write the bundle to a specific path\nsentry debug-files bundle-sources ./app.pdb --output ./app.src.zip" + ], + "apiOperations": [] + }, + { + "path": "sentry debug-files check", + "brief": "Inspect a debug information file", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the debug information file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Inspect a debug information file (auto-detects the format)\nsentry debug-files check ./libexample.so", + "# Inspect the DWARF file inside a dSYM\nsentry debug-files check MyApp.dSYM/Contents/Resources/DWARF/MyApp", + "# Output the report as JSON\nsentry debug-files check ./app.pdb --json" + ], + "apiOperations": [] + }, + { + "path": "sentry debug-files find", + "brief": "Locate debug files for given debug identifiers", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "id", + "description": "Debug identifier(s) to search for" + } + }, + "flags": { + "type": "object", + "properties": { + "type": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "dsym", + "elf", + "pe", + "pdb", + "portablepdb", + "sourcebundle", + "breakpad", + "proguard", + "jvm", + "wasm" + ] + }, + "description": "Only consider debug files of the given type (repeatable). Default: all" + }, + "no-well-known": { + "type": "boolean", + "description": "Do not look for debug files in well-known locations" + }, + "no-cwd": { + "type": "boolean", + "description": "Do not look for debug files in the current directory" + }, + "path": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Add a directory to search recursively (repeatable)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "type": "choice", + "path": "directory", + "fields": "text" + } + }, + "localPathFlags": [ + "path" + ], + "examples": [ + "# Locate debug files for a debug identifier on disk\nsentry debug-files find <debug-id>", + "# Search only for dSYMs, including an extra directory\nsentry debug-files find <debug-id> --type dsym --path ./build", + "# Search only an explicit directory and output JSON\nsentry debug-files find <debug-id> --no-cwd --no-well-known -p /symbols --json" + ], + "apiOperations": [] + }, + { + "path": "sentry debug-files print-sources", + "brief": "List the source files a debug file references", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the debug information file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# List the source files a debug file references (and whether they're available)\nsentry debug-files print-sources ./libexample.so", + "# Output the list as JSON\nsentry debug-files print-sources ./app.pdb --json" + ], + "apiOperations": [] + }, + { + "path": "sentry debug-files upload", + "brief": "Upload debug information files to Sentry", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "path", + "description": "Files or directories to scan for debug information files" + } + }, + "flags": { + "type": "object", + "properties": { + "type": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "dsym", + "macho", + "elf", + "pe", + "pdb", + "portablepdb", + "wasm", + "breakpad", + "sourcebundle", + "jvm", + "dxil" + ] + }, + "description": "Only upload files of this type (repeatable): dsym, elf, pe, pdb, portablepdb, wasm, breakpad, sourcebundle, jvm, dxil" + }, + "id": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Only upload the object with this debug id (repeatable)" + }, + "require-all": { + "type": "boolean", + "description": "Fail if any --id value was not found among scanned files", + "default": false + }, + "no-debug": { + "type": "boolean", + "description": "Do not upload files whose only feature is debug/symbol info", + "default": false + }, + "no-unwind": { + "type": "boolean", + "description": "Do not upload files whose only feature is unwind info", + "default": false + }, + "no-sources": { + "type": "boolean", + "description": "Do not upload files whose only feature is source info", + "default": false + }, + "include-sources": { + "type": "boolean", + "description": "Build and upload a source bundle for each file with debug info", + "default": false + }, + "il2cpp-mapping": { + "type": "boolean", + "description": "Compute and upload Unity IL2CPP line mappings for each scanned file", + "default": false + }, + "derived-data": { + "type": "boolean", + "description": "Also scan Xcode's DerivedData folder (macOS only)", + "default": false + }, + "no-zips": { + "type": "boolean", + "description": "Do not scan inside .zip archives", + "default": false + }, + "no-upload": { + "type": "boolean", + "description": "Scan and print what would be uploaded without uploading", + "default": false + }, + "wait": { + "type": "boolean", + "description": "Wait for server-side processing and report any errors", + "default": false + }, + "wait-for": { + "type": "string", + "description": "Wait up to this many seconds for server-side processing" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "type": "choice", + "id": "text", + "wait-for": "text", + "fields": "text" + } + }, + "examples": [ + "# Upload debug information files (scans directories recursively)\nsentry debug-files upload ./build", + "# Attach a source bundle to each file\nsentry debug-files upload ./libexample.so --include-sources", + "# Scan a .zip archive in place\nsentry debug-files upload ./symbols.zip", + "# Skip .zip archives\nsentry debug-files upload ./build --no-zips", + "# Upload only dSYMs and wait for server-side processing\nsentry debug-files upload ./dsyms --type dsym --wait", + "# Fail unless the requested debug ID is found\nsentry debug-files upload ./build --id <debug-id> --require-all", + "# Unity: upload IL2CPP line mappings\nsentry debug-files upload ./build --il2cpp-mapping", + "# Unity: upload IL2CPP line mappings with referenced C# sources\nsentry debug-files upload ./build --il2cpp-mapping --include-sources", + "# Preview what would be uploaded (no credentials needed)\nsentry debug-files upload ./build --no-upload", + "# Scan Xcode's DerivedData without uploading\nsentry debug-files upload --derived-data --no-upload" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry docs list", + "brief": "Find Sentry documentation pages by keyword", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "keywords", + "description": "Documentation keywords" + } + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum matches to return (1-20)", + "default": 8 + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "limit": "text", + "fields": "text" + } + }, + "examples": [ + "# Search the documentation index\nsentry docs list \"source maps\"", + "# Limit the number of results\nsentry docs list \"session replay privacy\" --limit 5", + "# Output as JSON\nsentry docs list \"source maps\" --json" + ], + "apiOperations": [] + }, + { + "path": "sentry docs query", + "brief": "Ask a cited question about Sentry documentation", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "question", + "description": "Natural-language docs question" + } + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Ask a documentation question\nsentry docs \"How do I configure tracing in Next.js?\"", + "# Use the explicit subcommand\nsentry docs query \"How do I upload source maps?\"", + "# Use the search alias\nsentry docs search \"How does session replay mask text?\"", + "# Output the answer as JSON\nsentry docs \"How do I configure tracing?\" --json" + ], + "apiOperations": [] + }, + { + "path": "sentry dsn list", + "brief": "List DSNs", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of DSNs to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "text" + } + }, + "examples": [ + "# List client keys for detected projects, including monorepos\nsentry dsn list", + "# List enabled and disabled DSNs for one project\nsentry dsn list my-org/my-project", + "# List DSNs across all accessible projects in an organization\nsentry dsn list my-org/", + "# Fetch the next page\nsentry dsn list my-org/ --limit 10 -c next", + "# Fetch the previous page\nsentry dsn list my-org/ --limit 10 -c prev", + "# Select public DSN fields as JSON\nsentry dsn list my-org/my-project --json --fields name,dsn,isActive" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjectKeys" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectKeys" + } + ] + }, + { + "path": "sentry event analytics", + "brief": "Analytics for events Sentry accepted and dropped", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/<project> or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "dataset": { + "type": "string", + "examples": [ + "errors", + "spans", + "logs", + "metrics" + ], + "description": "Dropped-data type: errors, spans, logs, metrics", + "default": "errors" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: outcome, label, reason, category, events, share, tags" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "dataset": "choice", + "period": "period", + "fields": "choice-list" + } + }, + "examples": [ + "# Accepted and dropped event analytics for a project\nsentry event analytics my-org/my-project", + "# Analytics for a different dataset\nsentry event analytics my-org/my-project --dataset spans", + "# Widen the time range\nsentry event analytics my-org/my-project --period 7d", + "# Select specific JSON fields\nsentry event analytics my-org/my-project --json --fields outcome,reason,events" + ], + "outputFields": [ + { + "name": "outcome", + "type": "string", + "description": "Outcome code: accepted, or a drop such as rate_limited or filtered", + "optional": false + }, + { + "name": "label", + "type": "string", + "description": "Human-readable outcome label", + "optional": false + }, + { + "name": "reason", + "type": "string", + "description": "Reason within the outcome (e.g. spike_protection); accepted for accepted volume", + "optional": false + }, + { + "name": "category", + "type": "string", + "description": "Data category (e.g. error, span)", + "optional": false + }, + { + "name": "events", + "type": "number", + "description": "Events in this slice", + "optional": false + }, + { + "name": "share", + "type": "number", + "description": "Fraction of total volume (0-1), not a percentage string", + "optional": false + }, + { + "name": "tags", + "type": "array", + "description": "Drop classification: intentional or unintentional; empty for accepted", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEventsDropped" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry event list", + "brief": "List events for an issue", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of events (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Search query (Sentry search syntax)" + }, + "full": { + "type": "boolean", + "description": "Include full event body (stacktraces)", + "default": false + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, event.type, groupID, eventID, projectID, message, title, location, culprit, user, tags, platform, dateCreated, crashFile, metadata" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "limit": "text", + "query": "text", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List events for an issue (short ID)\nsentry event list PROJ-ABC", + "# List events for an issue (numeric ID)\nsentry event list 123456789", + "# List events for the most recent issue\nsentry event list @latest --limit 50", + "# Filter by search query\nsentry event list PROJ-ABC --query \"browser:Chrome\"", + "# Include full event bodies (stacktraces)\nsentry event list PROJ-ABC --full", + "# Limit results and time range\nsentry event list PROJ-ABC --limit 50 --period 24h", + "# Fetch the next page\nsentry event list PROJ-ABC -c next", + "# Fetch the previous page\nsentry event list PROJ-ABC -c prev", + "# Output as JSON\nsentry event list PROJ-ABC --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Internal event ID", + "optional": false + }, + { + "name": "event.type", + "type": "string", + "description": "Event type (error, default, transaction)", + "optional": false + }, + { + "name": "groupID", + "type": "string | null", + "description": "ID of the issue the event belongs to", + "optional": true + }, + { + "name": "eventID", + "type": "string", + "description": "UUID-format event ID", + "optional": false + }, + { + "name": "projectID", + "type": "string", + "description": "ID of the project the event belongs to", + "optional": true + }, + { + "name": "message", + "type": "string", + "description": "Event message", + "optional": true + }, + { + "name": "title", + "type": "string", + "description": "Event title", + "optional": true + }, + { + "name": "location", + "type": "string | null", + "description": "Source location of the event, such as a file and line", + "optional": true + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module that caused the event", + "optional": true + }, + { + "name": "user", + "type": "object | null", + "description": "User context of the event", + "optional": true + }, + { + "name": "tags", + "type": "array", + "description": "Tags attached to the event", + "optional": true + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform of the event, such as python or javascript", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the event occurred (ISO 8601)", + "optional": true + }, + { + "name": "crashFile", + "type": "string | null", + "description": "Crash report attachment of the event, if any", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Event metadata", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssueEvents" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry event send", + "brief": "Send a Sentry event", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "target-or-file", + "description": "Optional DSN/project target followed by JSON event file path(s)" + } + }, + "flags": { + "type": "object", + "properties": { + "message": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Event message (repeat for multi-line)" + }, + "message-arg": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Arguments for message template (repeat for multiple)" + }, + "level": { + "type": "string", + "enum": [ + "debug", + "info", + "warning", + "error", + "fatal" + ], + "description": "Event severity level", + "default": "error" + }, + "release": { + "type": "string", + "description": "Release version" + }, + "dist": { + "type": "string", + "description": "Distribution identifier" + }, + "env": { + "type": "string", + "description": "Environment name (e.g. production, staging)" + }, + "platform": { + "type": "string", + "description": "Platform identifier (default: other)" + }, + "tag": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tag as KEY:VALUE (repeat for multiple)" + }, + "extra": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Extra data as KEY:VALUE (repeat for multiple)" + }, + "user": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "id:", + "email:", + "ip_address:", + "username:" + ] + }, + "description": "User info as KEY:VALUE — id, email, username, ip_address, or custom" + }, + "fingerprint": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom fingerprint part (repeat for multiple)" + }, + "timestamp": { + "type": "string", + "description": "Event timestamp (Unix epoch, ISO 8601, or RFC 2822)" + }, + "no-environ": { + "type": "boolean", + "description": "Do not include environment variables in the event", + "default": false + }, + "logfile": { + "type": "string", + "description": "Path to a log file — last 100 lines are attached as breadcrumbs" + }, + "with-categories": { + "type": "boolean", + "description": "Parse 'CATEGORY: message' prefixes from logfile breadcrumbs", + "default": false + }, + "raw": { + "type": "boolean", + "description": "Send file contents as-is without parsing", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "message": "text", + "message-arg": "text", + "level": "choice", + "release": "release", + "dist": "text", + "env": "environment", + "platform": "platform", + "tag": "text", + "extra": "text", + "user": "choice", + "fingerprint": "text", + "timestamp": "text", + "logfile": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "logfile" + ], + "examples": [ + "# Send an error event (default level)\nsentry event send -m \"Something went wrong\"", + "# Specify level, release, and environment\nsentry event send -m \"Deploy check\" -l info -r 1.0.0 -E production", + "# Add tags and extra data\nsentry event send -m \"Payment failed\" --tag env:prod --tag region:us-east --extra amount:99.99", + "# Set user context\nsentry event send -m \"Login error\" --user id:42 --user email:alice@example.com", + "# Custom fingerprint to group related events together\nsentry event send -m \"DB timeout\" --fingerprint db-timeout --fingerprint {{ default }}", + "# Send a serialized Sentry Event object\nsentry event send ./crash.json", + "# Send without re-parsing (raw mode)\nsentry event send --raw ./crash.json", + "# Send a pre-built envelope\nsentry event send --raw ./captured.envelope", + "# Send with an explicit DSN\nsentry event send \"https://key@o123.ingest.us.sentry.io/456\" -m \"Test\"", + "# Send to a project (logged-in session; the CLI fetches its sole active DSN)\nsentry event send my-project -m \"Test\"", + "# Send to an org/project target\nsentry event send my-org/my-project -m \"Test\"" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectKeys" + } + ] + }, + { + "path": "sentry event view", + "brief": "View details of one or more events", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/event-id", + "description": "[<org>/<project>] [<event-id>...] - Target (optional) and event IDs, or a selector (default: @latest)" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "spans": { + "type": "string", + "examples": [ + "all", + "no" + ], + "description": "Span tree depth limit (number, \"all\" for unlimited, \"no\" to disable)", + "default": "3" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, groupID, eventID, projectID, message, title, location, user, tags, platform, dateReceived, contexts, size, entries, dist, sdk, context, packages, type, metadata, errors, occurrence, _meta, crashFile, culprit, dateCreated, fingerprints, groupingConfig, startTimestamp, endTimestamp, measurements, breakdowns, release, userReport, sdkUpdates, resolvedWith, nextEventID, previousEventID, formatted, trace, attachments" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "spans": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# View an event\nsentry event view abc123def456abc123def456abc12345", + "# View a specific event using an issue short ID\nsentry event view PROJ-ABC 7388f6a62b7d436ab77bb5365f97a1ac", + "# View a specific event with an explicit organization\nsentry event view my-org/PROJ-ABC 7388f6a62b7d436ab77bb5365f97a1ac", + "# View the latest event for an issue\nsentry event view PROJ-ABC", + "# View the latest event of the most recent unresolved issue in a project\nsentry event view my-org/my-project", + "# View the latest event of the most frequent issue\nsentry event view @most_frequent", + "# Open in the browser\nsentry event view abc123def456abc123def456abc12345 -w", + "# Download an attachment listed by --json (with sentry api)\nsentry api 'https://sentry.io/api/0/projects/my-org/my-project/events/EVENT_ID/attachments/ATTACHMENT_ID/?download=1' > screenshot.png", + "# View an event in an explicit project\nsentry event view my-org/my-project abc123def456abc123def456abc12345", + "# View several events, finding the project across organizations\nsentry event view my-project abc123def456abc123def456abc12345 def456abc123def456abc123def45678" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "optional": true + }, + { + "name": "groupID", + "type": "string | null", + "optional": true + }, + { + "name": "eventID", + "type": "string", + "description": "UUID-format event ID", + "optional": false + }, + { + "name": "projectID", + "type": "string", + "optional": true + }, + { + "name": "message", + "type": "string | null", + "optional": true + }, + { + "name": "title", + "type": "string", + "optional": true + }, + { + "name": "location", + "type": "string | null", + "optional": true + }, + { + "name": "user", + "type": "object | null", + "optional": true + }, + { + "name": "tags", + "type": "array", + "optional": true + }, + { + "name": "platform", + "type": "string | null", + "optional": true + }, + { + "name": "dateReceived", + "type": "string | null", + "optional": true + }, + { + "name": "contexts", + "type": "object | null", + "optional": true + }, + { + "name": "size", + "type": "number | null", + "optional": true + }, + { + "name": "entries", + "type": "array", + "optional": true + }, + { + "name": "dist", + "type": "string | null", + "optional": true + }, + { + "name": "sdk", + "type": "object | null", + "optional": true + }, + { + "name": "context", + "type": "object | null", + "optional": true + }, + { + "name": "packages", + "type": "object", + "optional": true + }, + { + "name": "type", + "type": "string", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "optional": true + }, + { + "name": "errors", + "type": "array", + "optional": true + }, + { + "name": "occurrence", + "type": "object | null", + "optional": true + }, + { + "name": "_meta", + "type": "object", + "optional": true + }, + { + "name": "crashFile", + "type": "string | null", + "optional": true + }, + { + "name": "culprit", + "type": "string | null", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "optional": true + }, + { + "name": "fingerprints", + "type": "array", + "optional": true + }, + { + "name": "groupingConfig", + "type": "object", + "optional": true + }, + { + "name": "startTimestamp", + "type": "number", + "optional": true + }, + { + "name": "endTimestamp", + "type": "number", + "optional": true + }, + { + "name": "measurements", + "type": "object | null", + "optional": true + }, + { + "name": "breakdowns", + "type": "object | null", + "optional": true + }, + { + "name": "release", + "type": "object | null", + "optional": true + }, + { + "name": "userReport", + "type": "object | null", + "optional": true + }, + { + "name": "sdkUpdates", + "type": "array", + "optional": true + }, + { + "name": "resolvedWith", + "type": "array", + "optional": true + }, + { + "name": "nextEventID", + "type": "string | null", + "optional": true + }, + { + "name": "previousEventID", + "type": "string | null", + "optional": true + }, + { + "name": "formatted", + "type": "object", + "description": "Event rendered as Markdown, XML, or JSON; only returned for API requests with llmFormat", + "optional": true + }, + { + "name": "trace", + "type": "object | null", + "description": "Trace context, or null when unavailable", + "optional": false + }, + { + "name": "attachments", + "type": "array", + "description": "Event attachments; each includes metadata and an absolute authenticated download URL", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueEvent" + }, + { + "fn": "getOrganizationTrace" + }, + { + "fn": "getProject" + }, + { + "fn": "getProjectEvent" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=logs. The command may add filters or requests." + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans. The command may add filters or requests." + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectEventAttachments" + }, + { + "fn": "resolveOrganizationEventId" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry explore", + "brief": "Query aggregate event data (Explore)", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "target", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "field": { + "type": "array", + "items": { + "type": "string" + }, + "description": "API field or aggregate (repeatable). E.g., title, \"count()\", \"p50(span.duration)\"" + }, + "metric": { + "type": "string", + "description": "Metric name for --dataset metrics. Auto-resolves type/unit via API." + }, + "agg": { + "type": "string", + "examples": [ + "sum", + "avg", + "count", + "min", + "max", + "p50", + "p75", + "p90", + "p95", + "p99", + "count_unique" + ], + "description": "Aggregation for --metric (sum, avg, count, p50, p95, etc.)", + "default": "sum" + }, + "dataset": { + "type": "string", + "examples": [ + "errors", + "spans", + "metrics", + "logs", + "replays" + ], + "description": "Dataset to query (errors, spans, metrics, logs, replays; transaction(s) routes to spans)", + "default": "errors" + }, + "query": { + "type": "string", + "description": "Search query (Sentry search syntax)" + }, + "sort": { + "type": "string", + "description": "Sort field (prefix with - for desc, e.g., \"-count()\")" + }, + "environment": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment filter (repeatable, comma-separated)" + }, + "limit": { + "type": "number", + "description": "Number of table rows (1-1000, default: 25)" + }, + "time-series": { + "type": "string", + "description": "Query time series (default: auto; optional bucket duration, e.g., 15m)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "24h" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "field": "field-or-aggregate", + "metric": "text", + "agg": "choice", + "dataset": "choice", + "query": "text", + "sort": "field-or-aggregate", + "environment": "environment-list", + "limit": "text", + "time-series": "text", + "period": "period", + "cursor": "choice", + "fields": "text" + } + }, + "examples": [ + "# Top errors in the last 24 hours, scoped to a project\nsentry explore my-org/cli", + "# All projects in an organization\nsentry explore my-org/", + "# Bare project slug (searches across organizations)\nsentry explore cli", + "# Auto-detect the project from DSN/config\nsentry explore", + "# Errors with user impact for a specific UTC window\nsentry explore my-org/cli -F title -F \"count()\" -F \"count_unique(user)\" --period \"2024-01-15T00:00:00Z..2024-01-16T00:00:00Z\"", + "# Filter by error type (combined with the project filter)\nsentry explore my-org/cli -F title -F \"count()\" -q \"error.type:TypeError\" --period 1h", + "# Combine span filters while keeping the project scope\nsentry explore my-org/cli --dataset spans -F \"count()\" -q \"span.op:http.client OR span.status:internal_error\"", + "# Count a metric only for a matching release\nsentry explore my-org/ --dataset metrics -F 'count_if(`release:example`,value,request_duration,distribution,none)'", + "# Span operation latency\nsentry explore my-org/cli -F span.op -F \"p50(span.duration)\" -F \"p95(span.duration)\" --dataset spans --period 1h", + "# Top spans by count\nsentry explore my-org/cli -F span.op -F \"count()\" --dataset spans --sort \"-count()\"", + "# Error counts in 15-minute buckets over the last hour\nsentry explore my-org/cli --time-series 15m --period 1h", + "# Latency over time with automatic bucket duration, as JSON\nsentry explore my-org/cli --dataset spans -F \"p95(span.duration)\" --time-series --period 24h --json", + "# A metric over time using its discovered type and unit\nsentry explore my-org/cli --dataset metrics -m cache.hit_rate --agg avg -b -t 1h", + "# Sum a custom metric (e.g., LLM token usage) across an organization\nsentry explore my-org/ -m llm.token_usage --dataset metrics --period 7d", + "# Break a metric down by a tag column\nsentry explore my-org/seer -F gen_ai.request.model -m llm.token_usage --dataset metrics --period 7d", + "# Use a different metric aggregation (default is sum)\nsentry explore my-org/ -m cache.hit_rate --agg avg --dataset metrics", + "# Use the raw tracemetrics format\nsentry explore my-org/ -F \"sum(value,llm.token_usage,distribution,none)\" --dataset metrics --period 7d", + "# Filter replays by activity level\nsentry explore my-org/cli --dataset replays -F activity -F duration -F count_errors --period 7d", + "# Log severity counts in the last hour\nsentry explore my-org/cli -F severity -F \"count()\" --dataset logs --period 1h", + "# Pipe JSON to jq\nsentry explore my-org/cli -F title -F \"count()\" --json | jq '.data[:5]'" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEventsTimeseries" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReplays" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry feedback list", + "brief": "List and search User Feedback", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "unresolved", + "resolved", + "spam", + "all" + ], + "description": "Mailbox: unresolved, resolved, spam, or all", + "default": "unresolved" + }, + "limit": { + "type": "number", + "description": "Number of feedback items (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Search query (Sentry issue search syntax)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "14d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, issueCategory, issueType, hasSeen, latestEventHasAttachments" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "status": "choice", + "limit": "text", + "query": "issue-query", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List Feedback (organization auto-detected)\nsentry feedback list", + "# List Feedback for one project\nsentry feedback list my-org/frontend", + "# List Feedback across every project in an organization\nsentry feedback list my-org/", + "# Search for a project across accessible organizations\nsentry feedback list frontend", + "# Show resolved Feedback\nsentry feedback list my-org/frontend --status resolved", + "# Show the spam mailbox\nsentry feedback list my-org/frontend --status spam", + "# Show every status over the last 90 days\nsentry feedback list my-org/frontend --status all --period 90d", + "# Search Feedback messages\nsentry feedback list my-org/frontend --query \"message:*checkout*\"" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Feedback metadata", + "optional": false + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "issueCategory", + "type": "string", + "description": "Issue category discriminator", + "optional": false + }, + { + "name": "issueType", + "type": "string", + "description": "Issue type discriminator", + "optional": false + }, + { + "name": "hasSeen", + "type": "boolean", + "description": "Whether the feedback has been read", + "optional": true + }, + { + "name": "latestEventHasAttachments", + "type": "boolean", + "description": "Whether the latest event has attachments", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry feedback resolve", + "brief": "Mark User Feedback as resolved", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "feedback", + "description": "Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix>" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, issueCategory, issueType, hasSeen, latestEventHasAttachments" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Resolve a Feedback item (organization auto-detected)\nsentry feedback resolve FRONTEND-2SDJ", + "# Resolve a Feedback item in an explicit organization\nsentry feedback resolve my-org/FRONTEND-2SDJ", + "# Resolve the most recently active unresolved Feedback\nsentry feedback resolve my-org/@latest", + "# Return selected fields from the updated Feedback\nsentry feedback resolve my-org/FRONTEND-2SDJ --json --fields id,shortId,status" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Feedback metadata", + "optional": false + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "issueCategory", + "type": "string", + "description": "Issue category discriminator", + "optional": false + }, + { + "name": "issueType", + "type": "string", + "description": "Issue type discriminator", + "optional": false + }, + { + "name": "hasSeen", + "type": "boolean", + "description": "Whether the feedback has been read", + "optional": true + }, + { + "name": "latestEventHasAttachments", + "type": "boolean", + "description": "Whether the latest event has attachments", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry feedback spam", + "brief": "Mark User Feedback as spam", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "feedback", + "description": "Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix>" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, issueCategory, issueType, hasSeen, latestEventHasAttachments" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Move a Feedback item to the spam mailbox\nsentry feedback spam FRONTEND-2SDJ", + "# Mark as spam by numeric ID\nsentry feedback spam 5146636313", + "# Specify an organization explicitly\nsentry feedback spam my-org/FRONTEND-2SDJ", + "# Return selected fields from the updated Feedback\nsentry feedback spam FRONTEND-2SDJ --json --fields id,shortId,status" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Feedback metadata", + "optional": false + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "issueCategory", + "type": "string", + "description": "Issue category discriminator", + "optional": false + }, + { + "name": "issueType", + "type": "string", + "description": "Issue type discriminator", + "optional": false + }, + { + "name": "hasSeen", + "type": "boolean", + "description": "Whether the feedback has been read", + "optional": true + }, + { + "name": "latestEventHasAttachments", + "type": "boolean", + "description": "Whether the latest event has attachments", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry feedback unresolve", + "brief": "Return User Feedback to the inbox", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "feedback", + "description": "Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix>" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, issueCategory, issueType, hasSeen, latestEventHasAttachments" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Reopen a Feedback item, or return it from spam to the inbox\nsentry feedback unresolve FRONTEND-2SDJ", + "# Reopen by numeric ID\nsentry feedback unresolve 5146636313", + "# `reopen` is an alias for `unresolve`\nsentry feedback reopen FRONTEND-2SDJ", + "# Specify an organization explicitly\nsentry feedback unresolve my-org/FRONTEND-2SDJ", + "# Return selected fields from the updated Feedback\nsentry feedback unresolve FRONTEND-2SDJ --json --fields id,shortId,status" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Feedback metadata", + "optional": false + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "issueCategory", + "type": "string", + "description": "Issue category discriminator", + "optional": false + }, + { + "name": "issueType", + "type": "string", + "description": "Issue type discriminator", + "optional": false + }, + { + "name": "hasSeen", + "type": "boolean", + "description": "Whether the feedback has been read", + "optional": true + }, + { + "name": "latestEventHasAttachments", + "type": "boolean", + "description": "Whether the latest event has attachments", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry feedback view", + "brief": "View a User Feedback item", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "feedback", + "description": "Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix>" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, issueCategory, issueType, hasSeen, latestEventHasAttachments, org, event, replayIds, attachments" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# View the most recent unresolved Feedback\nsentry feedback view @latest", + "# Most recent unresolved Feedback in an explicit organization\nsentry feedback view my-org/@latest", + "# View by short ID\nsentry feedback view FRONTEND-2SDJ", + "# View by numeric ID\nsentry feedback view 5146636313", + "# View in an explicit organization\nsentry feedback view my-org/FRONTEND-2SDJ", + "# `view` is the default command\nsentry feedback my-org/FRONTEND-2SDJ", + "# Open the Feedback item in Sentry\nsentry feedback view my-org/FRONTEND-2SDJ --web" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Feedback metadata", + "optional": false + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "issueCategory", + "type": "string", + "description": "Issue category discriminator", + "optional": false + }, + { + "name": "issueType", + "type": "string", + "description": "Issue type discriminator", + "optional": false + }, + { + "name": "hasSeen", + "type": "boolean", + "description": "Whether the feedback has been read", + "optional": true + }, + { + "name": "latestEventHasAttachments", + "type": "boolean", + "description": "Whether the latest event has attachments", + "optional": true + }, + { + "name": "org", + "type": "string | null", + "description": "Organization slug", + "optional": false + }, + { + "name": "event", + "type": "unknown | null", + "description": "Latest feedback event", + "optional": false + }, + { + "name": "replayIds", + "type": "array", + "description": "Related Session Replay IDs", + "optional": false + }, + { + "name": "attachments", + "type": "array", + "description": "Attachments on the latest feedback event", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueEvent" + }, + { + "fn": "getOrganizationReplayCount" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectEventAttachments" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry help", + "brief": "Display help for a command", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "command", + "description": "Command to get help for" + } + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "command-path" + ], + "flags": { + "fields": "text" + } + }, + "examples": [], + "apiOperations": [] + }, + { + "path": "sentry info", + "brief": "Print configuration and verify authentication", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "config-status-json": { + "type": "boolean", + "description": "Emit configuration + auth status as JSON (for external tooling); always exits 0" + }, + "no-defaults": { + "type": "boolean", + "description": "Verify only authentication, without requiring a default org/project" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Print the resolved config and verify authentication\nsentry info", + "# Verify only authentication (don't require a default org/project)\nsentry info --no-defaults", + "# Machine-readable status for external tooling (always exits 0)\nsentry info --config-status-json" + ], + "apiOperations": [] + }, + { + "path": "sentry init", + "brief": "Print instructions for a coding agent to set up Sentry", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: guide" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Print the setup guide\nsentry init", + "# Print the guide as JSON\nsentry init --json" + ], + "outputFields": [ + { + "name": "guide", + "type": "string", + "description": "The setup guide's Markdown source", + "optional": false + } + ], + "apiOperations": [] + }, + { + "path": "sentry integration delete", + "brief": "Remove an installed integration", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/integration-id", + "description": "[<org>/]<integration-id> - Integration to remove" + } + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Remove an integration (auto-detect org)\nsentry integration delete 12345", + "# Preview removing an integration\nsentry integration delete my-org/12345 --dry-run", + "# Remove without the confirmation prompt\nsentry integration delete my-org/12345 --yes" + ], + "apiOperations": [ + { + "fn": "deleteOrganizationIntegration" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIntegration" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry integration list", + "brief": "List installed integrations", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of integrations to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, name, domainName, provider, status, organizationIntegrationStatus, externalId, orgSlug" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List installed integrations (auto-detect org)\nsentry integration list", + "# List integrations in a specific org\nsentry integration list my-org/", + "# Fetch the next page\nsentry integration list my-org/ -c next", + "# Only integrations whose name or provider matches a glob\nsentry integration list 'my-org/git*'", + "# Integrations named like 'GitHub' (fuzzy when nothing matches exactly)\nsentry integration list my-org/githb", + "# Output as JSON\nsentry integration list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Integration ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Integration name (e.g. GitHub org)", + "optional": false + }, + { + "name": "domainName", + "type": "string | null", + "description": "External domain (e.g. github.com/getsentry)", + "optional": false + }, + { + "name": "provider", + "type": "object", + "description": "Provider", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Integration status", + "optional": false + }, + { + "name": "organizationIntegrationStatus", + "type": "string", + "description": "Status of the install in this organization", + "optional": false + }, + { + "name": "externalId", + "type": "string", + "description": "Provider-side installation ID", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationIntegrations" + } + ] + }, + { + "path": "sentry issue archive", + "brief": "Archive (ignore) an issue", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "until": { + "type": "string", + "description": "Condition for unarchival: forever, auto, 30m, 10x, 10u, 10x/5m, etc." + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "until": "archive-until", + "fields": "text" + } + }, + "examples": [ + "# Archive forever (fully silenced)\nsentry issue archive CLI-G5", + "# Unarchive when Sentry detects a spike in event frequency\nsentry issue archive CLI-G5 --until auto", + "# Archive for 1 hour\nsentry issue archive CLI-G5 --until 1h", + "# Archive for 7 days\nsentry issue archive CLI-G5 --until 7d", + "# Archive until a specific date\nsentry issue archive CLI-G5 --until 2026-12-31", + "# Unarchive after 100 more events\nsentry issue archive CLI-G5 --until 100x", + "# Unarchive after 10 more users are affected\nsentry issue archive CLI-G5 --until 10u", + "# Unarchive after 100 events within 1 hour\nsentry issue archive CLI-G5 --until 100x/1h", + "# Unarchive after 10 users within 1 day\nsentry issue archive CLI-G5 --until 10u/1d", + "# Use the verbose condition form\nsentry issue archive CLI-G5 --until 10events/2hours", + "# `ignore` is an alias for `archive`\nsentry issue ignore CLI-G5 --until auto" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry issue events", + "brief": "List events for a specific issue", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of events (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Search query (Sentry search syntax)" + }, + "full": { + "type": "boolean", + "description": "Include full event body (stacktraces)", + "default": false + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, event.type, groupID, eventID, projectID, message, title, location, culprit, user, tags, platform, dateCreated, crashFile, metadata" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "limit": "text", + "query": "text", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List recent events for an issue\nsentry issue events FRONT-ABC", + "# List events for the most recent issue\nsentry issue events @latest --limit 50", + "# Filter events by search query\nsentry issue events FRONT-ABC --query \"browser:Chrome\"", + "# Show full event details\nsentry issue events FRONT-ABC --full", + "# Limit results and filter by time period\nsentry issue events FRONT-ABC --limit 50 --period 24h", + "# Fetch the next page\nsentry issue events FRONT-ABC -c next", + "# Output as JSON\nsentry issue events FRONT-ABC --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Internal event ID", + "optional": false + }, + { + "name": "event.type", + "type": "string", + "description": "Event type (error, default, transaction)", + "optional": false + }, + { + "name": "groupID", + "type": "string | null", + "description": "ID of the issue the event belongs to", + "optional": true + }, + { + "name": "eventID", + "type": "string", + "description": "UUID-format event ID", + "optional": false + }, + { + "name": "projectID", + "type": "string", + "description": "ID of the project the event belongs to", + "optional": true + }, + { + "name": "message", + "type": "string", + "description": "Event message", + "optional": true + }, + { + "name": "title", + "type": "string", + "description": "Event title", + "optional": true + }, + { + "name": "location", + "type": "string | null", + "description": "Source location of the event, such as a file and line", + "optional": true + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module that caused the event", + "optional": true + }, + { + "name": "user", + "type": "object | null", + "description": "User context of the event", + "optional": true + }, + { + "name": "tags", + "type": "array", + "description": "Tags attached to the event", + "optional": true + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform of the event, such as python or javascript", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the event occurred (ISO 8601)", + "optional": true + }, + { + "name": "crashFile", + "type": "string | null", + "description": "Crash report attachment of the event, if any", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Event metadata", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssueEvents" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry issue explain", + "brief": "Analyze one or more issues using Seer AI", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "issue", + "description": "One or more issue IDs" + } + }, + "flags": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "Force new analysis even if one exists", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Analyze the root cause of an issue (may take a few minutes for new issues)\nsentry issue explain 123456789", + "# Explain the most recent issue\nsentry issue explain @latest", + "# Explain the most frequently occurring issue\nsentry issue explain @most_frequent", + "# Use a short ID with an organization prefix\nsentry issue explain my-org/MYPROJECT-ABC", + "# Analyze multiple issues in one invocation\nsentry issue explain FRONT-ABC BACK-2", + "# Force a fresh analysis\nsentry issue explain 123456789 --force", + "# Output root causes as JSON\nsentry issue explain 123456789 --json" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueAutofixState" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "startOrganizationIssueAutofix" + } + ] + }, + { + "path": "sentry issue link", + "brief": "Link an existing external issue", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + }, + { + "type": "string", + "title": "url", + "description": "URL of an existing tracker issue or GitHub pull request" + } + ], + "items": false, + "minItems": 2 + }, + "flags": { + "type": "object", + "properties": { + "integration": { + "type": "string", + "description": "Native integration ID, when multiple installations match" + }, + "app": { + "type": "string", + "description": "Sentry App slug (automatically detected for Linear URLs)" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "field": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional Sentry App link form field (name=value, repeatable)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue", + "text" + ], + "flags": { + "integration": "integration", + "app": "sentry-app", + "field": "app-link-field", + "fields": "text" + } + }, + "examples": [ + "# Link a GitHub issue\nsentry issue link FRONT-123 https://github.com/example/app/issues/42", + "# Link a GitHub pull request\nsentry issue link FRONT-123 https://github.com/example/app/pull/43", + "# Link a Jira issue in an explicit organization\nsentry issue link my-org/FRONT-123 https://example.atlassian.net/browse/APP-42", + "# Link a Linear issue\nsentry issue link FRONT-123 https://linear.app/example/issue/APP-42/fix-error", + "# Prepare the link without submitting it\nsentry issue link my-org/FRONT-123 https://github.com/example/app/issues/42 --dry-run", + "# Output the result as JSON\nsentry issue link my-org/FRONT-123 https://github.com/example/app/issues/42 --json" + ], + "apiOperations": [ + { + "fn": "executeSentryAppInstallationExternalIssueAction" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "getSentryAppInstallationExternalRequestOptions" + }, + { + "fn": "listOrganizationIssueExternalIssues" + }, + { + "fn": "listOrganizationIssueIntegrations" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationSentryAppComponents" + }, + { + "fn": "listOrganizationSentryAppInstallations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssueIntegration" + } + ] + }, + { + "path": "sentry issue list", + "brief": "List issues in a project", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "Search query (Sentry syntax, implicit AND; same-key OR becomes an in-list)" + }, + "limit": { + "type": "number", + "description": "Maximum number of issues to list", + "default": 25 + }, + "sort": { + "type": "string", + "examples": [ + "recommended", + "date", + "new", + "freq", + "user" + ], + "description": "Sort by: recommended, date, new, freq, user (default: recommended on sentry.io, else date)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "90d" + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Pagination cursor (use \"next\" for next page, \"prev\" for previous)" + }, + "compact": { + "type": "boolean", + "description": "Single-line rows for compact output (auto-detects if omitted)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "query": "issue-query", + "limit": "text", + "sort": "choice", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List issues (project auto-detected)\nsentry issue list", + "# List issues in a specific project\nsentry issue list my-org/frontend", + "# Several projects in the same organization\nsentry issue list my-org/frontend,backend,worker", + "# All projects in an organization\nsentry issue list my-org/", + "# Search for a project across organizations\nsentry issue list frontend", + "# Show only unresolved issues\nsentry issue list my-org/frontend --query \"is:unresolved\"", + "# Sort by frequency\nsentry issue list my-org/frontend --sort freq --limit 20", + "# Sort by Sentry's recommended relevance ranking\nsentry issue list my-org/frontend --sort recommended", + "# Multiple filters (space-separated terms are combined with AND)\nsentry issue list --query \"is:unresolved level:error assigned:me\"", + "# Negation and wildcards\nsentry issue list --query \"!browser:Chrome message:*timeout*\"", + "# Match multiple values for one key\nsentry issue list --query \"browser:[Chrome,Firefox]\"" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Issue metadata", + "optional": true + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry issue merge", + "brief": "Merge 2+ issues into a single canonical group", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "issue", + "description": "Issue IDs to merge (2 or more required)" + } + }, + "flags": { + "type": "object", + "properties": { + "into": { + "type": "string", + "description": "Prefer this issue as the canonical parent (included in the merge if not already listed)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "into": "issue", + "fields": "text" + } + }, + "examples": [ + "# Let Sentry pick the parent (typically the largest by event count)\nsentry issue merge CLI-K9 CLI-15H CLI-15N", + "# Pin the canonical parent explicitly\nsentry issue merge CLI-K9 CLI-15H CLI-15N --into CLI-K9", + "# Use organization-qualified IDs\nsentry issue merge my-org/CLI-K9 my-org/CLI-15H --into my-org/CLI-K9", + "# Use project-alias IDs\nsentry issue merge cli-k9 cli-15h --into cli-k9" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry issue plan", + "brief": "Generate a solution plan using Seer AI", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "Force new plan even if one exists", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Generate a fix plan (runs explain first if needed)\nsentry issue plan 123456789", + "# Generate a fix plan for the most recent issue\nsentry issue plan @latest", + "# Use a short ID with an organization prefix\nsentry issue plan my-org/MYPROJECT-ABC", + "# Force a fresh plan even if one already exists\nsentry issue plan 123456789 --force" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueAutofixState" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "startOrganizationIssueAutofix" + } + ] + }, + { + "path": "sentry issue resolve", + "brief": "Mark an issue as resolved", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "in": { + "type": "string", + "examples": [ + "@next", + "@commit" + ], + "description": "Resolve in a release, next release, or commit ('<version>' | '@next' | '@commit' | '@commit:<repo>@<sha>')" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "in": "choice", + "fields": "text" + } + }, + "examples": [ + "# Resolve immediately (no regression tracking)\nsentry issue resolve CLI-G5", + "# Resolve in a specific release (newer releases flag regressions)\nsentry issue resolve CLI-G5 --in 0.26.1", + "# Monorepo-style release versions work too\nsentry issue resolve CLI-G5 --in spotlight@1.2.3", + "# Resolve in the next release\nsentry issue resolve CLI-G5 --in @next", + "# Resolve in the current git HEAD (auto-detects the Sentry repo from your origin remote)\nsentry issue resolve CLI-G5 --in @commit", + "# Resolve in an explicit commit and repo (no git inspection)\nsentry issue resolve CLI-G5 --in @commit:getsentry/cli@abc123def", + "# Resolve an issue in an explicit organization\nsentry issue resolve my-org/CLI-G5" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationRepos" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry issue tags", + "brief": "Show the top values of an issue tag", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + }, + { + "type": "string", + "title": "key", + "description": "Tag key, e.g. release, server_name, browser.name" + } + ], + "items": false, + "minItems": 2 + }, + "flags": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "Filter to one environment (default: all environments)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: uniqueValues, totalValues, topValues, key, name" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue", + "tag-key" + ], + "flags": { + "environment": "environment", + "fields": "choice-list" + } + }, + "examples": [ + "# Show which releases concentrate an issue's events\nsentry issue tags my-org/FRONT-ABC release", + "# Inspect server distribution for the latest issue in production\nsentry issue tags @latest server_name --environment production", + "# Get browser counts and timestamps as JSON\nsentry issue tags FRONT-ABC browser.name --json", + "# Select the aggregate fields for a release distribution\nsentry issue tags FRONT-ABC release --json --fields key,totalValues,topValues" + ], + "outputFields": [ + { + "name": "uniqueValues", + "type": "number | null", + "optional": true + }, + { + "name": "totalValues", + "type": "number | null", + "description": "Total retained events, including missing tag values; not a lifetime count", + "optional": true + }, + { + "name": "topValues", + "type": "array | null", + "description": "Up to 9 values ordered by count, with nullable counts and first/last seen timestamps", + "optional": true + }, + { + "name": "key", + "type": "string", + "optional": false + }, + { + "name": "name", + "type": "string", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueTag" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry issue unlink", + "brief": "Unlink an external issue", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + }, + { + "type": "string", + "title": "url", + "description": "URL of an existing tracker issue or GitHub pull request" + } + ], + "items": false, + "minItems": 2 + }, + "flags": { + "type": "object", + "properties": { + "integration": { + "type": "string", + "description": "Native integration ID, when multiple installations match" + }, + "app": { + "type": "string", + "description": "Sentry App slug (automatically detected for Linear URLs)" + }, + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue", + "text" + ], + "flags": { + "integration": "integration", + "app": "sentry-app", + "fields": "text" + } + }, + "examples": [ + "# Unlink a GitHub issue (prompts for confirmation)\nsentry issue unlink FRONT-123 https://github.com/example/app/issues/42", + "# Unlink a GitHub pull request without prompting\nsentry issue unlink FRONT-123 https://github.com/example/app/pull/43 --yes", + "# Unlink a Jira issue in an explicit organization\nsentry issue unlink my-org/FRONT-123 https://example.atlassian.net/browse/APP-42 --yes", + "# Check whether a link exists without removing it\nsentry issue unlink FRONT-123 https://linear.app/example/issue/APP-42/fix-error --dry-run" + ], + "apiOperations": [ + { + "fn": "deleteOrganizationIssueExternalIssue" + }, + { + "fn": "deleteOrganizationIssueIntegration" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssueExternalIssues" + }, + { + "fn": "listOrganizationIssueIntegrations" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry issue unresolve", + "brief": "Reopen a resolved issue", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "issue", + "description": "Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Reopen a resolved issue\nsentry issue unresolve CLI-G5", + "# `reopen` is an alias for `unresolve`\nsentry issue reopen CLI-G5", + "# Reopen an issue in an explicit organization\nsentry issue unresolve my-org/CLI-G5" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + }, + { + "fn": "updateOrganizationIssue" + } + ] + }, + { + "path": "sentry issue view", + "brief": "View details of one or more issues", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "issue", + "description": "One or more issue IDs" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "force": { + "type": "boolean", + "description": "Allow --web to open more than 5 issues", + "default": false + }, + "spans": { + "type": "string", + "examples": [ + "all", + "no" + ], + "description": "Span tree depth limit (number, \"all\" for unlimited, \"no\" to disable)", + "default": "3" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, shortId, title, culprit, count, userCount, firstSeen, lastSeen, level, status, permalink, project, metadata, assignedTo, priority, platform, substatus, isUnhandled, seerFixabilityScore, event, org, replayIds, trace" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "issue" + ], + "flags": { + "spans": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# View an issue\nsentry issue view FRONT-ABC", + "# View the most recent issue\nsentry issue view @latest", + "# View several issues (space-separated, not commas)\nsentry issue view FRONT-ABC BACK-2", + "# Select an organization explicitly\nsentry issue view my-org/FRONT-ABC", + "# Use a GitHub-style identifier (the \"#\" replaces the final slash)\nsentry issue view my-org/my-project#FRONT-ABC", + "# Open issues in the browser (up to 5 tabs by default)\nsentry issue view FRONT-ABC BACK-2 -w", + "# Allow more than 5 browser tabs\nsentry issue view FRONT-ABC BACK-2 API-3 WEB-4 IOS-5 OPS-6 -w --force", + "# Full JSON (issue fields + latest event + trace/replay context)\nsentry issue view FRONT-ABC --json", + "# Select top-level fields to keep output small\nsentry issue view FRONT-ABC --json --fields shortId,title,culprit,count,userCount,permalink", + "# Select fields from the latest event instead of the whole event\nsentry issue view FRONT-ABC --json --fields event.id,event.title,event.dateCreated", + "# Extract the request URL and method from the latest event\nsentry issue view FRONT-ABC --json | jq '.event.entries[] | select(.type == \"request\") | .data | {url, method}'", + "# Extract the exception type and value from the latest event\nsentry issue view FRONT-ABC --json | jq '.event.entries[] | select(.type == \"exception\") | .data.values[0] | {type, value}'" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Numeric issue ID", + "optional": false + }, + { + "name": "shortId", + "type": "string", + "description": "Human-readable short ID (e.g. PROJ-ABC)", + "optional": false + }, + { + "name": "title", + "type": "string", + "description": "Issue title", + "optional": false + }, + { + "name": "culprit", + "type": "string | null", + "description": "Function or module where the issue occurs", + "optional": true + }, + { + "name": "count", + "type": "string", + "description": "Total number of events in the issue", + "optional": true + }, + { + "name": "userCount", + "type": "number", + "description": "Number of users affected by the issue", + "optional": true + }, + { + "name": "firstSeen", + "type": "string | null", + "description": "When the issue was first seen (ISO 8601)", + "optional": true + }, + { + "name": "lastSeen", + "type": "string | null", + "description": "When the issue was last seen (ISO 8601)", + "optional": true + }, + { + "name": "level", + "type": "string", + "description": "Severity level of the issue", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Issue status", + "optional": true + }, + { + "name": "permalink", + "type": "string", + "description": "URL of the issue in Sentry", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Project the issue belongs to", + "optional": true + }, + { + "name": "metadata", + "type": "object", + "description": "Issue metadata", + "optional": true + }, + { + "name": "assignedTo", + "type": "object | null", + "description": "User or team the issue is assigned to", + "optional": true + }, + { + "name": "priority", + "type": "string", + "description": "Triage priority", + "optional": true + }, + { + "name": "platform", + "type": "string", + "description": "Platform", + "optional": true + }, + { + "name": "substatus", + "type": "string | null", + "description": "Issue substatus", + "optional": true + }, + { + "name": "isUnhandled", + "type": "boolean", + "description": "Whether the issue is unhandled", + "optional": true + }, + { + "name": "seerFixabilityScore", + "type": "number | null", + "description": "Seer AI fixability score (0-1)", + "optional": true + }, + { + "name": "event", + "type": "unknown | null", + "description": "Latest event for the issue (full detail). Select named fields with `--fields event.id,event.title` to avoid pulling the whole payload; the `request` entry may include live session data.", + "optional": false + }, + { + "name": "org", + "type": "string | null", + "description": "Organization slug", + "optional": false + }, + { + "name": "replayIds", + "type": "array", + "description": "Related Session Replay IDs", + "optional": false + }, + { + "name": "trace", + "type": "object | null", + "description": "Trace context from the latest event's span tree", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssue" + }, + { + "fn": "getOrganizationIssueEvent" + }, + { + "fn": "getOrganizationReplayCount" + }, + { + "fn": "getOrganizationTrace" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry log list", + "brief": "List logs from a project", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project-or-trace-id", + "description": "[<org>/[<project>/]]<trace-id>, <org>/<project>, or <project>" + } + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of log entries (1-1000)", + "default": 100 + }, + "query": { + "type": "string", + "description": "Filter query (e.g., \"severity:error\", \"project:backend\", \"project:[a,b]\")" + }, + "follow": { + "type": "string", + "description": "Stream logs (optionally specify poll interval in seconds)" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"" + }, + "sort": { + "type": "string", + "examples": [ + "newest", + "oldest" + ], + "description": "Sort order: \"newest\" (default) or \"oldest\"", + "default": "newest" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: sentry.item_id, timestamp, timestamp_precise, message, severity, trace" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "follow": "text", + "period": "period", + "sort": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List the last 100 logs\nsentry log list", + "# Show only error logs\nsentry log list -q 'severity:error'", + "# Filter by message content\nsentry log list -q 'database'", + "# Match a regular expression (key://pattern//)\nsentry log list -q 'message://^Timeout after \\d+ms//'", + "# Show the last 50 logs\nsentry log list --limit 50", + "# List logs for a trace\nsentry log list abc123def456abc123def456abc12345", + "# Stream logs (2-second poll interval)\nsentry log list -f", + "# Stream logs (5-second poll interval)\nsentry log list -f 5", + "# Stream error logs from a specific project\nsentry log list my-org/backend -f -q 'severity:error'", + "# Filter JSON output with jq\nsentry log list --json | jq '.data[] | select(.severity == \"error\")'", + "# Filter by trace in an explicit organization\nsentry log list my-org/abc123def456abc123def456abc12345" + ], + "outputFields": [ + { + "name": "sentry.item_id", + "type": "string", + "description": "Unique log entry ID", + "optional": false + }, + { + "name": "timestamp", + "type": "string", + "description": "Log timestamp (ISO 8601)", + "optional": false + }, + { + "name": "timestamp_precise", + "type": "number", + "description": "Nanosecond-precision timestamp", + "optional": false + }, + { + "name": "message", + "type": "string | null", + "description": "Log message", + "optional": true + }, + { + "name": "severity", + "type": "string | null", + "description": "Severity level (error, warning, info, debug)", + "optional": true + }, + { + "name": "trace", + "type": "string | null", + "description": "Trace ID for correlation", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=logs. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry log view", + "brief": "View details of one or more log entries", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/log-id", + "description": "[<org>/<project>] <log-id> [<log-id>...] - Target (optional) and one or more log IDs" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# View a log entry\nsentry log view 968c763c740cfda8b6728f27fb9e9b01", + "# Specify the project explicitly\nsentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01", + "# Open in the browser\nsentry log view 968c763c740cfda8b6728f27fb9e9b01 -w", + "# Find a project across organizations\nsentry log view backend 968c763c740cfda8b6728f27fb9e9b01" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=logs. The command may add filters or requests." + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry monitor list", + "brief": "List cron monitors", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of monitors to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, status, isMuted, config, dateCreated, project, orgSlug" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List monitors (organization auto-detected)\nsentry monitor list", + "# List cron monitors in an organization\nsentry monitor list my-org/", + "# Fetch the next page\nsentry monitor list my-org/ -c next", + "# Only monitors whose slug or name matches a glob\nsentry monitor list 'my-org/nightly-*'", + "# Monitors named like 'nightly' (fuzzy when nothing matches exactly)\nsentry monitor list my-org/nigthly", + "# Output as JSON\nsentry monitor list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Monitor ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Monitor slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Monitor name", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Monitor status (e.g. active, disabled)", + "optional": false + }, + { + "name": "isMuted", + "type": "boolean", + "description": "Whether the monitor is muted", + "optional": true + }, + { + "name": "config", + "type": "object", + "description": "Schedule configuration", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "description": "Creation date (ISO 8601)", + "optional": true + }, + { + "name": "project", + "type": "object", + "description": "Owning project", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationMonitors" + } + ] + }, + { + "path": "sentry org list", + "brief": "List organizations", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "filter", + "description": "Only list organizations whose slug or name fuzzy-matches this text or matches this glob" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of organizations to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "account": { + "type": "string", + "description": "Only list organizations of this account (email, username, or account id; <who>:<server> for one server; env:SENTRY_AUTH_TOKEN)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, dateCreated, status, isEarlyAdopter, require2FA, features, avatar, links, hasAuthProvider, allowMemberInvite, allowMemberProjectCreation, orgRole, region, account" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "account": "account", + "fields": "choice-list" + } + }, + "examples": [ + "# List organizations\nsentry org list", + "# Only organizations whose slug or name matches (fuzzy, best matches first)\nsentry org list acme", + "# Only organizations matching a glob\nsentry org list 'acme-*'", + "# Only one account's organizations\nsentry org list --account jane@acme.com", + "# Same email on several servers: add the server\nsentry org list -a jane@example.com:sentry.io", + "# Output as JSON\nsentry org list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Organization ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Organization name", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the organization was created (ISO 8601)", + "optional": true + }, + { + "name": "status", + "type": "object", + "description": "Organization status", + "optional": true + }, + { + "name": "isEarlyAdopter", + "type": "boolean", + "description": "Whether the organization is an early adopter", + "optional": true + }, + { + "name": "require2FA", + "type": "boolean", + "description": "Whether members must use two-factor authentication", + "optional": true + }, + { + "name": "features", + "type": "array", + "description": "Features enabled for the organization", + "optional": true + }, + { + "name": "avatar", + "type": "object", + "description": "Organization avatar", + "optional": true + }, + { + "name": "links", + "type": "object", + "description": "Organization and region URLs", + "optional": true + }, + { + "name": "hasAuthProvider", + "type": "boolean", + "description": "Whether SSO is configured for the organization", + "optional": true + }, + { + "name": "allowMemberInvite", + "type": "boolean", + "description": "Whether members can invite other members", + "optional": true + }, + { + "name": "allowMemberProjectCreation", + "type": "boolean", + "description": "Whether members can create projects", + "optional": true + }, + { + "name": "orgRole", + "type": "string", + "description": "Your role in the organization", + "optional": true + }, + { + "name": "region", + "type": "string", + "description": "Region, when orgs span several (e.g. US, EU)", + "optional": true + }, + { + "name": "account", + "type": "object", + "description": "Account the org was listed under, across accounts", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry org view", + "brief": "View details of an organization", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org", + "description": "Organization slug (optional if auto-detected)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, dateCreated, status, isEarlyAdopter, require2FA, features, avatar, links, hasAuthProvider, allowMemberInvite, allowMemberProjectCreation, orgRole" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# View organization details\nsentry org view my-org", + "# Open in the browser\nsentry org view my-org -w" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Organization ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Organization name", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the organization was created (ISO 8601)", + "optional": true + }, + { + "name": "status", + "type": "object", + "description": "Organization status", + "optional": true + }, + { + "name": "isEarlyAdopter", + "type": "boolean", + "description": "Whether the organization is an early adopter", + "optional": true + }, + { + "name": "require2FA", + "type": "boolean", + "description": "Whether members must use two-factor authentication", + "optional": true + }, + { + "name": "features", + "type": "array", + "description": "Features enabled for the organization", + "optional": true + }, + { + "name": "avatar", + "type": "object", + "description": "Organization avatar", + "optional": true + }, + { + "name": "links", + "type": "object", + "description": "Organization and region URLs", + "optional": true + }, + { + "name": "hasAuthProvider", + "type": "boolean", + "description": "Whether SSO is configured for the organization", + "optional": true + }, + { + "name": "allowMemberInvite", + "type": "boolean", + "description": "Whether members can invite other members", + "optional": true + }, + { + "name": "allowMemberProjectCreation", + "type": "boolean", + "description": "Whether members can create projects", + "optional": true + }, + { + "name": "orgRole", + "type": "string", + "description": "Your role in the organization", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry platform list", + "brief": "List all valid Sentry platform identifiers", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "search": { + "type": "string", + "description": "Filter platforms by substring" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "search": "platform", + "fields": "text" + } + }, + "examples": [ + "# List all valid Sentry platform identifiers\nsentry platform list", + "# Filter by substring\nsentry platform list --search python", + "# Output as JSON\nsentry platform list --json" + ], + "apiOperations": [] + }, + { + "path": "sentry proguard upload", + "brief": "Upload ProGuard/R8 mapping files to Sentry", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "path", + "description": "Paths to ProGuard/R8 mapping files" + } + }, + "flags": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "description": "Force a specific UUID instead of computing from file content (only valid with a single file)" + }, + "no-upload": { + "type": "boolean", + "description": "Compute and print UUIDs without uploading (dry-run)", + "default": false + }, + "require-one": { + "type": "boolean", + "description": "Require at least one mapping file (error if none provided)", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "uuid": "text", + "fields": "text" + } + }, + "examples": [ + "# Upload a ProGuard/R8 mapping file\nsentry proguard upload ./app/build/outputs/mapping/release/mapping.txt", + "# Upload multiple mapping files\nsentry proguard upload mapping-release.txt mapping-debug.txt", + "# Validate without uploading\nsentry proguard upload mapping.txt --no-upload", + "# Fail if no mapping files are found (useful in CI)\nsentry proguard upload ./mapping/ --require-one", + "# Upload with an explicit UUID\nsentry proguard upload mapping.txt --uuid 5db7294d-87fc-5726-a5c0-4a90679657a5" + ], + "apiOperations": [ + { + "fn": "assembleProjectDebugFiles" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry proguard uuid", + "brief": "Compute the UUID for a ProGuard mapping file", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the ProGuard mapping file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Compute the UUID for a ProGuard/R8 mapping file\nsentry proguard uuid ./app/build/outputs/mapping/release/mapping.txt", + "# Output as JSON (includes the file path)\nsentry proguard uuid mapping.txt --json" + ], + "apiOperations": [] + }, + { + "path": "sentry project create", + "brief": "Create one or more projects", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "name:platform", + "description": "One or more project name and platform pairs" + } + }, + "flags": { + "type": "object", + "properties": { + "team": { + "type": "string", + "description": "Team to create the project under" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "project-spec" + ], + "flags": { + "team": "team", + "fields": "text" + } + }, + "examples": [ + "# Create a project (every project is a name:platform pair)\nsentry project create my-new-app:javascript-nextjs", + "# Create several projects with their own platforms\nsentry project create web:javascript api:python-django worker:node", + "# Create under a specific organization and team\nsentry project create my-org/my-new-app:python --team backend-team", + "# Preview without creating\nsentry project create my-new-app:node --dry-run", + "# Output the created project as JSON\nsentry project create my-app:go --json" + ], + "apiOperations": [ + { + "fn": "addOrganizationMemberTeam" + }, + { + "fn": "createOrganizationProject" + }, + { + "fn": "createOrganizationTeam" + }, + { + "fn": "createTeamProject" + }, + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listOrganizationTeams" + }, + { + "fn": "listProjectKeys" + } + ] + }, + { + "path": "sentry project delete", + "brief": "Delete a project", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/<project> or <project> (search across orgs)" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Delete a project (prompts for confirmation)\nsentry project delete my-org/old-project", + "# Delete without confirmation\nsentry project delete my-org/old-project --yes", + "# Preview the deletion\nsentry project delete my-org/old-project --dry-run" + ], + "apiOperations": [ + { + "fn": "deleteProject" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry project list", + "brief": "List projects", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of projects to list", + "default": 25 + }, + "platform": { + "type": "string", + "description": "Filter by platform (e.g., javascript, python)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, platform, platforms, dateCreated, firstEvent, status, isBookmarked, isMember, hasAccess, features, team, teams, environments, latestRelease, organization, orgSlug" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "platform": "platform", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List projects (organization auto-detected)\nsentry project list", + "# List all projects in an organization\nsentry project list my-org/", + "# Several projects in the same organization\nsentry project list my-org/frontend,backend", + "# Filter by platform\nsentry project list my-org/ --platform javascript", + "# Only projects whose slug or name matches a glob\nsentry project list 'my-org/web-*'", + "# Projects named like 'frontend' (fuzzy when nothing matches exactly)\nsentry project list my-org/frontnd", + "# Find a project across organizations\nsentry project list frontend", + "# Fetch the next page\nsentry project list my-org/ -c next", + "# Show more results\nsentry project list my-org/ --limit 50", + "# Output as JSON\nsentry project list my-org/ --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Project ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Project slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Project name", + "optional": false + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform of the project", + "optional": true + }, + { + "name": "platforms", + "type": "array", + "description": "Platforms seen in the project's events", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the project was created (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the project received its first event (ISO 8601)", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Project status", + "optional": true + }, + { + "name": "isBookmarked", + "type": "boolean", + "description": "Whether the requesting user bookmarked the project", + "optional": true + }, + { + "name": "isMember", + "type": "boolean", + "description": "Whether the requesting user is a member of a team with access to the project", + "optional": true + }, + { + "name": "hasAccess", + "type": "boolean", + "description": "Whether the requesting user has access to the project", + "optional": true + }, + { + "name": "features", + "type": "array", + "description": "Features enabled for the project", + "optional": true + }, + { + "name": "team", + "type": "object | null", + "description": "First team with access to the project; use teams instead", + "optional": true + }, + { + "name": "teams", + "type": "array", + "description": "Teams with access to the project", + "optional": true + }, + { + "name": "environments", + "type": "array", + "description": "Environments seen in the project's events", + "optional": true + }, + { + "name": "latestRelease", + "type": "object | null", + "description": "Latest release of the project", + "optional": true + }, + { + "name": "organization", + "type": "object", + "description": "Organization (detail responses only)", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry project view", + "brief": "View details of a project", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/<project> or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, platform, platforms, dateCreated, firstEvent, status, isBookmarked, isMember, hasAccess, features, team, teams, environments, latestRelease, organization, dsn" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# View the auto-detected project\nsentry project view", + "# View project details\nsentry project view my-org/frontend", + "# Open the project in the browser\nsentry project view my-org/frontend -w", + "# Find a project across organizations\nsentry project view frontend" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Project ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Project slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Project name", + "optional": false + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform of the project", + "optional": true + }, + { + "name": "platforms", + "type": "array", + "description": "Platforms seen in the project's events", + "optional": true + }, + { + "name": "dateCreated", + "type": "string", + "description": "When the project was created (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the project received its first event (ISO 8601)", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Project status", + "optional": true + }, + { + "name": "isBookmarked", + "type": "boolean", + "description": "Whether the requesting user bookmarked the project", + "optional": true + }, + { + "name": "isMember", + "type": "boolean", + "description": "Whether the requesting user is a member of a team with access to the project", + "optional": true + }, + { + "name": "hasAccess", + "type": "boolean", + "description": "Whether the requesting user has access to the project", + "optional": true + }, + { + "name": "features", + "type": "array", + "description": "Features enabled for the project", + "optional": true + }, + { + "name": "team", + "type": "object | null", + "description": "First team with access to the project; use teams instead", + "optional": true + }, + { + "name": "teams", + "type": "array", + "description": "Teams with access to the project", + "optional": true + }, + { + "name": "environments", + "type": "array", + "description": "Environments seen in the project's events", + "optional": true + }, + { + "name": "latestRelease", + "type": "object | null", + "description": "Latest release of the project", + "optional": true + }, + { + "name": "organization", + "type": "object", + "description": "Organization (detail responses only)", + "optional": true + }, + { + "name": "dsn", + "type": "string | null", + "description": "Primary DSN", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectKeys" + } + ] + }, + { + "path": "sentry react-native gradle", + "brief": "Upload a React Native bundle + sourcemap (Gradle build step)", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "sourcemap": { + "type": "string", + "description": "Path to the sourcemap to upload" + }, + "bundle": { + "type": "string", + "description": "Path to the bundle to upload" + }, + "release": { + "type": "string", + "description": "Release version to publish to" + }, + "dist": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Distribution(s) to publish (repeatable; requires --release)" + }, + "wait": { + "type": "boolean", + "description": "Wait for the server to fully process the uploaded files" + }, + "wait-for": { + "type": "string", + "description": "Wait for processing, but at most this many seconds" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "required": [ + "sourcemap", + "bundle" + ], + "additionalProperties": false + } + }, + "required": [ + "flags" + ], + "additionalProperties": false + }, + "completions": { + "flags": { + "sourcemap": "file", + "bundle": "file", + "release": "release", + "dist": "text", + "wait-for": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "sourcemap", + "bundle" + ], + "examples": [ + "# Upload a bundle and sourcemap by debug ID (called by the Gradle plugin)\nsentry react-native gradle --bundle index.android.bundle --sourcemap index.android.bundle.map", + "# Also associate with a release and distribution\nsentry react-native gradle --bundle index.android.bundle --sourcemap index.android.bundle.map --release com.example.app@1.0.0 --dist 1000" + ], + "apiOperations": [ + { + "fn": "assembleOrganizationArtifactBundle" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry react-native xcode", + "brief": "Upload React Native sourcemaps (Xcode build step)", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "script-arg", + "description": "Extra arguments passed to the build script" + } + }, + "flags": { + "type": "object", + "properties": { + "force": { + "type": "boolean", + "description": "Run even in a debug configuration" + }, + "allow-fetch": { + "type": "boolean", + "description": "Fetch sourcemaps from the packager on simulator builds" + }, + "fetch-from": { + "type": "string", + "description": "Packager URL to fetch from (default: http://127.0.0.1:8081/)" + }, + "build-script": { + "type": "string", + "description": "Path to the react-native-xcode.sh build script" + }, + "dist": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Distribution(s) to publish (repeatable)" + }, + "wait": { + "type": "boolean", + "description": "Wait for the server to fully process the uploaded files" + }, + "wait-for": { + "type": "string", + "description": "Wait for processing, but at most this many seconds" + }, + "no-auto-release": { + "type": "boolean", + "description": "Don't read the release from Xcode project files" + }, + "allow-xcode-infoplist-preprocessing": { + "type": "boolean", + "description": "Run the C preprocessor over Info.plist (INFOPLIST_PREPROCESS)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "text" + ], + "flags": { + "fetch-from": "text", + "build-script": "file", + "dist": "text", + "wait-for": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "build-script" + ], + "examples": [ + "# Run as the Xcode build phase (usually added automatically to your build script)\nsentry react-native xcode" + ], + "apiOperations": [ + { + "fn": "assembleOrganizationArtifactBundle" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry release archive", + "brief": "Archive a release", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to archive" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages, dryRun, org" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Archive a release (hide it from the default list, but keep it)\nsentry release archive 1.0.0", + "# Archive a release in an explicit organization\nsentry release archive my-org/1.0.0", + "# Preview without archiving\nsentry release archive my-org/1.0.0 --dry-run" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug (--dry-run)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationRelease" + } + ] + }, + { + "path": "sentry release create", + "brief": "Create a release", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to create" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "Associate with project(s), comma-separated" + }, + "finalize": { + "type": "boolean", + "description": "Immediately finalize the release (set dateReleased)", + "default": false + }, + "ref": { + "type": "string", + "description": "Git ref (branch or tag name)" + }, + "url": { + "type": "string", + "description": "URL to the release source" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages, dryRun" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "project": "project-list", + "ref": "vcs-ref", + "url": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Create a release\nsentry release create 1.0.0", + "# Create a release in an explicit organization\nsentry release create my-org/1.0.0", + "# Create and finalize a release\nsentry release create 1.0.0 --finalize", + "# Create a release for specific projects\nsentry release create 1.0.0 --project proj-a,proj-b", + "# Typical CI release: create, associate commits, finalize, and record a deploy\nsentry release create my-org/1.0.0 --project my-project\nsentry release set-commits my-org/1.0.0 --auto\nsentry release finalize my-org/1.0.0\nsentry release deploy my-org/1.0.0 production", + "# Create a release from a proposed version\nsentry release create \"$(sentry release propose-version --json | jq -r .version)\"", + "# Set the release ref and URL\nsentry release create 1.0.0 --ref main --url https://github.com/org/repo/releases/tag/1.0.0", + "# Preview without creating\nsentry release create 1.0.0 --dry-run" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release (only slug with --dry-run)", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "createOrganizationRelease" + }, + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry release delete", + "brief": "Delete a release", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to delete" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: deleted, org, version, dryRun" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Delete a release (prompts for confirmation)\nsentry release delete my-org/1.0.0", + "# Skip confirmation\nsentry release delete my-org/1.0.0 --yes", + "# Preview without deleting\nsentry release delete my-org/1.0.0 --dry-run" + ], + "outputFields": [ + { + "name": "deleted", + "type": "boolean", + "description": "Whether the release was deleted", + "optional": false + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "deleteOrganizationRelease" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationRelease" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry release deploy", + "brief": "Create a deploy for a release", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version" + }, + { + "type": "string", + "title": "environment", + "description": "Deploy environment (e.g. production)" + }, + { + "type": "string", + "title": "name", + "description": "Optional deploy name (quote multi-word names, e.g. \"Deploy #42\")" + } + ], + "items": false, + "minItems": 2 + }, + "flags": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL for the deploy" + }, + "started": { + "type": "string", + "description": "Deploy start time (ISO 8601)" + }, + "finished": { + "type": "string", + "description": "Deploy finish time (ISO 8601)" + }, + "time": { + "type": "string", + "description": "Deploy duration in seconds (sets started = now - time, finished = now)" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, environment, name, url, dateStarted, dateFinished, dryRun, version" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org", + "environment", + "text" + ], + "flags": { + "url": "text", + "started": "text", + "finished": "text", + "time": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Create a deploy\nsentry release deploy 1.0.0 production", + "# Create a named deploy in an explicit organization\nsentry release deploy my-org/1.0.0 staging \"Deploy #42\"", + "# Attach a deploy URL\nsentry release deploy 1.0.0 production --url https://example.com", + "# Record a deploy duration in seconds\nsentry release deploy 1.0.0 production --time 120", + "# Preview without creating\nsentry release deploy 1.0.0 production --dry-run" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "The ID of the deploy", + "optional": true + }, + { + "name": "environment", + "type": "string", + "description": "The environment name", + "optional": false + }, + { + "name": "name", + "type": "string | null", + "description": "The optional name of the deploy", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "The optional URL that points to the deploy", + "optional": true + }, + { + "name": "dateStarted", + "type": "string | null", + "description": "Start date (ISO 8601)", + "optional": true + }, + { + "name": "dateFinished", + "type": "string", + "description": "Finish date (ISO 8601)", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version (--dry-run)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "createOrganizationReleaseDeploy" + }, + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry release deploys", + "brief": "List deploys for a release", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, environment, name, url, dateStarted, dateFinished" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# List deploys for a release\nsentry release deploys 1.0.0", + "# List deploys for a release in an explicit organization\nsentry release deploys my-org/1.0.0", + "# Output as JSON\nsentry release deploys 1.0.0 --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "The ID of the deploy", + "optional": false + }, + { + "name": "environment", + "type": "string", + "description": "The environment name", + "optional": false + }, + { + "name": "name", + "type": "string | null", + "description": "The optional name of the deploy", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "The optional URL that points to the deploy", + "optional": true + }, + { + "name": "dateStarted", + "type": "string | null", + "description": "Start date (ISO 8601)", + "optional": true + }, + { + "name": "dateFinished", + "type": "string", + "description": "Finish date (ISO 8601)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationReleaseDeploys" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry release finalize", + "brief": "Finalize a release", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to finalize" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "released": { + "type": "string", + "description": "Custom release timestamp (ISO 8601). Defaults to now." + }, + "url": { + "type": "string", + "description": "URL for the release" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages, dryRun, org, released" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "released": "text", + "url": "text", + "fields": "choice-list" + } + }, + "examples": [ + "# Finalize a release\nsentry release finalize 1.0.0", + "# Finalize a release in an explicit organization\nsentry release finalize my-org/1.0.0", + "# Set a custom release timestamp\nsentry release finalize 1.0.0 --released 2025-01-01T00:00:00Z", + "# Preview without finalizing\nsentry release finalize 1.0.0 --dry-run" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug (--dry-run)", + "optional": true + }, + { + "name": "released", + "type": "string", + "description": "Release date to set (--dry-run)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationRelease" + } + ] + }, + { + "path": "sentry release list", + "brief": "List releases with adoption and health metrics", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of releases to list", + "default": 25 + }, + "sort": { + "type": "string", + "examples": [ + "date", + "sessions", + "users", + "crash_free_sessions", + "crash_free_users" + ], + "description": "Sort: date, sessions, users, crash_free_sessions (cfs), crash_free_users (cfu)", + "default": "date" + }, + "environment": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by environment (repeatable, comma-separated)" + }, + "period": { + "type": "string", + "description": "Health stats period (e.g., 24h, 7d, 14d, 90d)", + "default": "90d" + }, + "status": { + "type": "string", + "examples": [ + "open", + "archived" + ], + "description": "Filter by status: open (default) or archived", + "default": "open" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages, orgSlug, targetProject" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "sort": "choice", + "environment": "environment-list", + "period": "period", + "status": "choice", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List releases (project auto-detected)\nsentry release list", + "# List all releases in an organization\nsentry release list my-org/", + "# List releases for one project\nsentry release list my-org/my-project", + "# Sort by crash-free sessions\nsentry release list --sort cfs", + "# Filter by environment\nsentry release list --environment production", + "# Show the last 7 days of health data\nsentry release list --period 7d", + "# Output as JSON\nsentry release list --json", + "# Fetch the next page\nsentry release list my-org/ -c next" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + }, + { + "name": "targetProject", + "type": "string", + "description": "Project slug, when listing several", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReleases" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectEnvironments" + } + ] + }, + { + "path": "sentry release propose-version", + "brief": "Propose a release version", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Propose a version from git HEAD\nsentry release propose-version", + "# Output as JSON\nsentry release propose-version --json", + "# Create a release named after the proposed version\nsentry release create \"$(sentry release propose-version --json | jq -r .version)\"" + ], + "apiOperations": [] + }, + { + "path": "sentry release restore", + "brief": "Restore an archived release", + "permission": "write", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to restore" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages, dryRun, org" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# Restore a previously archived release\nsentry release restore 1.0.0", + "# Restore a release in an explicit organization\nsentry release restore my-org/1.0.0", + "# Preview without restoring\nsentry release restore 1.0.0 --dry-run" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + }, + { + "name": "dryRun", + "type": "boolean", + "description": "True when --dry-run made no change", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug (--dry-run)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationRelease" + } + ] + }, + { + "path": "sentry release set-commits", + "brief": "Set commits for a release", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "auto": { + "type": "boolean", + "description": "Auto-discover commits via repository integration (needs a git checkout or CI repository variables)", + "default": false + }, + "local": { + "type": "boolean", + "description": "Read commits from local git history", + "default": false + }, + "clear": { + "type": "boolean", + "description": "Clear all commits from the release", + "default": false + }, + "commit": { + "type": "string", + "description": "Explicit commit as REPO@SHA or REPO@PREV..SHA (comma-separated)" + }, + "path": { + "type": "string", + "description": "Filter commits to these paths (comma-separated). Implies --local." + }, + "from": { + "type": "string", + "description": "Read the local range <ref>..HEAD (e.g. previous release tag). Implies --local." + }, + "initial-depth": { + "type": "number", + "description": "Number of commits to read with --local", + "default": 20 + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "commit": "repo-commit-list", + "path": "file", + "from": "git-ref", + "initial-depth": "text", + "fields": "choice-list" + } + }, + "localPathFlags": [ + "path" + ], + "examples": [ + "# Associate commits using the repository integration\nsentry release set-commits 1.0.0 --auto", + "# Set commits from local git history\nsentry release set-commits my-org/1.0.0 --local", + "# Read up to 50 local commits\nsentry release set-commits 1.0.0 --local --initial-depth 50", + "# Only include commits that touch specific paths\nsentry release set-commits 1.0.0 --path apps/mobile,packages/shared-ui", + "# Read local commits since a previous release tag\nsentry release set-commits 1.0.0 --from v0.9.0", + "# Set an explicit commit range\nsentry release set-commits 1.0.0 --commit owner/repo@abc123..def456", + "# Clear the release's commits\nsentry release set-commits 1.0.0 --clear" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationRepos" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "updateOrganizationRelease" + } + ] + }, + { + "path": "sentry release view", + "brief": "View release details with health metrics", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/version", + "description": "[<org>/]<version> - Release version to view" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, version, shortVersion, versionInfo, status, ref, url, dateCreated, dateReleased, firstEvent, lastEvent, newGroups, commitCount, deployCount, lastCommit, lastDeploy, authors, owner, projects, adoptionStages" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# View release details\nsentry release view 1.0.0", + "# View a release in an explicit organization\nsentry release view my-org/1.0.0", + "# View a release whose version contains a package name\nsentry release view \"sentry-cli@0.24.0\"", + "# Output as JSON\nsentry release view 1.0.0 --json" + ], + "outputFields": [ + { + "name": "id", + "type": "number", + "description": "Release ID", + "optional": true + }, + { + "name": "version", + "type": "string", + "description": "Release version", + "optional": false + }, + { + "name": "shortVersion", + "type": "string", + "description": "Shortened release version", + "optional": true + }, + { + "name": "versionInfo", + "type": "object | null", + "description": "Parsed version information", + "optional": true + }, + { + "name": "status", + "type": "string", + "description": "Release status (open or archived)", + "optional": true + }, + { + "name": "ref", + "type": "string | null", + "description": "Version control reference, such as a commit SHA or tag", + "optional": true + }, + { + "name": "url", + "type": "string | null", + "description": "Release URL", + "optional": true + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the release was created (ISO 8601)", + "optional": true + }, + { + "name": "dateReleased", + "type": "string | null", + "description": "When the release went live (ISO 8601)", + "optional": true + }, + { + "name": "firstEvent", + "type": "string | null", + "description": "When the release received its first event (ISO 8601)", + "optional": true + }, + { + "name": "lastEvent", + "type": "string | null", + "description": "When the release received its most recent event (ISO 8601)", + "optional": true + }, + { + "name": "newGroups", + "type": "number", + "description": "Number of new issues first seen in the release", + "optional": true + }, + { + "name": "commitCount", + "type": "number", + "description": "Number of commits in the release", + "optional": true + }, + { + "name": "deployCount", + "type": "number", + "description": "Number of deploys of the release", + "optional": true + }, + { + "name": "lastCommit", + "type": "object | null", + "description": "Most recent commit in the release", + "optional": true + }, + { + "name": "lastDeploy", + "type": "object | null", + "description": "Most recent deploy of the release", + "optional": true + }, + { + "name": "authors", + "type": "array", + "description": "Authors of the release's commits", + "optional": true + }, + { + "name": "owner", + "type": "object | null", + "description": "Release owner", + "optional": true + }, + { + "name": "projects", + "type": "array", + "description": "Projects in the release", + "optional": true + }, + { + "name": "adoptionStages", + "type": "object | null", + "description": "Adoption stage of the release in each project", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationRelease" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry replay download", + "brief": "Download a Session Replay as rrweb JSON", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "replay-id-or-url", + "description": "[<org>/<project>] <replay-id or trace-id> or <replay-url>" + } + }, + "flags": { + "type": "object", + "properties": { + "output": { + "type": "string", + "description": "Output path (default: <replay-id>.rrweb.json in the current directory)" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "output": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Download a replay as rrweb JSON to ./<replay-id>.rrweb.json\nsentry replay download my-org/346789a703f6454384f1de473b8b9fcc", + "# Choose where the file goes\nsentry replay download my-org/346789a703f6454384f1de473b8b9fcc --output ./replay.json", + "# Download from a replay URL\nsentry replay download https://sentry.io/organizations/my-org/explore/replays/346789a703f6454384f1de473b8b9fcc/" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationReplay" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReplays" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectReplayRecordingSegments" + } + ] + }, + { + "path": "sentry replay list", + "brief": "List recent Session Replays", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all projects), <org>/<project>, or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of replays (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Search query (Sentry replay search syntax)" + }, + "environment": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by environment (repeatable, comma-separated)" + }, + "sort": { + "type": "string", + "examples": [ + "date", + "oldest", + "duration", + "errors", + "activity" + ], + "description": "Sort by: date, oldest, duration, errors, activity, or a raw replay sort field", + "default": "date" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: activity, browser, count_dead_clicks, count_errors, count_infos, count_rage_clicks, count_segments, count_urls, count_warnings, device, dist, duration, environment, error_ids, finished_at, has_viewed, id, info_ids, is_archived, os, ota_updates, platform, project_id, releases, sdk, started_at, tags, trace_ids, urls, user, warning_ids" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "environment": "environment-list", + "sort": "choice", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List recent replays (project auto-detected)\nsentry replay list", + "# List recent replays for a project\nsentry replay list my-org/frontend", + "# Search across all projects in an organization\nsentry replay list my-org/ --query \"environment:production\"", + "# Change the time window and sort\nsentry replay list my-org/frontend --period 24h --sort errors", + "# Find replays for a user\nsentry replay list my-org/frontend -q \"user.email:foo@example.com\"", + "# Filter by environments\nsentry replay list my-org/frontend -e production -e canary", + "# Show more results\nsentry replay list my-org/frontend --limit 50", + "# Fetch the next page\nsentry replay list my-org/frontend -c next", + "# Fetch the previous page\nsentry replay list my-org/frontend -c prev", + "# Output as JSON\nsentry replay list my-org/frontend --json", + "# Find a project across organizations\nsentry replay list frontend" + ], + "outputFields": [ + { + "name": "activity", + "type": "number | null", + "description": "Replay activity score", + "optional": true + }, + { + "name": "browser", + "type": "object | null", + "description": "Browser metadata", + "optional": true + }, + { + "name": "count_dead_clicks", + "type": "number | null", + "description": "Dead click count", + "optional": true + }, + { + "name": "count_errors", + "type": "number | null", + "description": "Associated error count", + "optional": true + }, + { + "name": "count_infos", + "type": "number | null", + "description": "Info event count", + "optional": true + }, + { + "name": "count_rage_clicks", + "type": "number | null", + "description": "Rage click count", + "optional": true + }, + { + "name": "count_segments", + "type": "number | null", + "description": "Recording segment count", + "optional": true + }, + { + "name": "count_urls", + "type": "number | null", + "description": "Visited URL count", + "optional": true + }, + { + "name": "count_warnings", + "type": "number | null", + "description": "Warning event count", + "optional": true + }, + { + "name": "device", + "type": "object | null", + "description": "Device metadata", + "optional": true + }, + { + "name": "dist", + "type": "string | null", + "description": "Distribution", + "optional": true + }, + { + "name": "duration", + "type": "number | null", + "description": "Replay duration in seconds", + "optional": true + }, + { + "name": "environment", + "type": "string | null", + "description": "Environment", + "optional": true + }, + { + "name": "error_ids", + "type": "array", + "description": "Linked error IDs", + "optional": false + }, + { + "name": "finished_at", + "type": "string | null", + "description": "Replay finish timestamp", + "optional": true + }, + { + "name": "has_viewed", + "type": "boolean | null", + "description": "Whether the current user has viewed the replay", + "optional": true + }, + { + "name": "id", + "type": "string", + "description": "Replay ID", + "optional": false + }, + { + "name": "info_ids", + "type": "array", + "description": "Linked info event IDs", + "optional": false + }, + { + "name": "is_archived", + "type": "boolean | null", + "description": "Archived flag", + "optional": true + }, + { + "name": "os", + "type": "object | null", + "description": "Operating system metadata", + "optional": true + }, + { + "name": "ota_updates", + "type": "object | null", + "description": "OTA update metadata", + "optional": true + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform", + "optional": true + }, + { + "name": "project_id", + "type": "string | null", + "description": "Numeric project ID", + "optional": true + }, + { + "name": "releases", + "type": "array", + "description": "Associated releases", + "optional": false + }, + { + "name": "sdk", + "type": "object | null", + "description": "SDK metadata", + "optional": true + }, + { + "name": "started_at", + "type": "string | null", + "description": "Replay start timestamp", + "optional": true + }, + { + "name": "tags", + "type": "object", + "description": "Replay tags", + "optional": false + }, + { + "name": "trace_ids", + "type": "array", + "description": "Linked trace IDs", + "optional": false + }, + { + "name": "urls", + "type": "array", + "description": "Visited URLs", + "optional": false + }, + { + "name": "user", + "type": "object | null", + "description": "User metadata", + "optional": true + }, + { + "name": "warning_ids", + "type": "array", + "description": "Linked warning event IDs", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReplays" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry replay view", + "brief": "View a Session Replay", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "replay-id-or-url", + "description": "[<org>/<project>] <replay-id or trace-id> or <replay-url>" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: activity, browser, count_dead_clicks, count_errors, count_infos, count_rage_clicks, count_segments, count_urls, count_warnings, device, dist, duration, environment, error_ids, finished_at, has_viewed, id, info_ids, is_archived, os, ota_updates, platform, project_id, releases, sdk, started_at, tags, trace_ids, urls, user, warning_ids, clicks, replay_type, org, relatedIssues, relatedTraces" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# View a replay by ID (organization and project auto-detected)\nsentry replay view 346789a703f6454384f1de473b8b9fcc", + "# View a replay in an explicit organization\nsentry replay view my-org/346789a703f6454384f1de473b8b9fcc", + "# View a replay with explicit org/project context\nsentry replay view my-org/frontend/346789a703f6454384f1de473b8b9fcc", + "# View a replay from its URL\nsentry replay view https://sentry.io/organizations/my-org/explore/replays/346789a703f6454384f1de473b8b9fcc/", + "# View the replay linked to a trace\nsentry replay view my-org/frontend/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "# Open a replay in the browser\nsentry replay view my-org/346789a703f6454384f1de473b8b9fcc --web" + ], + "outputFields": [ + { + "name": "activity", + "type": "array", + "description": "Summarized replay activity", + "optional": false + }, + { + "name": "browser", + "type": "object | null", + "description": "Browser metadata", + "optional": true + }, + { + "name": "count_dead_clicks", + "type": "number | null", + "description": "Dead click count", + "optional": true + }, + { + "name": "count_errors", + "type": "number | null", + "description": "Associated error count", + "optional": true + }, + { + "name": "count_infos", + "type": "number | null", + "description": "Info event count", + "optional": true + }, + { + "name": "count_rage_clicks", + "type": "number | null", + "description": "Rage click count", + "optional": true + }, + { + "name": "count_segments", + "type": "number | null", + "description": "Recording segment count", + "optional": true + }, + { + "name": "count_urls", + "type": "number | null", + "description": "Visited URL count", + "optional": true + }, + { + "name": "count_warnings", + "type": "number | null", + "description": "Warning event count", + "optional": true + }, + { + "name": "device", + "type": "object | null", + "description": "Device metadata", + "optional": true + }, + { + "name": "dist", + "type": "string | null", + "description": "Distribution", + "optional": true + }, + { + "name": "duration", + "type": "number | null", + "description": "Replay duration in seconds", + "optional": true + }, + { + "name": "environment", + "type": "string | null", + "description": "Environment", + "optional": true + }, + { + "name": "error_ids", + "type": "array", + "description": "Linked error IDs", + "optional": false + }, + { + "name": "finished_at", + "type": "string | null", + "description": "Replay finish timestamp", + "optional": true + }, + { + "name": "has_viewed", + "type": "boolean | null", + "description": "Whether the current user has viewed the replay", + "optional": true + }, + { + "name": "id", + "type": "string", + "description": "Replay ID", + "optional": false + }, + { + "name": "info_ids", + "type": "array", + "description": "Linked info event IDs", + "optional": false + }, + { + "name": "is_archived", + "type": "boolean | null", + "description": "Archived flag", + "optional": true + }, + { + "name": "os", + "type": "object | null", + "description": "Operating system metadata", + "optional": true + }, + { + "name": "ota_updates", + "type": "object | null", + "description": "OTA update metadata", + "optional": true + }, + { + "name": "platform", + "type": "string | null", + "description": "Platform", + "optional": true + }, + { + "name": "project_id", + "type": "string | null", + "description": "Numeric project ID", + "optional": true + }, + { + "name": "releases", + "type": "array", + "description": "Associated releases", + "optional": false + }, + { + "name": "sdk", + "type": "object | null", + "description": "SDK metadata", + "optional": true + }, + { + "name": "started_at", + "type": "string | null", + "description": "Replay start timestamp", + "optional": true + }, + { + "name": "tags", + "type": "object", + "description": "Replay tags", + "optional": false + }, + { + "name": "trace_ids", + "type": "array", + "description": "Linked trace IDs", + "optional": false + }, + { + "name": "urls", + "type": "array", + "description": "Visited URLs", + "optional": false + }, + { + "name": "user", + "type": "object | null", + "description": "User metadata", + "optional": true + }, + { + "name": "warning_ids", + "type": "array", + "description": "Linked warning event IDs", + "optional": false + }, + { + "name": "clicks", + "type": "array", + "description": "Replay click summaries", + "optional": true + }, + { + "name": "replay_type", + "type": "string | null", + "description": "Replay type", + "optional": true + }, + { + "name": "org", + "type": "string", + "description": "Organization slug", + "optional": false + }, + { + "name": "relatedIssues", + "type": "array", + "description": "Replay-related issues", + "optional": false + }, + { + "name": "relatedTraces", + "type": "array", + "description": "Replay-related traces", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationReplay" + }, + { + "fn": "getOrganizationTraceMeta" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationIssues" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReplays" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "listProjectReplayRecordingSegments" + } + ] + }, + { + "path": "sentry repo list", + "brief": "List repositories", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of repositories to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, name, url, provider, status, dateCreated, integrationId, externalSlug, externalId, orgSlug" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List repositories (organization auto-detected)\nsentry repo list", + "# List repositories in an organization\nsentry repo list my-org/", + "# Fetch the next page\nsentry repo list my-org/ -c next", + "# Only repositories whose name matches a glob\nsentry repo list 'my-org/getsentry/*'", + "# Repositories named like 'sentry-python' (fuzzy when nothing matches exactly)\nsentry repo list my-org/sentry-pyhton", + "# Output as JSON\nsentry repo list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Repository ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Repository name", + "optional": false + }, + { + "name": "url", + "type": "string | null", + "description": "Repository URL", + "optional": false + }, + { + "name": "provider", + "type": "object", + "description": "Version control provider", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Integration status", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "description": "Creation date (ISO 8601)", + "optional": true + }, + { + "name": "integrationId", + "type": "string", + "description": "Integration ID", + "optional": true + }, + { + "name": "externalSlug", + "type": "string | null", + "description": "External slug (e.g. org/repo)", + "optional": true + }, + { + "name": "externalId", + "type": "string | null", + "description": "External ID", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationRepos" + } + ] + }, + { + "path": "sentry schema", + "brief": "Browse the Sentry API schema", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "Groups", + "ResourceTypes", + "Schemas", + "ServiceProviderConfig", + "Users", + "actions", + "assemble", + "attachments", + "attributes", + "autofix", + "available-actions", + "bulk", + "channel-validate", + "channels", + "checkins", + "chunk-upload", + "chunks", + "clicks", + "code-mappings", + "codeowners", + "codeowners-associations", + "commitfiles", + "commits", + "completion", + "conversations", + "custom-inbound-filters", + "dashboards", + "delete", + "deploys", + "detectors", + "dsyms", + "environments", + "eventids", + "events", + "events-dropped", + "events-timeseries", + "external-issue-actions", + "external-issues", + "external-requests", + "external-teams", + "external-users", + "files", + "filters", + "flamegraph", + "forwarding", + "group-search-views", + "hashes", + "hooks", + "images", + "install-details", + "integrations", + "issues", + "keys", + "latest", + "latest-base", + "logs", + "members", + "metrics", + "models", + "monitors", + "organizations", + "ownership", + "profiles", + "project-keys", + "projects", + "recording-segments", + "relay_usage", + "release-threshold-statuses", + "releases", + "replay-count", + "replay-selectors", + "replays", + "repo", + "repos", + "saved", + "sentry-app-components", + "sentry-app-installations", + "sentry-apps", + "sessions", + "settings", + "shortids", + "size-analysis", + "skip", + "snapshots", + "source-map-debug", + "spike-protections", + "stack", + "stacktrace-link", + "starred-service-spans", + "stats", + "stats-summary", + "stats_v2", + "status-check-rules", + "symbol-sources", + "tags", + "teams", + "trace", + "trace-meta", + "user-feedback", + "user-teams", + "users", + "values", + "viewed-by", + "workflows" + ], + "title": "query", + "description": "API concept, CLI command path, exact operation ID, or METHOD /path" + } + }, + "flags": { + "type": "object", + "properties": { + "all": { + "type": "boolean", + "description": "Show all endpoints in a flat list", + "default": false + }, + "search": { + "type": "string", + "description": "Search endpoints by keyword" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "choice" + ], + "flags": { + "search": "text", + "fields": "text" + } + }, + "examples": [ + "# List all API resources\nsentry schema", + "# Browse issue endpoints\nsentry schema issues", + "# Find list operations (there may be multiple candidates)\nsentry schema issues list", + "# Find APIs used by log listing\nsentry schema log list", + "# Find APIs used by trace listing, including command aliases\nsentry schema trace ls", + "# Find APIs used by a command group\nsentry schema alert metrics", + "# Find APIs used by a nested command\nsentry schema alert metrics view", + "# Look up an endpoint by its exact operation ID\nsentry schema listOrganizationEvents", + "# Look up an endpoint by HTTP method and path\nsentry schema \"GET /api/0/organizations/{organization_id_or_slug}/issues/\"", + "# Search for monitoring-related endpoints\nsentry schema --search monitor", + "# Browse resources matching a glob\nsentry schema 'monitor*'", + "# Flat list of every endpoint\nsentry schema --all" + ], + "apiOperations": [] + }, + { + "path": "sentry snapshots diff", + "brief": "Compare two directories of snapshot images", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "base-dir", + "description": "Path to the baseline image directory" + }, + { + "type": "string", + "title": "head-dir", + "description": "Path to the head image directory" + } + ], + "items": false, + "minItems": 2 + }, + "flags": { + "type": "object", + "properties": { + "output": { + "type": "string", + "description": "Directory for diff mask images (default: ./diff-output/)" + }, + "threshold": { + "type": "number", + "description": "Pixel color difference threshold (0.0-1.0)", + "default": 0.01 + }, + "no-antialiasing": { + "type": "boolean", + "description": "Disable antialiasing detection" + }, + "fail-on-diff": { + "type": "boolean", + "description": "Exit non-zero if any diffs (changed/added/removed/errored) are found" + }, + "selective": { + "type": "boolean", + "description": "Treat images missing from head as skipped instead of removed" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory", + "directory" + ], + "flags": { + "output": "directory", + "threshold": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Compare two directories of snapshot images locally\nsentry snapshots diff ./baseline ./head", + "# Exit non-zero if any images changed, with a custom threshold\nsentry snapshots diff ./baseline ./head --fail-on-diff --threshold 0.02", + "# Write diff masks to a directory\nsentry snapshots diff ./baseline ./head --output ./diffs/" + ], + "apiOperations": [] + }, + { + "path": "sentry snapshots download", + "brief": "Download baseline snapshot images", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "app-id": { + "type": "string", + "description": "App identifier (e.g. my-app) to resolve the latest baseline; mutually exclusive with --snapshot-id" + }, + "snapshot-id": { + "type": "string", + "description": "Direct snapshot artifact ID; mutually exclusive with --app-id" + }, + "branch": { + "type": "string", + "description": "Git branch filter (only with --app-id)" + }, + "output": { + "type": "string", + "description": "Directory for extracted images (default: ./snapshots-base/)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "app-id": "text", + "snapshot-id": "text", + "branch": "vcs-ref", + "output": "directory", + "fields": "text" + } + }, + "localPathFlags": [ + "output" + ], + "examples": [ + "# Download a specific baseline snapshot by ID\nsentry snapshots download --snapshot-id 1234567890", + "# Download the latest baseline for an app, filtered by branch\nsentry snapshots download --app-id my-app --branch main", + "# Extract images to a specific directory\nsentry snapshots download --app-id my-app --output ./baseline/" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationPreprodArtifactSnapshotLatestBase" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry snapshots upload", + "brief": "Upload snapshots to a project", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "path", + "description": "Path to the folder containing images to upload" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "app-id": { + "type": "string", + "description": "The application identifier" + }, + "diff-threshold": { + "type": "string", + "description": "Only report an image as changed when its difference exceeds this fraction (0.0–1.0, e.g. 0.01 = 1%)" + }, + "selective": { + "type": "boolean", + "description": "This upload contains only a subset of images (removals/renames won't be detected on PRs)" + }, + "all-image-file-names": { + "type": "string", + "description": "Comma-separated list of all image names in the full suite (for selective uploads; implies --selective)" + }, + "all-image-file-names-file": { + "type": "string", + "description": "Path to a file listing all image names, one per line (for selective uploads; implies --selective)" + }, + "head-sha": { + "type": "string", + "description": "VCS commit SHA (defaults to the current commit)" + }, + "base-sha": { + "type": "string", + "description": "VCS base commit SHA (defaults to the merge-base with the base ref)" + }, + "vcs-provider": { + "type": "string", + "examples": [ + "github", + "github_enterprise", + "gitlab", + "bitbucket", + "bitbucket_server" + ], + "description": "VCS provider (defaults to the current remote's provider)" + }, + "head-repo-name": { + "type": "string", + "description": "Head repository name, e.g. owner/repo (defaults to the current)" + }, + "base-repo-name": { + "type": "string", + "description": "Base repository name, e.g. owner/repo (for forks)" + }, + "head-ref": { + "type": "string", + "description": "Head branch/reference (defaults to the current branch)" + }, + "base-ref": { + "type": "string", + "description": "Base branch/reference (defaults to the merge-base tracking ref)" + }, + "pr-number": { + "type": "string", + "description": "Pull request number (auto-detected in pull_request GitHub Actions runs)" + }, + "force-git-metadata": { + "type": "boolean", + "description": "Force collecting git metadata even outside CI (conflicts with --no-git-metadata)" + }, + "no-git-metadata": { + "type": "boolean", + "description": "Disable automatic git metadata collection" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "required": [ + "app-id" + ], + "additionalProperties": false + } + }, + "required": [ + "positional", + "flags" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory" + ], + "flags": { + "app-id": "text", + "diff-threshold": "text", + "all-image-file-names": "text", + "all-image-file-names-file": "file", + "head-sha": "git-commit", + "base-sha": "git-commit", + "vcs-provider": "choice", + "head-repo-name": "git-repo", + "base-repo-name": "git-repo", + "head-ref": "vcs-ref", + "base-ref": "vcs-ref", + "pr-number": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "all-image-file-names-file" + ], + "examples": [ + "# Upload a folder of screenshots as a snapshot for an app\nsentry snapshots upload ./screenshots --app-id com.example.app", + "# Upload only a subset of images (removals/renames not inferred on PRs)\nsentry snapshots upload ./screenshots --app-id my-app --selective", + "# Only flag images that differ by more than 1%\nsentry snapshots upload ./screenshots --app-id my-app --diff-threshold 0.01" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "uploadProjectPreprodArtifactSnapshot" + } + ] + }, + { + "path": "sentry sourcemap inject", + "brief": "Inject debug IDs into JavaScript files and sourcemaps", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "directory", + "description": "Directory to scan for JS + sourcemap pairs" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "ext": { + "type": "string", + "description": "Comma-separated file extensions to process (default: .js,.cjs,.mjs)" + }, + "ignore": { + "type": "string", + "description": "Comma-separated glob patterns to exclude (gitignore-style)" + }, + "ignore-file": { + "type": "string", + "description": "Path to a file with gitignore-style patterns to exclude" + }, + "dry-run": { + "type": "boolean", + "description": "Show what would be modified without writing", + "default": false + }, + "allow-empty": { + "type": "boolean", + "description": "Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations)", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory" + ], + "flags": { + "ext": "choice-list", + "ignore": "text", + "ignore-file": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "ignore-file" + ], + "examples": [ + "# Inject debug IDs into all JS files in dist/\nsentry sourcemap inject ./dist", + "# Preview changes without writing\nsentry sourcemap inject ./dist --dry-run", + "# Only process specific extensions\nsentry sourcemap inject ./build --ext .js,.mjs", + "# Allow a directory with no sourcemaps\nsentry sourcemap inject ./maybe-empty --allow-empty" + ], + "apiOperations": [] + }, + { + "path": "sentry sourcemap resolve", + "brief": "Resolve and report sourcemap linkage for JavaScript files", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "directory", + "description": "Directory to scan for JS files" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "ext": { + "type": "string", + "description": "Comma-separated file extensions to process (default: .js,.cjs,.mjs)" + }, + "ignore": { + "type": "string", + "description": "Comma-separated glob patterns to exclude (gitignore-style)" + }, + "ignore-file": { + "type": "string", + "description": "Path to a file with gitignore-style patterns to exclude" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory" + ], + "flags": { + "ext": "choice-list", + "ignore": "text", + "ignore-file": "file", + "fields": "text" + } + }, + "localPathFlags": [ + "ignore-file" + ], + "examples": [ + "# Report how each JS file's sourcemap resolves and whether a debug ID is injected\nsentry sourcemap resolve ./dist", + "# Output as JSON\nsentry sourcemap resolve ./dist --json", + "# Only scan some extensions\nsentry sourcemap resolve ./build --ext .js,.mjs" + ], + "apiOperations": [] + }, + { + "path": "sentry sourcemap upload", + "brief": "Upload sourcemaps to Sentry", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "directory", + "description": "Directory containing sourcemaps, or a glob like 'dist/**'" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "release": { + "type": "string", + "description": "Release version to associate with the upload" + }, + "dist": { + "type": "string", + "description": "Distribution identifier to disambiguate builds within a release" + }, + "url-prefix": { + "type": "string", + "description": "URL prefix for uploaded files", + "default": "~/" + }, + "ext": { + "type": "string", + "description": "Comma-separated file extensions to process (default: .js,.cjs,.mjs)" + }, + "ignore": { + "type": "string", + "description": "Comma-separated glob patterns to exclude (gitignore-style)" + }, + "ignore-file": { + "type": "string", + "description": "Path to a file with gitignore-style patterns to exclude" + }, + "strip-prefix": { + "type": "string", + "description": "Strip a prefix from uploaded file paths (e.g. 'build/')" + }, + "strip-common-prefix": { + "type": "boolean", + "description": "Automatically strip the longest common path prefix from all files", + "default": false + }, + "no-rewrite": { + "type": "boolean", + "description": "Upload files as-is without injecting debug IDs", + "default": false + }, + "allow-empty": { + "type": "boolean", + "description": "Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations)", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "directory" + ], + "flags": { + "release": "release", + "dist": "text", + "url-prefix": "text", + "ext": "choice-list", + "ignore": "text", + "ignore-file": "file", + "strip-prefix": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "ignore-file" + ], + "examples": [ + "# Upload sourcemaps from dist/\nsentry sourcemap upload ./dist", + "# Upload only the files a glob matches\nsentry sourcemap upload '.next/static/**'", + "# Associate with a release\nsentry sourcemap upload ./dist --release 1.0.0", + "# Set a custom URL prefix\nsentry sourcemap upload ./dist --url-prefix '~/static/js/'", + "# Don't fail when no sourcemaps are found\nsentry sourcemap upload ./dist --allow-empty", + "# Set a release and distribution\nsentry sourcemap upload ./dist --release 1.0.0 --dist 12345", + "# Upload without rewriting sourcemaps\nsentry sourcemap upload ./dist --no-rewrite", + "# Only upload some extensions\nsentry sourcemap upload ./dist --ext .js,.mjs" + ], + "apiOperations": [ + { + "fn": "assembleOrganizationArtifactBundle" + }, + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationChunkUploadOptions" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry span list", + "brief": "List spans in a project or trace", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/trace-id", + "description": "[<org>/<project>] or [<org>/<project>/]<trace-id>" + } + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of spans (<=1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Filter spans (e.g., \"op:db\", \"project:backend\", \"project:[cli,api]\")" + }, + "sort": { + "type": "string", + "examples": [ + "date", + "duration" + ], + "description": "Sort order: date, duration", + "default": "date" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: span_id, trace_id, parent_span_id, op, description, duration_ms, start_timestamp, project_slug, transaction" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "sort": "choice", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List recent spans in the current project\nsentry span list", + "# Find all DB spans\nsentry span list -q \"op:db\"", + "# Slow spans in the last 24 hours\nsentry span list -q \"duration:>100ms\" --period 24h", + "# Sort by slowest first\nsentry span list --sort duration", + "# List spans within a specific trace\nsentry span list abc123def456abc123def456abc12345", + "# Show only spans from one project within a trace\nsentry span list my-org/cli-server/abc123def456abc123def456abc12345", + "# Filter a trace's spans to several projects\nsentry span list abc123def456abc123def456abc12345 -q \"project:[cli-server,api]\"", + "# Fetch the next page\nsentry span list -c next", + "# List spans in an explicit project\nsentry span list my-org/cli-server", + "# Find a project across organizations, then list a trace\nsentry span list cli-server abc123def456abc123def456abc12345", + "# Fetch the next page of a trace\nsentry span list abc123def456abc123def456abc12345 -c next" + ], + "outputFields": [ + { + "name": "span_id", + "type": "string", + "description": "Span ID", + "optional": false + }, + { + "name": "trace_id", + "type": "string", + "description": "Trace ID", + "optional": true + }, + { + "name": "parent_span_id", + "type": "string | null", + "description": "Parent span ID", + "optional": true + }, + { + "name": "op", + "type": "string", + "description": "Span operation (e.g. http.client, db)", + "optional": true + }, + { + "name": "description", + "type": "string | null", + "description": "Span description", + "optional": true + }, + { + "name": "duration_ms", + "type": "number", + "description": "Duration (ms)", + "optional": true + }, + { + "name": "start_timestamp", + "type": "number", + "description": "Start time (Unix seconds)", + "optional": false + }, + { + "name": "project_slug", + "type": "string", + "description": "Project slug", + "optional": true + }, + { + "name": "transaction", + "type": "string", + "description": "Transaction name", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry span view", + "brief": "View details of specific spans", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "trace-id/span-id", + "description": "[<org>/<project>/]<trace-id> <span-id> [<span-id>...] - Trace ID and one or more span IDs" + } + }, + "flags": { + "type": "object", + "properties": { + "spans": { + "type": "string", + "examples": [ + "all", + "no" + ], + "description": "Span tree depth limit (number, \"all\" for unlimited, \"no\" to disable)", + "default": "3" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "spans": "choice", + "fields": "text" + } + }, + "examples": [ + "# View a single span\nsentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890", + "# View multiple spans at once\nsentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 b2c3d4e5f6789012", + "# Specify the organization and project explicitly\nsentry span view my-org/backend/abc123def456abc123def456abc12345 a1b2c3d4e5f67890" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationTrace" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=logs. The command may add filters or requests." + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry status show", + "brief": "Show Sentry service status", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "flags": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Status page base URL to query", + "default": "https://status.sentry.io" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "flags": { + "url": "text", + "fields": "text" + } + }, + "examples": [ + "# Show the current status of Sentry's services\nsentry status", + "# Get machine-readable status (useful in scripts)\nsentry status --json", + "# Check a self-hosted or regional status page (Statuspage CNAME)\nsentry status --url https://status.acme.com" + ], + "apiOperations": [] + }, + { + "path": "sentry team list", + "brief": "List teams", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Maximum number of teams to list", + "default": 25 + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, slug, name, dateCreated, isMember, teamRole, memberCount, orgSlug" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "limit": "text", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List teams (organization auto-detected)\nsentry team list", + "# List teams in an organization\nsentry team list my-org/", + "# Fetch the next page\nsentry team list my-org/ -c next", + "# Only teams whose slug or name matches a glob\nsentry team list 'my-org/back*'", + "# Teams named like 'backend' when no such project exists (fuzzy)\nsentry team list my-org/backnd", + "# Output as JSON\nsentry team list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Team ID", + "optional": false + }, + { + "name": "slug", + "type": "string", + "description": "Team slug", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Team name", + "optional": false + }, + { + "name": "dateCreated", + "type": "string | null", + "description": "When the team was created (ISO 8601)", + "optional": true + }, + { + "name": "isMember", + "type": "boolean", + "description": "Whether the requesting user is a member of the team", + "optional": true + }, + { + "name": "teamRole", + "type": "string | null", + "description": "The requesting user's role in the team", + "optional": true + }, + { + "name": "memberCount", + "type": "number", + "description": "Number of members in the team", + "optional": true + }, + { + "name": "orgSlug", + "type": "string", + "description": "Organization slug", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "listOrganizationTeams" + }, + { + "fn": "listProjectTeams" + } + ] + }, + { + "path": "sentry token create", + "brief": "Create an org auth token", + "permission": "write", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/name", + "description": "[<org>/]<name> - Name of the new token" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Create a token (auto-detect org)\nsentry token create github-actions", + "# Create a token in a specific org\nsentry token create my-org/github-actions", + "# Output as JSON, including the token value\nsentry token create my-org/github-actions --json" + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry token delete", + "brief": "Revoke an org auth token", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/token-id-or-name", + "description": "[<org>/]<token-id-or-name> - ID or name from sentry token list (not the token value)" + } + }, + "flags": { + "type": "object", + "properties": { + "yes": { + "type": "boolean", + "description": "Skip confirmation prompt", + "default": false + }, + "force": { + "type": "boolean", + "description": "Force the operation without confirmation", + "default": false + }, + "dry-run": { + "type": "boolean", + "description": "Show what would happen without making changes", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Revoke token ID 12345 (auto-detect org)\nsentry token delete 12345", + "# Revoke the token named github-actions\nsentry token delete my-org/github-actions", + "# Preview revoking token ID 12345\nsentry token delete my-org/12345 --dry-run", + "# Revoke without the confirmation prompt\nsentry token delete my-org/12345 --yes" + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry token list", + "brief": "List org auth tokens", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org", + "description": "Organization slug (auto-detected if omitted)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: id, name, scopes, tokenLastCharacters, dateCreated, dateLastUsed, projectLastUsedId, token" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# List tokens (auto-detect org)\nsentry token list", + "# List tokens in a specific org\nsentry token list my-org", + "# Output as JSON\nsentry token list --json" + ], + "outputFields": [ + { + "name": "id", + "type": "string", + "description": "Token ID", + "optional": false + }, + { + "name": "name", + "type": "string", + "description": "Token name", + "optional": false + }, + { + "name": "scopes", + "type": "array", + "description": "Scopes granted to the token", + "optional": false + }, + { + "name": "tokenLastCharacters", + "type": "string | null", + "description": "Last 4 characters of the token", + "optional": false + }, + { + "name": "dateCreated", + "type": "string", + "description": "Creation timestamp", + "optional": false + }, + { + "name": "dateLastUsed", + "type": "string | null", + "description": "Last time the token was used, if ever", + "optional": false + }, + { + "name": "projectLastUsedId", + "type": "string | null", + "description": "ID of the project the token was last used for", + "optional": true + }, + { + "name": "token", + "type": "string", + "description": "Full token value (create response only)", + "optional": true + } + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry trace list", + "brief": "List recent traces in a project", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org/project", + "description": "<org>/<project> or <project> (search)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "Number of traces (1-1000)", + "default": 25 + }, + "query": { + "type": "string", + "description": "Search query (Sentry search syntax)" + }, + "sort": { + "type": "string", + "examples": [ + "date", + "duration" + ], + "description": "Sort by: date, duration", + "default": "date" + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "7d" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "cursor": { + "type": "string", + "examples": [ + "next", + "prev", + "first" + ], + "description": "Navigate pages: \"next\", \"prev\", \"first\" (or raw cursor string)" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: trace, id, transaction, timestamp, span.duration, project" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "limit": "text", + "query": "text", + "sort": "choice", + "period": "period", + "cursor": "choice", + "fields": "choice-list" + } + }, + "examples": [ + "# List recent traces\nsentry trace list", + "# Show more traces\nsentry trace list --limit 50", + "# Sort by slowest first\nsentry trace list --sort duration", + "# Filter by transaction name in the last 24 hours\nsentry trace list -q \"transaction:GET /api/users\" --period 24h", + "# Fetch the next page\nsentry trace list my-org/backend -c next", + "# Find a project across organizations\nsentry trace list backend" + ], + "outputFields": [ + { + "name": "trace", + "type": "string", + "description": "Trace ID", + "optional": false + }, + { + "name": "id", + "type": "string", + "description": "Span ID of the root span", + "optional": false + }, + { + "name": "transaction", + "type": "string", + "description": "Transaction name", + "optional": false + }, + { + "name": "timestamp", + "type": "string", + "description": "Timestamp (ISO 8601)", + "optional": false + }, + { + "name": "span.duration", + "type": "number", + "description": "Duration (ms)", + "optional": false + }, + { + "name": "project", + "type": "string", + "description": "Project slug", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans, query=is_transaction:true. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry trace logs", + "brief": "View logs associated with a trace", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/trace-id", + "description": "[<org>/[<project>/]]<trace-id> - Optional org/project and required trace ID" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open trace in browser", + "default": false + }, + "period": { + "type": "string", + "description": "Time range: \"7d\", \"2024-01-01..2024-02-01\", \">=2024-01-01\"", + "default": "14d" + }, + "limit": { + "type": "number", + "description": "Number of log entries (<=1000)", + "default": 100 + }, + "query": { + "type": "string", + "description": "Filter query (e.g., \"severity:error\", \"project:backend\", \"project:[a,b]\")" + }, + "sort": { + "type": "string", + "examples": [ + "newest", + "oldest" + ], + "description": "Sort order: \"newest\" (default) or \"oldest\"", + "default": "newest" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "period": "period", + "limit": "text", + "query": "text", + "sort": "choice", + "fields": "text" + } + }, + "examples": [ + "# View logs for a trace\nsentry trace logs abc123def456abc123def456abc12345", + "# Filter trace logs to one project\nsentry trace logs my-org/cli-server/abc123def456abc123def456abc12345", + "# Filter trace logs to several projects\nsentry trace logs abc123def456abc123def456abc12345 -q \"project:[cli-server,api]\"", + "# Search with a longer time window\nsentry trace logs --period 30d abc123def456abc123def456abc12345", + "# Only error logs\nsentry trace logs -q 'severity:error' abc123def456abc123def456abc12345", + "# Output as JSON\nsentry trace logs --json abc123def456abc123def456abc12345", + "# Logs for a trace in an explicit organization\nsentry trace logs my-org/abc123def456abc123def456abc12345" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry trace view", + "brief": "View details of a specific trace", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "org/project/trace-id", + "description": "[<org>/<project>/]<trace-id> - Target (optional) and trace ID (required)" + } + }, + "flags": { + "type": "object", + "properties": { + "web": { + "type": "boolean", + "description": "Open in browser", + "default": false + }, + "full": { + "type": "boolean", + "description": "Fetch full span attributes (auto-enabled with --json)", + "default": false + }, + "spans": { + "type": "string", + "examples": [ + "all", + "no" + ], + "description": "Span tree depth limit (number, \"all\" for unlimited, \"no\" to disable)", + "default": "3" + }, + "fresh": { + "type": "boolean", + "description": "Bypass cache, re-detect projects, and fetch fresh data", + "default": false + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org/project" + ], + "flags": { + "spans": "choice", + "fields": "text" + } + }, + "examples": [ + "# View trace details with the span tree\nsentry trace view abc123def456abc123def456abc12345", + "# Show the full trace across all projects\nsentry trace view my-org/abc123def456abc123def456abc12345", + "# Filter the span tree to one project\nsentry trace view my-org/cli-server/abc123def456abc123def456abc12345", + "# Recover the trace from an issue short ID\nsentry trace view PROJ-123", + "# Open the trace in the browser\nsentry trace view abc123def456abc123def456abc12345 -w", + "# Find a project across organizations\nsentry trace view cli-server abc123def456abc123def456abc12345", + "# Select the trace ID and an attribute across the whole span tree\nsentry trace view abc123def456abc123def456abc12345 --json --fields traceId,http.method", + "# Keep full spans while requesting an additional attribute\nsentry trace view abc123def456abc123def456abc12345 --json --fields spans,http.method", + "# Select IDs and detail attributes from root spans only\nsentry trace view abc123def456abc123def456abc12345 --json --fields spans.span_id,spans.data.http.method", + "# Select an additional attribute from immediate child spans\nsentry trace view abc123def456abc123def456abc12345 --json --fields spans.children.additional_attributes.http.method" + ], + "apiOperations": [ + { + "fn": "getOrganization" + }, + { + "fn": "getOrganizationIssueEvent" + }, + { + "fn": "getOrganizationTrace" + }, + { + "fn": "getProject" + }, + { + "fn": "listOrganizationEvents" + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=logs. The command may add filters or requests." + }, + { + "fn": "listOrganizationEvents", + "note": "Known query context: dataset=spans. The command may add filters or requests." + }, + { + "fn": "listOrganizationProjects" + }, + { + "fn": "listOrganizationReplays" + }, + { + "fn": "listOrganizations" + }, + { + "fn": "resolveOrganizationShortId" + } + ] + }, + { + "path": "sentry trial list", + "brief": "List product trials", + "permission": "read", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "org", + "description": "Organization slug (auto-detected if omitted)" + } + ], + "items": false + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported). Available: name, category, status, daysRemaining, isStarted, lengthDays, startDate, endDate" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "choice-list" + } + }, + "examples": [ + "# List all trials for the current organization\nsentry trial list", + "# List trials for a specific organization\nsentry trial list my-org", + "# Output as JSON\nsentry trial list --json" + ], + "outputFields": [ + { + "name": "name", + "type": "string", + "description": "CLI trial name (e.g. seer), or \"plan\" for the plan trial", + "optional": false + }, + { + "name": "category", + "type": "string", + "description": "Trial category (e.g. seerUsers, seerAutofix)", + "optional": false + }, + { + "name": "status", + "type": "string", + "description": "Trial status", + "optional": false + }, + { + "name": "daysRemaining", + "type": "number | null", + "description": "Days left on an active trial", + "optional": false + }, + { + "name": "isStarted", + "type": "boolean", + "description": "Whether the trial has started", + "optional": false + }, + { + "name": "lengthDays", + "type": "number | null", + "description": "Trial duration in days", + "optional": false + }, + { + "name": "startDate", + "type": "string | null", + "description": "Start date (ISO 8601)", + "optional": false + }, + { + "name": "endDate", + "type": "string | null", + "description": "End date (ISO 8601)", + "optional": false + } + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry trial start", + "brief": "Start a product trial", + "permission": "destructive", + "exposure": "exposed", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "items": { + "type": "string", + "title": "name", + "description": "Trial name (seer, replays, performance, spans, profiling, logs, monitors, uptime, plan) and organization slug (auto-detected if omitted)" + } + }, + "flags": { + "type": "object", + "properties": { + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "completions": { + "positional": [ + "org" + ], + "flags": { + "fields": "text" + } + }, + "examples": [ + "# Start a Seer trial\nsentry trial start seer", + "# Start a trial for a specific organization\nsentry trial start replays my-org", + "# Start a Business plan trial (opens the browser)\nsentry trial start plan", + "# Output the result as JSON\nsentry trial start --json seer" + ], + "apiOperations": [ + { + "fn": "listOrganizations" + } + ] + }, + { + "path": "sentry wasm-split", + "brief": "Add build ids to WebAssembly modules and split out debug data", + "permission": "read", + "exposure": "stdio-only", + "parameters": { + "type": "object", + "properties": { + "positional": { + "type": "array", + "prefixItems": [ + { + "type": "string", + "title": "input", + "description": "Path to the wasm file" + } + ], + "items": false, + "minItems": 1 + }, + "flags": { + "type": "object", + "properties": { + "out": { + "type": "string", + "description": "Path to the output wasm file (default: modify input in place)" + }, + "debug-out": { + "type": "string", + "description": "Path to the output debug wasm file (default: debug data stays in the input)" + }, + "strip": { + "type": "boolean", + "description": "Strip the file of debug info", + "default": false + }, + "strip-names": { + "type": "boolean", + "description": "Strip the file of symbol names (only with --strip)", + "default": false + }, + "quiet": { + "type": "boolean", + "description": "Do not print the build id", + "default": false + }, + "build-id": { + "type": "string", + "description": "Explicit build id to use, as a UUID" + }, + "external-dwarf-url": { + "type": "string", + "description": "URL for browsers to fetch the separate DWARF debug symbol file" + }, + "json": { + "type": "boolean", + "description": "Output as JSON", + "default": false + }, + "fields": { + "type": "string", + "description": "Comma-separated fields to include in JSON output (dot.notation supported)" + } + }, + "additionalProperties": false + } + }, + "required": [ + "positional" + ], + "additionalProperties": false + }, + "completions": { + "positional": [ + "file" + ], + "flags": { + "out": "file", + "debug-out": "file", + "build-id": "text", + "external-dwarf-url": "text", + "fields": "text" + } + }, + "localPathFlags": [ + "out", + "debug-out" + ], + "examples": [ + "# Add a build ID to a module in place and print it\nsentry wasm-split app.wasm", + "# Capture the build ID for a later upload\nBUILD_ID=$(sentry wasm-split app.wasm)", + "# Split debug data into a companion and ship a stripped binary\nsentry wasm-split app.wasm --debug-out app.debug.wasm --strip", + "# Also drop function names from the shipped binary\nsentry wasm-split app.wasm -d app.debug.wasm --strip --strip-names", + "# Point browsers at a companion served from a CDN\nsentry wasm-split app.wasm -o dist/app.wasm -d dist/app.debug.wasm --strip --external-dwarf-url https://cdn.example.com/debug/app.debug.wasm" + ], + "apiOperations": [] + } + ] +} diff --git a/packages/mcp-core/src/command-catalog.ts b/packages/mcp-core/src/command-catalog.ts new file mode 100644 index 000000000..d2d36f882 --- /dev/null +++ b/packages/mcp-core/src/command-catalog.ts @@ -0,0 +1,86 @@ +/** + * The CLI commands agents may run, generated at build time so MCP servers + * (including the hosted one on Workers, which cannot load the CLI) read data + * instead of computing it. + * + * `command-catalog.json` is generated by the CLI (`generate:command-catalog` + * in `packages/cli`) from its route tree's introspection (`lib/introspect.ts`). + * Do not edit it by hand. + */ + +import commandCatalogData from "./command-catalog.json"; + +/** Where agents may run a command; hidden commands are left out. */ +type CommandExposure = "exposed" | "stdio-only"; + +/** + * What a command may do to Sentry, or `method` when each call takes the class + * of the HTTP method it sends (`sentry api --method`). + */ +type CommandPermission = "read" | "write" | "destructive" | "method"; + +/** The subset of JSON Schema (2020-12) the catalog uses. */ +export type JsonSchema = { + type?: "string" | "number" | "boolean" | "array" | "object"; + title?: string; + description?: string; + enum?: string[]; + /** Suggested values; others are accepted too. */ + examples?: string[]; + default?: unknown; + items?: JsonSchema | false; + prefixItems?: JsonSchema[]; + minItems?: number; + properties?: Record<string, JsonSchema>; + required?: string[]; + additionalProperties?: false; +}; + +/** A field of a command's `--json` output. */ +type CommandOutputField = { + name: string; + type: string; + optional: boolean; + description?: string; +}; + +/** A `@sentry/api` function the command calls. */ +type CommandApiOperation = { + fn: string; + note?: string; +}; + +export type CommandCatalogEntry = { + /** Full command path, such as `sentry issue list`. */ + path: string; + brief: string; + permission: CommandPermission; + exposure: CommandExposure; + /** + * The command's arguments: `positional` (the positional arguments in + * order) and `flags` (by flag name, without `--`). + */ + parameters: JsonSchema; + /** Completion kind of each positional and flag that has one. */ + completions?: { + /** By position; a variadic positional has one entry for every word. */ + positional?: (string | null)[]; + flags?: Record<string, string>; + }; + /** Flags that take a path on the local machine, which only stdio can serve. */ + localPathFlags?: string[]; + /** Each example is a `# description` line followed by its commands. */ + examples: string[]; + outputFields?: CommandOutputField[]; + apiOperations: CommandApiOperation[]; +}; + +export type CommandCatalog = { + /** Sorted by path. */ + commands: CommandCatalogEntry[]; +}; + +// Through `unknown`: TypeScript types the JSON's flag maps as one union in which +// each command lacks the others' flags, and `undefined` fails the index +// signature of `JsonSchema.properties`. +export const commandCatalog = commandCatalogData as unknown as CommandCatalog;