SuperAPI AI 工具集

Sentry CLI

部署与运维

查看项目

更新于 10-15 20:25

技能介绍

Sentry CLI 是 Sentry 的官方命令行工具,用于在开发与 CI/CD 流程中操作 Sentry 的发布管理、调试信息文件和事件相关功能。

主要用途与能力:管理 releases(列出、新建、关联提交、上传 source maps、完成发布、记录部署);处理调试信息文件(检查、上传、列出);发送事件到 Sentry;查看和流式输出日志;管理并运行 cron monitors。

安装方式(保留原命令):npm i -g @sentry/cli;curl -sL https://sentry.io/get-cli/ | bash;brew install getsentry/tools/sentry-cli;或 docker run --rm -v $(pwd):/work getsentry/sentry-cli --help。

配置:可运行 sentry-cli login 交互登录,或设置环境变量 SENTRY_AUTH_TOKEN、SENTRY_ORG、SENTRY_PROJECT,也可写入 .sentryclirc 或 ~/.sentryclirc。

常用命令示例(保留原样):sentry-cli releases list --format json;sentry-cli releases new <version>;sentry-cli releases set-commits <version> --auto;sentry-cli releases files <version> upload-sourcemaps ./dist;sentry-cli releases finalize <version>;sentry-cli releases deploys <version> new -e production;sentry-cli debug-files check/upload/list;sentry-cli send-event -m "Test event";sentry-cli logs list / logs stream;sentry-cli monitors list;sentry-cli monitors run <monitor-slug> -- <command>。

适合在 CI/CD 中非交互地管理发布和部署、上传 source map 与调试符号、包装 cron 任务。兼容 Sentry SaaS 与 Self-Hosted 24.11.1+。支持 --format json 输出结构化结果,便于自动化处理。关于收费、价格及更多限制,资料暂未提供。注意:交互式问题管理、AI 根因分析和自然语言命令由另一个新的 Sentry developer CLI(sentry 命令)提供,与本工具 sentry-cli 不同。