pp-trigger-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Trigger.dev — Printing Press CLI

Trigger.dev — Printing Press CLI

Prerequisites: Install the CLI

前置条件:安装CLI

This skill drives the
trigger-dev-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 trigger-dev
  2. Verify:
    trigger-dev-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/developer-tools/trigger-dev/cmd/trigger-dev-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.
trigger-dev-pp-cli wraps the full v3 management API (47 endpoints across runs, schedules, deployments, batches, queues, waitpoints, env vars, and TRQL queries) and adds the cross-run aggregations the dashboard hides one click deep — LLM span cost rollups, recurring-failure patterns, real-time failure watch with desktop notifications, env-var diffs across environments, and substring grep over cached run errors.
本技能基于
trigger-dev-pp-cli
二进制文件运行。在调用本技能的任何命令之前,必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装器安装:
    bash
    npx -y @mvanhorn/printing-press install trigger-dev
  2. 验证安装:
    trigger-dev-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/developer-tools/trigger-dev/cmd/trigger-dev-pp-cli@latest
如果安装后执行
--version
提示“command not found”,说明安装步骤未将二进制文件添加到
$PATH
中。请在验证成功前不要执行技能命令。
trigger-dev-pp-cli封装了完整的v3管理API(涵盖运行、调度、部署、批量任务、队列、等待点、环境变量和TRQL查询等47个端点),并添加了官方仪表盘需要多次点击才能查看的跨运行聚合功能——LLM链路成本汇总、重复故障模式、带桌面通知的实时故障监控、跨环境环境变量对比、缓存运行错误的子字符串搜索。

When to Use This CLI

何时使用本CLI

Reach for this CLI when an agent task needs to operate Trigger.dev programmatically: triaging failed runs, auditing schedule health, diffing env vars across environments, computing LLM costs across runs, or watching for new failures. It complements the official trigger.dev CLI (which focuses on dev-time deploy/init/dev) by exposing the management API surface as scriptable, agent-native commands with offline FTS and typed exit codes.
当Agent任务需要以编程方式操作Trigger.dev时,可使用本CLI:分类失败运行、审计调度健康状态、对比跨环境环境变量、计算跨运行的LLM成本,或监控新故障。它补充了官方trigger.dev CLI(侧重于开发阶段的部署/初始化/开发),将管理API以可脚本化、原生支持Agent的命令形式暴露,并提供离线全文搜索和类型化退出码。

Unique Capabilities

独特功能

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

Real-time terminal alerting

实时终端告警

  • runs watch
    — Watches runs for new failures and interrupts your terminal the moment one happens — desktop notification, sound, and a non-zero exit so it composes with shell loops.
    Reach for this when an agent or oncall engineer needs to react to failures the second they appear, instead of polling the dashboard or waiting for an email.
    bash
    trigger-dev-pp-cli runs watch --task daily-digest --notify --sound
  • runs watch
    —— 监控运行状态,一旦出现新故障立即触发终端提醒——桌面通知、声音提示,并返回非零退出码,可与Shell循环配合使用。
    当Agent或值班工程师需要在故障出现的第一时间做出响应,而不是轮询仪表盘或等待邮件通知时,可使用此命令。
    bash
    trigger-dev-pp-cli runs watch --task daily-digest --notify --sound

Local state that compounds

