pp-sentry

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sentry — Printing Press CLI

Sentry — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
sentry-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install sentry --cli-only
  2. Verify:
    sentry-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/monitoring/sentry/cmd/sentry-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
本技能基于
sentry-pp-cli
二进制文件运行。在调用本技能的任何命令之前,必须先验证CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器安装:
    bash
    npx -y @mvanhorn/printing-press install sentry --cli-only
  2. 验证安装:
    sentry-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(如无Node环境、离线等),可以直接通过Go安装(需要Go 1.23+版本):
bash
go install github.com/mvanhorn/printing-press-library/library/monitoring/sentry/cmd/sentry-pp-cli@latest
如果执行
--version
时提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。请在验证成功前不要执行技能命令。

When to Use This CLI

何时使用此CLI

Use this CLI when an agent or script needs structured access to Sentry organizations, projects, issues, events, releases, monitors, teams, and related observability data. Prefer it over a hosted MCP when you need local binaries, local sync/search/SQL, CSV/JSON output, or direct control over auth and region routing.
当Agent或脚本需要结构化访问Sentry组织、项目、问题、事件、版本、监控器、团队及相关可观测性数据时,可使用此CLI。当你需要本地二进制文件、本地同步/搜索/SQL功能、CSV/JSON输出,或需要直接控制认证和区域路由时,优先选择此CLI而非托管MCP。

Unique Capabilities

独特功能

These capabilities aren't available in any other tool for this API.
这些功能是其他Sentry API工具所不具备的。

Read-only Sentry inventory

只读Sentry资源清单

  • organizations list
    — List Sentry organizations available to the authenticated token with structured output.
    Use this first when an agent needs to discover the organization slug for Sentry API work.
    bash
    sentry-pp-cli organizations list --json --select slug,name
  • seer
    — List the active LLM model names available through Sentry Seer.
    Use this when an agent needs to know which Seer-backed model identifiers Sentry exposes.
    bash
    sentry-pp-cli seer --json
  • organizations list
    — 列出已认证令牌可访问的Sentry组织,输出结构化数据。
    当Agent需要发现Sentry API操作所需的组织slug时,首先使用此命令。
    bash
    sentry-pp-cli organizations list --json --select slug,name
  • seer
    — 列出可通过Sentry Seer访问的活跃LLM模型名称。
    当Agent需要了解Sentry暴露的哪些Seer支持的模型标识符时,使用此命令。
    bash
    sentry-pp-cli seer --json

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
此CLI使用兼容Chrome的HTTP传输来访问面向浏览器的端点。正常API调用不需要常驻浏览器进程。

Command Reference

命令参考

organizations — Endpoints for organizations
  • sentry-pp-cli organizations list-your
    — Return a list of organizations available to the authenticated session in a region. This is particularly useful for...
  • sentry-pp-cli organizations retrieve-an
    — Return details on an individual organization, including various details such as membership access and teams.
  • sentry-pp-cli organizations update-an
    — Update various attributes and configurable settings for the given organization.
projects — Endpoints for projects
  • sentry-pp-cli projects delete-a
    — Schedules a project for deletion. Deletion happens asynchronously and therefore is not immediate. However once...
  • sentry-pp-cli projects retrieve-a
    — Return details on an individual project.
  • sentry-pp-cli projects update-a
    — Update various attributes and configurable settings for the given project. Note that solely having the...
seer — Endpoints for Seer features
  • sentry-pp-cli seer
    — Get list of actively used LLM model names from Seer. Returns the list of AI models that are currently used in...
sentry-app-installations — Manage sentry app installations
sentry-apps — Manage sentry apps
  • sentry-pp-cli sentry-apps delete-a-custom-integration
    — Delete a custom integration.
  • sentry-pp-cli sentry-apps retrieve-a-custom-integration-by-id-or-slug
    — Retrieve a custom integration.
  • sentry-pp-cli sentry-apps update-an-existing-custom-integration
    — Update an existing custom integration.
teams — Endpoints for teams
  • sentry-pp-cli teams delete-a
    — Schedules a team for deletion. Note: Deletion happens asynchronously and therefore is not immediate. Teams will...
  • sentry-pp-cli teams retrieve-a
    — Return details on an individual team.
  • sentry-pp-cli teams update-a
    — Update various attributes and configurable settings for the given team.