可累积的本地状态

  • schedules stale
    — Lists schedules that stopped firing or whose recent runs have a low success rate — the zombie cron audit no other tool gives you.
    Reach for this after an env var rotation, a Postgres URL change, or any silent-config event that might have killed crons without anyone noticing.
    bash
    trigger-dev-pp-cli schedules stale --days 7 --min-success-rate 0.5 --agent
  • runs span-cost
    — Walks recent runs, surfaces the most expensive LLM spans grouped by model and task, with token totals and dollar cost — the report your finance lead actually wants.
    Reach for this when an AI-product engineer or agent needs to pinpoint which model + task pair is eating the LLM budget, before the next billing cycle closes.
    bash
    trigger-dev-pp-cli runs span-cost --since 7d --by model,task --top 20 --agent --select spans.model,spans.task_identifier,spans.total_cost_cents
  • failures top
    — Top recurring (task, error-signature) pairs over a time window — mechanical group-by, no LLM, no NLP.
    Reach for this in an incident loop when an agent needs to find the dominant failure signature instead of reading 200 stack traces by hand.
    bash
    trigger-dev-pp-cli failures top --since 7d --top 20 --agent --select patterns.task_identifier,patterns.error_signature,patterns.count,patterns.last_occurred_at
  • runs find
    — FTS5 grep over the synced runs table — error messages, tags, metadata, task identifiers — ranked by recency.
    Reach for this when an agent has a fragment of an error message and needs the matching runs without typing TRQL.
    bash
    trigger-dev-pp-cli runs find "payload too large" --status FAILED --since 30d --agent
  • schedules stale
    —— 列出停止触发或近期运行成功率较低的调度——这是其他工具都没有的僵尸定时任务审计功能。
    当完成环境变量轮换、Postgres URL变更或任何可能导致定时任务静默失效的配置变更后,可使用此命令。
    bash
    trigger-dev-pp-cli schedules stale --days 7 --min-success-rate 0.5 --agent
  • runs span-cost
    —— 遍历近期运行记录,按模型和任务分组展示成本最高的LLM链路,包含令牌总数和美元成本——这是财务负责人真正需要的报告。
    当AI产品工程师或Agent需要在下次计费周期结束前,确定哪个模型+任务组合消耗了最多LLM预算时,可使用此命令。
    bash
    trigger-dev-pp-cli runs span-cost --since 7d --by model,task --top 20 --agent --select spans.model,spans.task_identifier,spans.total_cost_cents
  • failures top
    —— 按时间窗口统计最频繁出现的(任务,错误特征)组合——纯机械分组,无需LLM或NLP。
    当Agent在事件排查过程中,需要找出主要故障特征而不是手动阅读200条堆栈跟踪时,可使用此命令。
    bash
    trigger-dev-pp-cli failures top --since 7d --top 20 --agent --select patterns.task_identifier,patterns.error_signature,patterns.count,patterns.last_occurred_at
  • runs find
    —— 在同步的运行表中使用FTS5搜索——错误信息、标签、元数据、任务标识符——按时间排序。
    当Agent仅知道部分错误信息片段,需要找到匹配的运行记录而无需编写TRQL时,可使用此命令。
    bash
    trigger-dev-pp-cli runs find "payload too large" --status FAILED --since 30d --agent

Operator hygiene

运维规范

  • envvars diff
    — Side-by-side diff of environment variables between two environments — keys missing, keys extra, values that differ (masked).
    Reach for this when an agent is debugging "works in staging, fails in prod" — the answer is almost always an env var, and diff makes the answer one command away.
    bash
    trigger-dev-pp-cli envvars diff --from prod --to staging --project proj_abc --agent
  • envvars diff
    —— 对比两个环境的环境变量——缺失的键、多余的键、值不同的键(已掩码处理)。
    当Agent调试“ staging环境正常,生产环境失败”的问题时,答案几乎总是环境变量差异,此命令可一键获取结果。
    bash
    trigger-dev-pp-cli envvars diff --from prod --to staging --project proj_abc --agent

Agent ergonomics

Agent易用性

  • runs get
    — runs get returns typed exit codes: 0=COMPLETED, 20=FAILED, 21=CRASHED, 22=SYSTEM_FAILURE, 23=CANCELED, 3=not-found, 4=auth-error. Cobra annotation pp:typed-exit-codes makes verify and agents read the contract directly.
    Reach for this when an agent is writing a shell loop over many runs and wants to branch on success/failure without parsing JSON.
    bash
    trigger-dev-pp-cli runs get run_abc123 --json && echo COMPLETED || echo $?
  • runs get
    —— 返回类型化退出码:0=已完成,20=失败,21=崩溃,22=系统故障,23=已取消,3=未找到,4=认证错误。Cobra注解pp:typed-exit-codes可让验证流程和Agent直接读取该约定。
    当Agent编写Shell循环处理多个运行记录,希望根据成功/失败分支处理而无需解析JSON时,可使用此命令。
    bash
    trigger-dev-pp-cli runs get run_abc123 --json && echo COMPLETED || echo $?

Command Reference

命令参考

batches — Manage batches
  • trigger-dev-pp-cli batches <batchId>
    — Retrieve a batch by its ID, including its status and the IDs of all runs in the batch.
deployments — Manage deployments
  • trigger-dev-pp-cli deployments get-latest-v1
    — Retrieve information about the latest unmanaged deployment for the authenticated project.
  • trigger-dev-pp-cli deployments get-v1
    — Retrieve information about a specific deployment by its ID.
  • trigger-dev-pp-cli deployments list-v1
    — List deployments for the authenticated environment, ordered by most recent first.
projects — Manage projects
query — Manage query
  • trigger-dev-pp-cli query execute-v1
    — Execute a TRQL (Trigger.dev Query Language) query against your run data. TRQL is a SQL-style query language that...
  • trigger-dev-pp-cli query get-schema-v1
    — Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and...
  • trigger-dev-pp-cli query list-dashboards-v1
    — List available built-in dashboards with their widgets. Each dashboard contains pre-built TRQL queries for common...
queues — Manage queues
  • trigger-dev-pp-cli queues list-v1
    — List all queues in your environment with pagination support.
  • trigger-dev-pp-cli queues retrieve-v1
    — Get a queue by its ID, or by type and name.
runs — Manage runs
  • trigger-dev-pp-cli runs list-v1
    — List runs in a specific environment. You can filter the runs by status, created at, task identifier, version, and more.
  • trigger-dev-pp-cli runs retrieve-v1
    — Retrieve information about a run, including its status, payload, output, and attempts. If you authenticate with a...
schedules — Manage schedules
  • trigger-dev-pp-cli schedules create-v1
    — Create a new
    IMPERATIVE
    schedule based on the specified options.
  • trigger-dev-pp-cli schedules delete-v1
    — Delete a schedule by its ID. This will only work on
    IMPERATIVE
    schedules that were created in the dashboard or...
  • trigger-dev-pp-cli schedules get-v1
    — Get a schedule by its ID.
  • trigger-dev-pp-cli schedules list-v1
    — List all schedules. You can also paginate the results.
  • trigger-dev-pp-cli schedules update-v1
    — Update a schedule by its ID. This will only work on
    IMPERATIVE
    schedules that were created in the dashboard or...
tasks — Manage tasks
  • trigger-dev-pp-cli tasks
    — Batch trigger tasks with up to 1,000 payloads with SDK 4.3.1+ (500 in prior versions).
timezones — Manage timezones
  • trigger-dev-pp-cli timezones
    — Get all supported timezones that schedule tasks support.
waitpoints — Manage waitpoints
  • trigger-dev-pp-cli waitpoints complete-token-callback-v1
    — Completes a waitpoint token using the pre-signed callback URL returned in the
    url
    field when the token was...
  • trigger-dev-pp-cli waitpoints complete-token-v1
    — Completes a waitpoint token, unblocking any run that is waiting for it via
    wait.forToken()
    . An optional
    data
    ...
  • trigger-dev-pp-cli waitpoints create-token-v1
    — Creates a new waitpoint token that can be used to pause a run until an external event completes it. The token...
  • trigger-dev-pp-cli waitpoints list-tokens-v1
    — Returns a paginated list of waitpoint tokens for the current environment. Results are ordered by creation date,...
  • trigger-dev-pp-cli waitpoints retrieve-token-v1
    — Retrieves a waitpoint token by its ID, including its current status and output if it has been completed.
batches —— 管理批量任务
  • trigger-dev-pp-cli batches <batchId>
    —— 根据ID获取批量任务信息,包括其状态和批量中所有运行记录的ID。
deployments —— 管理部署
  • trigger-dev-pp-cli deployments get-latest-v1
    —— 获取已认证项目的最新非托管部署信息。
  • trigger-dev-pp-cli deployments get-v1
    —— 根据ID获取特定部署的信息。
  • trigger-dev-pp-cli deployments list-v1
    —— 列出已认证环境的部署记录,按时间倒序排列。
projects —— 管理项目
query —— 管理查询
  • trigger-dev-pp-cli query execute-v1
    —— 针对运行数据执行TRQL(Trigger.dev查询语言)查询。TRQL是一种类SQL查询语言,用于...
  • trigger-dev-pp-cli query get-schema-v1
    —— 获取TRQL查询的 schema,包括所有可用表、列、数据类型、描述以及...
  • trigger-dev-pp-cli query list-dashboards-v1
    —— 列出所有可用的内置仪表盘及其组件。每个仪表盘包含针对常见场景预构建的TRQL查询...
queues —— 管理队列
  • trigger-dev-pp-cli queues list-v1
    —— 列出环境中的所有队列,支持分页。
  • trigger-dev-pp-cli queues retrieve-v1
    —— 根据ID或类型和名称获取队列信息。
runs —— 管理运行记录
  • trigger-dev-pp-cli runs list-v1
    —— 列出特定环境的运行记录。可按状态、创建时间、任务标识符、版本等筛选。
  • trigger-dev-pp-cli runs retrieve-v1
    —— 获取运行记录信息,包括状态、负载、输出和尝试次数。如果使用...认证