organizations — 组织相关端点
  • sentry-pp-cli organizations list-your
    — 返回当前区域中已认证会话可访问的组织列表。这在...场景下特别有用
  • sentry-pp-cli organizations retrieve-an
    — 返回单个组织的详细信息,包括成员访问权限、团队等各类详情。
  • sentry-pp-cli organizations update-an
    — 更新指定组织的各类属性和可配置设置。
projects — 项目相关端点
  • sentry-pp-cli projects delete-a
    — 安排项目删除。删除操作是异步执行的,因此不会立即生效。不过一旦...
  • sentry-pp-cli projects retrieve-a
    — 返回单个项目的详细信息。
  • sentry-pp-cli projects update-a
    — 更新指定项目的各类属性和可配置设置。请注意,仅拥有...权限才能执行此操作。
seer — Seer功能相关端点
  • sentry-pp-cli seer
    — 获取Seer当前使用的LLM模型名称列表。返回当前在...中使用的AI模型列表。
sentry-app-installations — 管理Sentry应用安装
sentry-apps — 管理Sentry应用
  • sentry-pp-cli sentry-apps delete-a-custom-integration
    — 删除自定义集成。
  • sentry-pp-cli sentry-apps retrieve-a-custom-integration-by-id-or-slug
    — 获取自定义集成信息。
  • sentry-pp-cli sentry-apps update-an-existing-custom-integration
    — 更新现有自定义集成。
teams — 团队相关端点
  • sentry-pp-cli teams delete-a
    — 安排团队删除。注意: 删除操作是异步执行的,因此不会立即生效。团队将...
  • sentry-pp-cli teams retrieve-a
    — 返回单个团队的详细信息。
  • sentry-pp-cli teams update-a
    — 更新指定团队的各类属性和可配置设置。

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
sentry-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当你知道要执行的操作但不确定对应命令时,可以直接询问CLI:
bash
sentry-pp-cli which "<用你自己的语言描述功能>"
which
命令会将自然语言的功能查询解析为CLI精选功能索引中最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示没有找到明确匹配项——此时可使用
--help
或更精确的查询词。

Recipes

使用示例

Discover orgs

发现组织

bash
sentry-pp-cli organizations list --json --select slug,name
Find organization slugs for scoped Sentry commands.
bash
sentry-pp-cli organizations list --json --select slug,name
查找用于限定Sentry命令范围的组织slug。

List projects for an org

列出组织下的项目

bash
sentry-pp-cli organizations projects list-an-organization-s my-org --json --select slug,name
Find project slugs before project-scoped incident queries.
bash
sentry-pp-cli organizations projects list-an-organization-s my-org --json --select slug,name
在执行项目级事件查询前查找项目slug。

List issues narrowly

精准列出问题

bash
sentry-pp-cli organizations issues list-an-organization-s my-org --agent --select shortId,title,count,userCount
Keep agent context focused while triaging current issues.
bash
sentry-pp-cli organizations issues list-an-organization-s my-org --agent --select shortId,title,count,userCount
在分类当前问题时保持Agent聚焦于关键上下文。

Export organization inventory

导出组织资源清单

bash
sentry-pp-cli export organizations --format json --output sentry-organizations.json
Create a portable incident handoff file after syncing or listing data.
bash
sentry-pp-cli export organizations --format json --output sentry-organizations.json
在同步或列出数据后创建可移植的事件交接文件。

Inspect CLI capabilities

检查CLI功能

bash
sentry-pp-cli agent-context --pretty
Give an agent the live command and auth surface before choosing a Sentry operation.
bash
sentry-pp-cli agent-context --pretty
让Agent在选择Sentry操作前了解可用的实时命令和认证接口。

Auth Setup

认证设置