schedules —— 管理调度
  • trigger-dev-pp-cli schedules create-v1
    —— 根据指定选项创建新的
    IMPERATIVE
    调度。
  • trigger-dev-pp-cli schedules delete-v1
    —— 根据ID删除调度。仅适用于在仪表盘或...创建的
    IMPERATIVE
    调度。
  • trigger-dev-pp-cli schedules get-v1
    —— 根据ID获取调度信息。
  • trigger-dev-pp-cli schedules list-v1
    —— 列出所有调度,支持分页。
  • trigger-dev-pp-cli schedules update-v1
    —— 根据ID更新调度。仅适用于在仪表盘或...创建的
    IMPERATIVE
    调度。
tasks —— 管理任务
  • trigger-dev-pp-cli tasks
    —— 批量触发任务,最多支持1000个负载(SDK 4.3.1及以上版本;旧版本为500个)。
timezones —— 管理时区
  • trigger-dev-pp-cli timezones
    —— 获取调度任务支持的所有时区。
waitpoints —— 管理等待点
  • trigger-dev-pp-cli waitpoints complete-token-callback-v1
    —— 使用令牌创建时返回的
    url
    字段中的预签名回调URL完成等待点令牌。
  • trigger-dev-pp-cli waitpoints complete-token-v1
    —— 完成等待点令牌,解除所有通过
    wait.forToken()
    等待该令牌的运行记录。可选的
    data
    ...
  • trigger-dev-pp-cli waitpoints create-token-v1
    —— 创建新的等待点令牌,可用于暂停运行记录,直到外部事件完成该令牌。令牌...
  • trigger-dev-pp-cli waitpoints list-tokens-v1
    —— 返回当前环境的等待点令牌分页列表,按创建日期排序...
  • trigger-dev-pp-cli waitpoints retrieve-token-v1
    —— 根据ID获取等待点令牌信息,包括当前状态和已完成时的输出。

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
trigger-dev-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
trigger-dev-pp-cli which "<用你自己的语言描述功能>"
which
命令会将自然语言的功能查询解析为CLI功能索引中最匹配的命令。退出码
0
表示至少找到一个匹配项;退出码
2
表示没有找到明确匹配项——可改用
--help
或缩小查询范围。

Recipes

使用示例

Triage today's failures

分类今日故障

bash
trigger-dev-pp-cli sync --resources runs --since 1d && trigger-dev-pp-cli failures top --since 1d --top 10 --agent --select 'task,error_signature,count,last_seen'
Sync today's runs, then group by task and normalized error signature to surface the dominant failure patterns.
bash
trigger-dev-pp-cli sync --resources runs --since 1d && trigger-dev-pp-cli failures top --since 1d --top 10 --agent --select 'task,error_signature,count,last_seen'
同步今日运行记录,然后按任务和标准化错误特征分组,展示主要故障模式。

Watch a deploy window

监控部署窗口

bash
trigger-dev-pp-cli runs watch --task my-task --notify --sound
Stay in the terminal during a deploy — the command exits non-zero and beeps on the first new FAILED run.
bash
trigger-dev-pp-cli runs watch --task my-task --notify --sound
部署期间留在终端——当出现第一个新的失败运行记录时,命令返回非零退出码并发出蜂鸣声。

Audit env-var drift across environments

审计跨环境环境变量漂移

bash
trigger-dev-pp-cli envvars diff --project proj_abc --from prod --to staging --agent
Compare two environments' variables; values are masked, drift flagged.
bash
trigger-dev-pp-cli envvars diff --project proj_abc --from prod --to staging --agent
对比两个环境的变量;值已掩码处理,漂移会被标记。

Find runs that hit a specific error

查找出现特定错误的运行记录

bash
trigger-dev-pp-cli runs find "connection timeout" --since 7d --status FAILED --agent --select 'id,taskIdentifier,error.message,createdAt'
substring grep over the local store with --select narrowing the agent context to the fields that matter.
bash
trigger-dev-pp-cli runs find "connection timeout" --since 7d --status FAILED --agent --select 'id,taskIdentifier,error.message,createdAt'
在本地存储中进行子字符串搜索,
--select
参数可将Agent上下文缩小到关键字段。

Run a curated TRQL recipe

执行预定义TRQL示例