Set SENTRY_AUTH_TOKEN to a Sentry user or organization token with read scopes such as org:read, project:read, and event:read. Set SENTRY_REGION=de for EU-region SaaS organizations, or configure the base URL for self-hosted Sentry if supported by the generated config.
Run
sentry-pp-cli doctor
to verify setup.
SENTRY_AUTH_TOKEN
设置为拥有读取权限(如org:read、project:read、event:read)的Sentry用户或组织令牌。对于欧盟区域的SaaS组织,设置
SENTRY_REGION=de
;如果是自托管Sentry,请根据生成的配置设置基础URL(如支持)。
Run
sentry-pp-cli doctor
to verify setup.

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    sentry-pp-cli organizations list-your --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • Offline-friendly — sync/search commands can use the local SQLite store when available
  • Non-interactive — never prompts, every input is a flag
Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • 可管道传输 — 标准输出为JSON,错误信息输出到标准错误
  • 可过滤
    --select
    参数保留指定字段子集。点路径可深入嵌套结构;数组会遍历每个元素。这对于在冗长API中缩小上下文范围至关重要:
    bash
    sentry-pp-cli organizations list-your --agent --select id,name,status
  • 可预览
    --dry-run
    参数会显示请求内容但不发送
  • 离线友好 — 同步/搜索命令在本地SQLite存储可用时可使用该存储
  • 非交互式 — 从不弹出提示,所有输入均通过标志参数提供

Response envelope

响应信封

Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
Parse
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
字段获取数据,通过
.meta.source
判断数据是实时的还是本地的。仅当标准输出为终端时,才会在标准错误中打印人类可读的
N results (live)
摘要——管道/Agent消费者只会在标准输出中获取纯JSON数据。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
sentry-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
sentry-pp-cli feedback --stdin < notes.txt
sentry-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.sentry-pp-cli/feedback.jsonl
. They are never POSTed unless
SENTRY_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
SENTRY_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当你(或Agent)发现此CLI存在问题时,可以记录反馈:
sentry-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
sentry-pp-cli feedback --stdin < notes.txt
sentry-pp-cli feedback list --json --limit 10
反馈条目会本地存储在
~/.sentry-pp-cli/feedback.jsonl
中。除非设置了
SENTRY_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置
SENTRY_FEEDBACK_AUTO_SEND=true
,否则反馈不会被POST发送。默认行为是仅本地存储。
请记录让你感到意外的内容,而非正式的bug报告。简短、具体、一句话即可:这样的反馈才最有价值。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令都支持
--deliver <sink>
参数。输出会发送到指定的sink,同时也会输出到标准输出(或替代标准输出),这样Agent无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认值;仅输出到标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出正文POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
不支持的协议会返回结构化错误,并列出支持的协议类型。Webhook失败时会返回非零退出码,并在标准错误中记录URL和HTTP状态码。

Named Profiles

命名配置文件

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
sentry-pp-cli profile save briefing --json
sentry-pp-cli --profile briefing organizations list-your
sentry-pp-cli profile list --json
sentry-pp-cli profile show briefing
sentry-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。当定时Agent每次运行都使用相同配置调用同一命令时(如HeyGen的“Beacon”模式),可使用配置文件。
sentry-pp-cli profile save briefing --json
sentry-pp-cli --profile briefing organizations list-your
sentry-pp-cli profile list --json
sentry-pp-cli profile show briefing
sentry-pp-cli profile delete briefing --yes
显式标志参数优先级始终高于配置文件值;配置文件值优先级高于默认值。
agent-context
命令会在
available_profiles
下列出所有可用配置文件,以便自省Agent在运行时发现它们。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
4Authentication required
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
4需要认证
5API错误(上游问题)
7速率限制(请等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    sentry-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
的逻辑:
  1. 为空、
    help
    --help
    → 显示
    sentry-pp-cli --help
    输出
  2. install
    开头
    → 若结尾为
    mcp
    → 安装MCP;否则 → 参见顶部的前提条件部分
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/monitoring/sentry/cmd/sentry-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add sentry-pp-mcp -- sentry-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/monitoring/sentry/cmd/sentry-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add sentry-pp-mcp -- sentry-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which sentry-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    sentry-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    sentry-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which sentry-pp-cli
    若未找到,提供安装选项(参见顶部的前提条件部分)。
  2. 将用户查询与上述“独特功能”和“命令参考”中的最佳匹配命令对应。
  3. 添加
    --agent
    参数执行命令:
    bash
    sentry-pp-cli <command> [subcommand] [args] --agent
  4. 若存在歧义,查看子命令帮助:
    sentry-pp-cli <command> --help