bash
trigger-dev-pp-cli query run cost-by-model-7d --param env=prod --agent
Execute a curated TRQL query without authoring SQL. Recipes cover failure-rate, cost, and latency by common dimensions.
bash
trigger-dev-pp-cli query run cost-by-model-7d --param env=prod --agent
无需编写SQL即可执行预定义的TRQL查询。示例涵盖按常见维度统计故障率、成本和延迟。

Auth Setup

认证设置

Authentication uses a Trigger.dev secret key in the
Authorization: Bearer
header. Set
TRIGGER_SECRET_KEY
to your environment's key —
tr_dev_…
for development,
tr_prod_…
for production,
tr_pat_…
for personal access tokens. Each key is environment-scoped: a dev key cannot manage prod runs.
Run
trigger-dev-pp-cli doctor
to verify setup.
认证使用Trigger.dev密钥,放在
Authorization: Bearer
请求头中。将
TRIGGER_SECRET_KEY
设置为对应环境的密钥——开发环境为
tr_dev_…
,生产环境为
tr_prod_…
,个人访问令牌为
tr_pat_…
。每个密钥都有环境范围限制:开发密钥无法管理生产环境的运行记录。
执行
trigger-dev-pp-cli doctor
验证设置是否正确。

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
    trigger-dev-pp-cli batches mock-value --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
  • Explicit retries — use
    --idempotent
    only when an already-existing create should count as success, and
    --ignore-missing
    only when a missing delete target should count as success
在任何命令后添加
--agent
参数。等效于:
--json --compact --no-input --no-color --yes
  • 可管道化 —— 标准输出为JSON,错误信息输出到标准错误
  • 可过滤 ——
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是缩小上下文的关键:
    bash
    trigger-dev-pp-cli batches mock-value --agent --select id,name,status
  • 可预览 ——
    --dry-run
    参数显示请求但不发送
  • 离线友好 —— 同步/搜索命令可使用本地SQLite存储(如果可用)
  • 非交互式 —— 从不提示,所有输入均通过标志参数
  • 显式重试 —— 仅当已存在的创建操作应视为成功时使用
    --idempotent
    ,仅当删除目标不存在应视为成功时使用
    --ignore-missing

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.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
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:
trigger-dev-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
trigger-dev-pp-cli feedback --stdin < notes.txt
trigger-dev-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.trigger-dev-pp-cli/feedback.jsonl
. They are never POSTed unless
TRIGGER_DEV_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
TRIGGER_DEV_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存在问题时,可记录反馈:
trigger-dev-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
trigger-dev-pp-cli feedback --stdin < notes.txt
trigger-dev-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.trigger-dev-pp-cli/feedback.jsonl
文件中。除非设置了
TRIGGER_DEV_FEEDBACK_ENDPOINT
且传递了
--send
参数或
TRIGGER_DEV_FEEDBACK_AUTO_SEND=true
,否则不会自动发送。默认行为仅存储在本地。
写下让你感到意外的内容,而不是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>
参数。输出会发送到指定的接收器,同时(或替代)标准输出,以便Agent无需手动管道即可路由命令结果。支持三种接收器:
接收器效果
stdout
默认;仅输出到标准输出
file:<path>
原子性将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(
application/json
格式;如果使用
--compact
则为
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.
trigger-dev-pp-cli profile save briefing --json
trigger-dev-pp-cli --profile briefing batches mock-value
trigger-dev-pp-cli profile list --json
trigger-dev-pp-cli profile show briefing
trigger-dev-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”模式。
trigger-dev-pp-cli profile save briefing --json
trigger-dev-pp-cli --profile briefing batches mock-value
trigger-dev-pp-cli profile list --json
trigger-dev-pp-cli profile show briefing
trigger-dev-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
    trigger-dev-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
    → 显示
    trigger-dev-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/developer-tools/trigger-dev/cmd/trigger-dev-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add trigger-dev-pp-mcp -- trigger-dev-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/developer-tools/trigger-dev/cmd/trigger-dev-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add trigger-dev-pp-mcp -- trigger-dev-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which trigger-dev-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
    trigger-dev-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    trigger-dev-pp-cli <command> --help
    .
  1. 检查是否已安装:
    which trigger-dev-pp-cli
    如果未找到,提供安装选项(参见顶部前置条件)。
  2. 将用户查询与上述独特功能和命令参考中的最佳命令匹配。
  3. 添加
    --agent
    参数执行:
    bash
    trigger-dev-pp-cli <command> [subcommand] [args] --agent
  4. 如果存在歧义,查看子命令帮助:
    trigger-dev-pp-cli <command> --help