pp-twilio

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Twilio — Printing Press CLI

Twilio — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
twilio-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 twilio --cli-only
  2. Verify:
    twilio-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.26.3 or newer):
bash
go install github.com/mvanhorn/printing-press-library/library/social-and-messaging/twilio/cmd/twilio-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.
Twilio's official CLI is a thin Node wrapper with 1–3 second cold start and no local cache. This CLI syncs your Messages, Calls, Recordings, UsageRecords, and IncomingPhoneNumbers into a local SQLite store you can grep, SQL, and aggregate offline. It ships every v2010 endpoint as a typed Cobra command, plus 12 novel features the Twilio ecosystem does not have: delivery-failure breakdowns, subaccount spend matrices, call-trace stitches, TCPA opt-out checks, idle-number reclamation, webhook-orphan audits, and more.
本技能基于
twilio-pp-cli
二进制文件运行。在调用本技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install twilio --cli-only
  2. 验证安装:
    twilio-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(如无Node环境、离线等),可改用Go直接安装(要求Go 1.26.3或更高版本):
bash
go install github.com/mvanhorn/printing-press-library/library/social-and-messaging/twilio/cmd/twilio-pp-cli@latest
如果安装后执行
--version
提示"command not found",说明安装程序未将二进制文件添加到
$PATH
中。在验证成功前,请不要执行技能相关命令。
Twilio官方CLI是一个轻量Node包装器,冷启动时间为1-3秒且无本地缓存。而本CLI会将您的消息、通话、录音、使用记录和来电号码同步到本地SQLite存储中,您可以通过grep、SQL查询和聚合操作离线使用。它将所有v2010端点作为类型化Cobra命令提供,还具备Twilio生态系统中没有的12项创新功能:投递失败细分、子账户支出矩阵、通话追踪拼接、TCPA退订检查、闲置号码回收、Webhook孤立审计等。

When to Use This CLI

何时使用本CLI

Reach for this CLI when an agent or operator needs Twilio data they cannot get in one API call: cross-subaccount aggregation, delivery-failure analysis, TCPA opt-out audits, idle-number cleanup, or any 'how was last week' question. It is also the right tool for incident triage when a CallSid needs the full Call+Recording+Transcription stitch in one command. Skip it for one-off message sends if you already have twilio-cli configured — but for any analytic or investigative workflow it is faster, offline-capable, and agent-native.
当代理或操作员需要无法通过单次API调用获取的Twilio数据时,可使用本CLI:跨子账户聚合、投递失败分析、TCPA退订审计、闲置号码清理,或任何类似"上周情况如何"的查询。当需要通过CallSid获取完整的通话+录音+转录拼接信息时,它也是事件分类的理想工具。如果您已配置twilio-cli,单次消息发送可跳过本CLI,但对于任何分析或调查工作流,本CLI速度更快、支持离线且更适合代理使用。

Unique Capabilities

独特功能

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

Local state that compounds

可累积的本地状态

  • delivery-failures
    — See why messages failed last week, grouped by error code and destination country, with the dollar cost of those failures totaled.
    When debugging delivery, agents need the failure distribution, not 4000 individual rows. This command answers 'why is delivery degraded' in one query.
    bash
    twilio-pp-cli delivery-failures --since 7d --json
  • subaccount-spend
    — One CSV with every subaccount's last-month spend pivoted across SMS, MMS, voice, and recording categories — the agency-billing report nobody else ships.
    For agency operators, this is the entire monthly billing report in one command. Agents can run it with --period thisMonth for a live forecast.
    bash
    twilio-pp-cli subaccount-spend --period last-month --csv > march-billing.csv
  • message-status-funnel
    — Distribution of message terminal statuses (delivered, failed, undelivered, sent) with delivery-rate percentages and median time-to-delivery.
    Operations dashboards need the funnel, not the raw rows. One query is the whole 'is delivery healthy right now' answer.
    bash
    twilio-pp-cli message-status-funnel --since 24h --json
  • call-disposition
    — Cross-tab of call Status (completed, busy, no-answer, failed, canceled) by AnsweredBy (human, machine_start, fax), with dollar cost per bucket.
    Outbound campaign tuning depends on knowing the human-pickup rate vs voicemail rate. Agents can answer this without paging through thousands of call records.
    bash
    twilio-pp-cli call-disposition --since 7d --json
  • delivery-failures
    — 查看上周消息投递失败的原因,按错误代码和目标国家分组,并统计这些失败产生的总成本。
    调试投递问题时,代理需要的是失败分布情况,而非4000条单独记录。该命令通过一次查询即可回答"投递质量下降的原因是什么"。
    bash
    twilio-pp-cli delivery-failures --since 7d --json
  • subaccount-spend
    — 生成一个CSV文件,包含每个子账户上月在SMS、MMS、语音和录音类别上的支出情况——这是其他工具未提供的代理账单报告。
    对于代理运营商而言,该命令可一键生成完整的月度账单报告。代理还可使用--period thisMonth参数获取实时支出预测。
    bash
    twilio-pp-cli subaccount-spend --period last-month --csv > march-billing.csv
  • message-status-funnel
    — 展示消息最终状态(已投递、失败、未投递、已发送)的分布情况,以及投递率百分比和中位投递时间。
    运营仪表板需要的是漏斗分析,而非原始记录。一次查询即可回答"当前投递是否正常"。
    bash
    twilio-pp-cli message-status-funnel --since 24h --json
  • call-disposition
    — 按通话状态(已完成、占线、无人接听、失败、已取消)和接听方(人工、机器应答、传真)交叉统计,并显示每个分组的成本。
    外呼活动优化需要了解人工接听率与语音邮件率的对比。代理无需翻阅数千条通话记录即可获取该信息。
    bash
    twilio-pp-cli call-disposition --since 7d --json

Cross-entity stitches

跨实体拼接

  • call-trace
    — Given a CallSid, return everything that happened on that call: metadata, recordings, transcriptions, conference participation — in one structured output.
    On-call engineers paged about a dropped call need the full picture in seconds, not three API round trips while the customer waits.
    bash
    twilio-pp-cli call-trace CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --json
  • idle-numbers
    — Phone numbers you are paying for but have not used to send or receive in N days — with the dollar amount you are wasting per month.
    At $1/number/month, agencies running 100+ subaccount numbers can save hundreds annually. Agents can run it as a monthly cleanup task.
    bash
    twilio-pp-cli idle-numbers --since 30d --json
  • webhook-audit
    — Group your IncomingPhoneNumbers by their Voice/SMS webhook URL to find single-use URLs that may be orphans pointing at deleted endpoints. Add --probe for a live HEAD check.
    Orphan webhooks silently fail incoming calls and SMS. Quarterly audit is cheap insurance against silent dropped traffic.
    bash
    twilio-pp-cli webhook-audit --probe --json
  • conversation
    — All messages and calls involving one phone number, merged into a single timestamped timeline with in/out arrows, body, and duration.
    When investigating a customer complaint or fraud claim, the full back-and-forth is one query. Agents can answer 'what did we say to this number' without four searches.
    bash
    twilio-pp-cli conversation +14155551234 --json
  • call-trace
    — 给定一个CallSid,返回该通话的所有相关信息:元数据、录音、转录内容、会议参与情况——以结构化输出呈现。
    当值班工程师接到通话中断的告警时,需要在几秒内获取完整信息,而非在客户等待时进行三次API调用。
    bash
    twilio-pp-cli call-trace CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --json
  • idle-numbers
    — 您正在付费但N天内未用于发送或接收的电话号码,并显示每月浪费的费用。
    按每个号码每月1美元计算,拥有100+子账户号码的代理每年可节省数百美元。代理可将此作为月度清理任务执行。
    bash
    twilio-pp-cli idle-numbers --since 30d --json
  • webhook-audit
    — 按语音/SMS Webhook URL分组您的来电号码,找出可能指向已删除端点的孤立单用途URL。添加--probe参数可进行实时HEAD检查。
    孤立Webhook会导致来电和SMS静默失败。每季度进行一次审计是防止流量静默丢失的低成本保障。
    bash
    twilio-pp-cli webhook-audit --probe --json
  • conversation
    — 将涉及某个电话号码的所有消息和通话合并为一个带时间戳的时间线,包含进出箭头、内容和时长。
    调查客户投诉或欺诈索赔时,一次查询即可获取完整的往来记录。代理无需进行四次搜索即可回答"我们与该号码的沟通内容是什么"。
    bash
    twilio-pp-cli conversation +14155551234 --json

Compliance & audit

合规与审计

  • opt-out-violations
    — Find numbers that texted STOP/UNSUBSCRIBE/END/QUIT and any messages your account sent to them afterwards — the TCPA exposure check the Twilio API has no resource for.
    TCPA fines are $500–$1,500 per violation. Compliance teams audit for this quarterly; agents can spot-check it any time.
    bash
    twilio-pp-cli opt-out-violations --since 90d --json --select to,opt_out_at,subsequent_send_at,message_sid
  • error-code-explain
    — Top error codes from your recent messages and calls, with curated one-line explanations and fixes for the most common Twilio errors.
    Every Twilio user Googles error codes. Bundling the explanation with the count removes a constant context-switch.
    bash
    twilio-pp-cli error-code-explain --since 7d --json
  • opt-out-violations
    — 找出发送过STOP/UNSUBSCRIBE/END/QUIT退订请求的号码,以及您的账户在退订后向这些号码发送的任何消息——这是Twilio API未提供的TCPA风险检查功能。
    TCPA罚款为每次违规500-1500美元。合规团队每季度会进行一次审计,代理也可随时进行抽查。
    bash
    twilio-pp-cli opt-out-violations --since 90d --json --select to,opt_out_at,subsequent_send_at,message_sid
  • error-code-explain
    — 显示您近期消息和通话中的顶级错误代码,并提供针对最常见Twilio错误的精选单行解释和修复方案。
    每个Twilio用户都会搜索错误代码。将解释与错误计数捆绑在一起,可避免频繁切换上下文。
    bash
    twilio-pp-cli error-code-explain --since 7d --json

Agent-native plumbing

代理原生管道

  • sync-status
    — Last sync timestamp and row count per resource in the local store — so you know how fresh every other analytic command is.
    Without freshness UX every analytic command is suspect. One read tells the agent whether to call sync first.
    bash
    twilio-pp-cli sync-status --json
  • tail-messages
    — Stream new messages with a status filter as they happen — twilio-pp-cli's --follow that twilio-cli does not ship.
    Incident triage and on-call response need a live feed of failures, not a polling shell loop. One command, no daemon.
    bash
    twilio-pp-cli tail-messages --status failed --follow
  • sync-status
    — 本地存储中每个资源的最后同步时间戳和行数——让您了解其他分析命令的数据新鲜度。
    如果没有新鲜度提示,所有分析命令的结果都会受到质疑。一次查看即可让代理决定是否需要先执行同步。
    bash
    twilio-pp-cli sync-status --json
  • tail-messages
    — 按状态筛选并实时流式传输新消息——这是twilio-cli未提供的--follow功能。
    事件分类和值班响应需要失败消息的实时流,而非轮询shell循环。只需一个命令,无需守护进程。
    bash
    twilio-pp-cli tail-messages --status failed --follow

Command Reference

命令参考

2010-04-01 — Manage 2010 04 01
  • twilio-pp-cli 2010-04-01 create-account
    — Create a new Twilio Subaccount from the account making the request
  • twilio-pp-cli 2010-04-01 fetch-account
    — Fetch the account specified by the provided Account Sid
  • twilio-pp-cli 2010-04-01 list-account
    — Retrieves a collection of Accounts belonging to the account used to make the request
  • twilio-pp-cli 2010-04-01 update-account
    — Modify the properties of a given Account
addresses — Manage addresses
  • twilio-pp-cli addresses delete-address
    — Delete address
  • twilio-pp-cli addresses fetch-address
    — Fetch address
  • twilio-pp-cli addresses update-address
    — Update address
addresses-json — Manage addresses json
  • twilio-pp-cli addresses-json create-address
    — Create address
  • twilio-pp-cli addresses-json list-address
    — List address
applications — Manage applications
  • twilio-pp-cli applications delete
    — Delete the application by the specified application sid
  • twilio-pp-cli applications fetch
    — Fetch the application specified by the provided sid
  • twilio-pp-cli applications update
    — Updates the application's properties
applications-json — Manage applications json
  • twilio-pp-cli applications-json create-application
    — Create a new application within your account
  • twilio-pp-cli applications-json list-application
    — Retrieve a list of applications representing an application within the requesting account
authorized-connect-apps — Manage authorized connect apps
  • twilio-pp-cli authorized-connect-apps <AccountSid> <ConnectAppSid>
    — Fetch an instance of an authorized-connect-app
authorized-connect-apps-json — Manage authorized connect apps json
  • twilio-pp-cli authorized-connect-apps-json <AccountSid>
    — Retrieve a list of authorized-connect-apps belonging to the account used to make the request
available-phone-numbers — Manage available phone numbers
  • twilio-pp-cli available-phone-numbers <AccountSid> <CountryCode>
    — Fetch country
available-phone-numbers-json — Manage available phone numbers json
  • twilio-pp-cli available-phone-numbers-json <AccountSid>
    — List available phone number country
balance-json — Manage balance json
  • twilio-pp-cli balance-json <AccountSid>
    — Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child...
calls — Manage calls
  • twilio-pp-cli calls delete
    — Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account...
  • twilio-pp-cli calls fetch
    — Fetch the call specified by the provided Call SID
  • twilio-pp-cli calls update
    — Initiates a call redirect or terminates a call
calls-json — Manage calls json
  • twilio-pp-cli calls-json create-call
    — Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections
  • twilio-pp-cli calls-json list-call
    — Retrieves a collection of calls made to and from your account
conferences — Manage conferences
  • twilio-pp-cli conferences fetch
    — Fetch an instance of a conference
  • twilio-pp-cli conferences update
    — Update
conferences-json — Manage conferences json
  • twilio-pp-cli conferences-json <AccountSid>
    — Retrieve a list of conferences belonging to the account used to make the request
connect-apps — Manage connect apps
  • twilio-pp-cli connect-apps delete
    — Delete an instance of a connect-app
  • twilio-pp-cli connect-apps fetch
    — Fetch an instance of a connect-app
  • twilio-pp-cli connect-apps update
    — Update a connect-app with the specified parameters
connect-apps-json — Manage connect apps json
  • twilio-pp-cli connect-apps-json <AccountSid>
    — Retrieve a list of connect-apps belonging to the account used to make the request
incoming-phone-numbers — Manage incoming phone numbers
  • twilio-pp-cli incoming-phone-numbers create-local
    — Create local
  • twilio-pp-cli incoming-phone-numbers create-mobile
    — Create mobile
  • twilio-pp-cli incoming-phone-numbers create-toll-free
    — Create toll free
  • twilio-pp-cli incoming-phone-numbers delete
    — Delete a phone-numbers belonging to the account used to make the request.
  • twilio-pp-cli incoming-phone-numbers fetch
    — Fetch an incoming-phone-number belonging to the account used to make the request.
  • twilio-pp-cli incoming-phone-numbers list-local
    — List local
  • twilio-pp-cli incoming-phone-numbers list-mobile
    — List mobile
  • twilio-pp-cli incoming-phone-numbers list-toll-free
    — List toll free
  • twilio-pp-cli incoming-phone-numbers update
    — Update an incoming-phone-number instance.
incoming-phone-numbers-json — Manage incoming phone numbers json
  • twilio-pp-cli incoming-phone-numbers-json create-incoming-phone-number
    — Purchase a phone-number for the account.
  • twilio-pp-cli incoming-phone-numbers-json list-incoming-phone-number
    — Retrieve a list of incoming-phone-numbers belonging to the account used to make the request.
keys — Manage keys
  • twilio-pp-cli keys delete
    — Delete
  • twilio-pp-cli keys fetch
    — Fetch
  • twilio-pp-cli keys update
    — Update
keys-json — Manage keys json
  • twilio-pp-cli keys-json create-new-key
    — Create new key
  • twilio-pp-cli keys-json list-key
    — List key
messages — Manage messages
  • twilio-pp-cli messages delete
    — Deletes a Message resource from your account
  • twilio-pp-cli messages fetch
    — Fetch a specific Message
  • twilio-pp-cli messages update
    — Update a Message resource (used to redact Message
    body
    text and to cancel not-yet-sent messages)
messages-json — Manage messages json
  • twilio-pp-cli messages-json create-message
    — Send a message
  • twilio-pp-cli messages-json list-message
    — Retrieve a list of Message resources associated with a Twilio Account
notifications — Manage notifications
  • twilio-pp-cli notifications <AccountSid> <Sid>
    — Fetch a notification belonging to the account used to make the request
notifications-json — Manage notifications json
  • twilio-pp-cli notifications-json <AccountSid>
    — Retrieve a list of notifications belonging to the account used to make the request
outgoing-caller-ids — Manage outgoing caller ids
  • twilio-pp-cli outgoing-caller-ids delete
    — Delete the caller-id specified from the account
  • twilio-pp-cli outgoing-caller-ids fetch
    — Fetch an outgoing-caller-id belonging to the account used to make the request
  • twilio-pp-cli outgoing-caller-ids update
    — Updates the caller-id
outgoing-caller-ids-json — Manage outgoing caller ids json
  • twilio-pp-cli outgoing-caller-ids-json create-validation-request
    — Create validation request
  • twilio-pp-cli outgoing-caller-ids-json list-outgoing-caller-id
    — Retrieve a list of outgoing-caller-ids belonging to the account used to make the request
queues — Manage queues
  • twilio-pp-cli queues delete
    — Remove an empty queue
  • twilio-pp-cli queues fetch
    — Fetch an instance of a queue identified by the QueueSid
  • twilio-pp-cli queues update
    — Update the queue with the new parameters
queues-json — Manage queues json
  • twilio-pp-cli queues-json create-queue
    — Create a queue
  • twilio-pp-cli queues-json list-queue
    — Retrieve a list of queues belonging to the account used to make the request
recordings — Manage recordings
  • twilio-pp-cli recordings delete
    — Delete a recording from your account
  • twilio-pp-cli recordings fetch
    — Fetch an instance of a recording
recordings-json — Manage recordings json
  • twilio-pp-cli recordings-json <AccountSid>
    — Retrieve a list of recordings belonging to the account used to make the request
signing-keys — Manage signing keys
  • twilio-pp-cli signing-keys delete
    — Delete
  • twilio-pp-cli signing-keys fetch
    — Fetch
  • twilio-pp-cli signing-keys update
    — Update
signing-keys-json — Manage signing keys json
  • twilio-pp-cli signing-keys-json create-new-signing-key
    — Create a new Signing Key for the account making the request.
  • twilio-pp-cli signing-keys-json list-signing-key
    — List signing key
sip — Manage sip
  • twilio-pp-cli sip create-auth-calls-credential-list-mapping
    — Create a new credential list mapping resource
  • twilio-pp-cli sip create-auth-calls-ip-access-control-list-mapping
    — Create a new IP Access Control List mapping
  • twilio-pp-cli sip create-auth-registrations-credential-list-mapping
    — Create a new credential list mapping resource
  • twilio-pp-cli sip create-credential
    — Create a new credential resource.
  • twilio-pp-cli sip create-credential-list
    — Create a Credential List
  • twilio-pp-cli sip create-credential-list-mapping
    — Create a CredentialListMapping resource for an account.
  • twilio-pp-cli sip create-domain
    — Create a new Domain
  • twilio-pp-cli sip create-ip-access-control-list
    — Create a new IpAccessControlList resource
  • twilio-pp-cli sip create-ip-access-control-list-mapping
    — Create a new IpAccessControlListMapping resource.
  • twilio-pp-cli sip create-ip-address
    — Create a new IpAddress resource.
  • twilio-pp-cli sip delete-auth-calls-credential-list-mapping
    — Delete a credential list mapping from the requested domain
  • twilio-pp-cli sip delete-auth-calls-ip-access-control-list-mapping
    — Delete an IP Access Control List mapping from the requested domain
  • twilio-pp-cli sip delete-auth-registrations-credential-list-mapping
    — Delete a credential list mapping from the requested domain
  • twilio-pp-cli sip delete-credential
    — Delete a credential resource.
  • twilio-pp-cli sip delete-credential-list
    — Delete a Credential List
  • twilio-pp-cli sip delete-credential-list-mapping
    — Delete a CredentialListMapping resource from an account.
  • twilio-pp-cli sip delete-domain
    — Delete an instance of a Domain
  • twilio-pp-cli sip delete-ip-access-control-list
    — Delete an IpAccessControlList from the requested account
  • twilio-pp-cli sip delete-ip-access-control-list-mapping
    — Delete an IpAccessControlListMapping resource.
  • twilio-pp-cli sip delete-ip-address
    — Delete an IpAddress resource.
  • twilio-pp-cli sip fetch-auth-calls-credential-list-mapping
    — Fetch a specific instance of a credential list mapping
  • twilio-pp-cli sip fetch-auth-calls-ip-access-control-list-mapping
    — Fetch a specific instance of an IP Access Control List mapping
  • twilio-pp-cli sip fetch-auth-registrations-credential-list-mapping
    — Fetch a specific instance of a credential list mapping
  • twilio-pp-cli sip fetch-credential
    — Fetch a single credential.
  • twilio-pp-cli sip fetch-credential-list
    — Get a Credential List
  • twilio-pp-cli sip fetch-credential-list-mapping
    — Fetch a single CredentialListMapping resource from an account.
  • twilio-pp-cli sip fetch-domain
    — Fetch an instance of a Domain
  • twilio-pp-cli sip fetch-ip-access-control-list
    — Fetch a specific instance of an IpAccessControlList
  • twilio-pp-cli sip fetch-ip-access-control-list-mapping
    — Fetch an IpAccessControlListMapping resource.
  • twilio-pp-cli sip fetch-ip-address
    — Read one IpAddress resource.
  • twilio-pp-cli sip list-auth-calls-credential-list-mapping
    — Retrieve a list of credential list mappings belonging to the domain used in the request
  • twilio-pp-cli sip list-auth-calls-ip-access-control-list-mapping
    — Retrieve a list of IP Access Control List mappings belonging to the domain used in the request
  • twilio-pp-cli sip list-auth-registrations-credential-list-mapping
    — Retrieve a list of credential list mappings belonging to the domain used in the request
  • twilio-pp-cli sip list-credential
    — Retrieve a list of credentials.
  • twilio-pp-cli sip list-credential-list
    — Get All Credential Lists
  • twilio-pp-cli sip list-credential-list-mapping
    — Read multiple CredentialListMapping resources from an account.
  • twilio-pp-cli sip list-domain
    — Retrieve a list of domains belonging to the account used to make the request
  • twilio-pp-cli sip list-ip-access-control-list
    — Retrieve a list of IpAccessControlLists that belong to the account used to make the request
  • twilio-pp-cli sip list-ip-access-control-list-mapping
    — Retrieve a list of IpAccessControlListMapping resources.
  • twilio-pp-cli sip list-ip-address
    — Read multiple IpAddress resources.
  • twilio-pp-cli sip update-credential
    — Update a credential resource.
  • twilio-pp-cli sip update-credential-list
    — Update a Credential List
  • twilio-pp-cli sip update-domain
    — Update the attributes of a domain
  • twilio-pp-cli sip update-ip-access-control-list
    — Rename an IpAccessControlList
  • twilio-pp-cli sip update-ip-address
    — Update an IpAddress resource.
sms — Manage sms
  • twilio-pp-cli sms fetch-short-code
    — Fetch an instance of a short code
  • twilio-pp-cli sms list-short-code
    — Retrieve a list of short-codes belonging to the account used to make the request
  • twilio-pp-cli sms update-short-code
    — Update a short code with the following parameters
tokens-json — Manage tokens json
  • twilio-pp-cli tokens-json <AccountSid>
    — Create a new token for ICE servers
transcriptions — Manage transcriptions
  • twilio-pp-cli transcriptions delete
    — Delete a transcription from the account used to make the request
  • twilio-pp-cli transcriptions fetch
    — Fetch an instance of a Transcription
transcriptions-json — Manage transcriptions json
  • twilio-pp-cli transcriptions-json <AccountSid>
    — Retrieve a list of transcriptions belonging to the account used to make the request
usage — Manage usage
  • twilio-pp-cli usage create-trigger
    — Create a new UsageTrigger
  • twilio-pp-cli usage delete-trigger
    — Delete trigger
  • twilio-pp-cli usage fetch-trigger
    — Fetch and instance of a usage-trigger
  • twilio-pp-cli usage list-record
    — Retrieve a list of usage-records belonging to the account used to make the request
  • twilio-pp-cli usage list-record-all-time
    — List record all time
  • twilio-pp-cli usage list-record-daily
    — List record daily
  • twilio-pp-cli usage list-record-last-month
    — List record last month
  • twilio-pp-cli usage list-record-monthly
    — List record monthly
  • twilio-pp-cli usage list-record-this-month
    — List record this month
  • twilio-pp-cli usage list-record-today
    — List record today
  • twilio-pp-cli usage list-record-yearly
    — List record yearly
  • twilio-pp-cli usage list-record-yesterday
    — List record yesterday
  • twilio-pp-cli usage list-trigger
    — Retrieve a list of usage-triggers belonging to the account used to make the request
  • twilio-pp-cli usage update-trigger
    — Update an instance of a usage trigger
2010-04-01 — 管理2010-04-01版本资源
  • twilio-pp-cli 2010-04-01 create-account
    — 从发起请求的账户创建新的Twilio子账户
  • twilio-pp-cli 2010-04-01 fetch-account
    — 获取由提供的账户SID指定的账户信息
  • twilio-pp-cli 2010-04-01 list-account
    — 获取发起请求的账户所属的所有账户集合
  • twilio-pp-cli 2010-04-01 update-account
    — 修改指定账户的属性
addresses — 管理地址
  • twilio-pp-cli addresses delete-address
    — 删除地址
  • twilio-pp-cli addresses fetch-address
    — 获取地址信息
  • twilio-pp-cli addresses update-address
    — 更新地址信息
addresses-json — 管理地址(JSON格式)
  • twilio-pp-cli addresses-json create-address
    — 创建地址
  • twilio-pp-cli addresses-json list-address
    — 列出地址
applications — 管理应用
  • twilio-pp-cli applications delete
    — 删除由指定应用SID标识的应用
  • twilio-pp-cli applications fetch
    — 获取由提供的SID指定的应用信息
  • twilio-pp-cli applications update
    — 更新应用的属性
applications-json — 管理应用(JSON格式)
  • twilio-pp-cli applications-json create-application
    — 在您的账户中创建新应用
  • twilio-pp-cli applications-json list-application
    — 获取发起请求的账户中的应用列表
authorized-connect-apps — 管理授权的Connect应用
  • twilio-pp-cli authorized-connect-apps <AccountSid> <ConnectAppSid>
    — 获取授权Connect应用的实例
authorized-connect-apps-json — 管理授权的Connect应用(JSON格式)
  • twilio-pp-cli authorized-connect-apps-json <AccountSid>
    — 获取发起请求的账户所属的授权Connect应用列表
available-phone-numbers — 管理可用电话号码
  • twilio-pp-cli available-phone-numbers <AccountSid> <CountryCode>
    — 获取国家可用号码信息
available-phone-numbers-json — 管理可用电话号码(JSON格式)
  • twilio-pp-cli available-phone-numbers-json <AccountSid>
    — 列出可用电话号码的国家列表
balance-json — 管理余额(JSON格式)
  • twilio-pp-cli balance-json <AccountSid>
    — 根据账户SID获取账户余额。余额变化可能不会立即显示。子账户...
calls — 管理通话
  • twilio-pp-cli calls delete
    — 从您的账户中删除通话记录。记录删除后,将不再出现在API和账户...
  • twilio-pp-cli calls fetch
    — 获取由提供的通话SID指定的通话信息
  • twilio-pp-cli calls update
    — 发起通话重定向或终止通话
calls-json — 管理通话(JSON格式)
  • twilio-pp-cli calls-json create-call
    — 创建新的外呼通话,可拨打普通电话、SIP启用的端点或Twilio Client连接
  • twilio-pp-cli calls-json list-call
    — 获取您账户的所有通话集合
conferences — 管理会议
  • twilio-pp-cli conferences fetch
    — 获取会议实例信息
  • twilio-pp-cli conferences update
    — 更新会议信息
conferences-json — 管理会议(JSON格式)
  • twilio-pp-cli conferences-json <AccountSid>
    — 获取发起请求的账户所属的会议列表
connect-apps — 管理Connect应用
  • twilio-pp-cli connect-apps delete
    — 删除Connect应用实例
  • twilio-pp-cli connect-apps fetch
    — 获取Connect应用实例信息
  • twilio-pp-cli connect-apps update
    — 使用指定参数更新Connect应用
connect-apps-json — 管理Connect应用(JSON格式)
  • twilio-pp-cli connect-apps-json <AccountSid>
    — 获取发起请求的账户所属的Connect应用列表
incoming-phone-numbers — 管理来电号码
  • twilio-pp-cli incoming-phone-numbers create-local
    — 创建本地号码
  • twilio-pp-cli incoming-phone-numbers create-mobile
    — 创建移动号码
  • twilio-pp-cli incoming-phone-numbers create-toll-free
    — 创建免费号码
  • twilio-pp-cli incoming-phone-numbers delete
    — 删除发起请求的账户所属的电话号码
  • twilio-pp-cli incoming-phone-numbers fetch
    — 获取发起请求的账户所属的来电号码信息
  • twilio-pp-cli incoming-phone-numbers list-local
    — 列出本地号码
  • twilio-pp-cli incoming-phone-numbers list-mobile
    — 列出移动号码
  • twilio-pp-cli incoming-phone-numbers list-toll-free
    — 列出免费号码
  • twilio-pp-cli incoming-phone-numbers update
    — 更新来电号码实例信息
incoming-phone-numbers-json — 管理来电号码(JSON格式)
  • twilio-pp-cli incoming-phone-numbers-json create-incoming-phone-number
    — 为账户购买电话号码
  • twilio-pp-cli incoming-phone-numbers-json list-incoming-phone-number
    — 获取发起请求的账户所属的来电号码列表
keys — 管理密钥
  • twilio-pp-cli keys delete
    — 删除密钥
  • twilio-pp-cli keys fetch
    — 获取密钥信息
  • twilio-pp-cli keys update
    — 更新密钥信息
keys-json — 管理密钥(JSON格式)
  • twilio-pp-cli keys-json create-new-key
    — 创建新密钥
  • twilio-pp-cli keys-json list-key
    — 列出密钥
messages — 管理消息
  • twilio-pp-cli messages delete
    — 从您的账户中删除消息资源
  • twilio-pp-cli messages fetch
    — 获取特定消息信息
  • twilio-pp-cli messages update
    — 更新消息资源(用于编辑消息
    body
    文本和取消尚未发送的消息)
messages-json — 管理消息(JSON格式)
  • twilio-pp-cli messages-json create-message
    — 发送消息
  • twilio-pp-cli messages-json list-message
    — 获取与Twilio账户关联的消息资源列表
notifications — 管理通知
  • twilio-pp-cli notifications <AccountSid> <Sid>
    — 获取发起请求的账户所属的通知信息
notifications-json — 管理通知(JSON格式)
  • twilio-pp-cli notifications-json <AccountSid>
    — 获取发起请求的账户所属的通知列表
outgoing-caller-ids — 管理外呼主叫ID
  • twilio-pp-cli outgoing-caller-ids delete
    — 从账户中删除指定的主叫ID
  • twilio-pp-cli outgoing-caller-ids fetch
    — 获取发起请求的账户所属的外呼主叫ID信息
  • twilio-pp-cli outgoing-caller-ids update
    — 更新主叫ID信息
outgoing-caller-ids-json — 管理外呼主叫ID(JSON格式)
  • twilio-pp-cli outgoing-caller-ids-json create-validation-request
    — 创建验证请求
  • twilio-pp-cli outgoing-caller-ids-json list-outgoing-caller-id
    — 获取发起请求的账户所属的外呼主叫ID列表
queues — 管理队列
  • twilio-pp-cli queues delete
    — 删除空队列
  • twilio-pp-cli queues fetch
    — 获取由QueueSid标识的队列实例信息
  • twilio-pp-cli queues update
    — 使用新参数更新队列信息
queues-json — 管理队列(JSON格式)
  • twilio-pp-cli queues-json create-queue
    — 创建队列
  • twilio-pp-cli queues-json list-queue
    — 获取发起请求的账户所属的队列列表
recordings — 管理录音
  • twilio-pp-cli recordings delete
    — 从您的账户中删除录音
  • twilio-pp-cli recordings fetch
    — 获取录音实例信息
recordings-json — 管理录音(JSON格式)
  • twilio-pp-cli recordings-json <AccountSid>
    — 获取发起请求的账户所属的录音列表
signing-keys — 管理签名密钥
  • twilio-pp-cli signing-keys delete
    — 删除签名密钥
  • twilio-pp-cli signing-keys fetch
    — 获取签名密钥信息
  • twilio-pp-cli signing-keys update
    — 更新签名密钥信息
signing-keys-json — 管理签名密钥(JSON格式)
  • twilio-pp-cli signing-keys-json create-new-signing-key
    — 为发起请求的账户创建新的签名密钥
  • twilio-pp-cli signing-keys-json list-signing-key
    — 列出签名密钥
sip — 管理SIP
  • twilio-pp-cli sip create-auth-calls-credential-list-mapping
    — 创建新的凭证列表映射资源
  • twilio-pp-cli sip create-auth-calls-ip-access-control-list-mapping
    — 创建新的IP访问控制列表映射
  • twilio-pp-cli sip create-auth-registrations-credential-list-mapping
    — 创建新的凭证列表映射资源
  • twilio-pp-cli sip create-credential
    — 创建新的凭证资源
  • twilio-pp-cli sip create-credential-list
    — 创建凭证列表
  • twilio-pp-cli sip create-credential-list-mapping
    — 为账户创建CredentialListMapping资源
  • twilio-pp-cli sip create-domain
    — 创建新域名
  • twilio-pp-cli sip create-ip-access-control-list
    — 创建新的IpAccessControlList资源
  • twilio-pp-cli sip create-ip-access-control-list-mapping
    — 创建新的IpAccessControlListMapping资源
  • twilio-pp-cli sip create-ip-address
    — 创建新的IpAddress资源
  • twilio-pp-cli sip delete-auth-calls-credential-list-mapping
    — 从请求的域名中删除凭证列表映射
  • twilio-pp-cli sip delete-auth-calls-ip-access-control-list-mapping
    — 从请求的域名中删除IP访问控制列表映射
  • twilio-pp-cli sip delete-auth-registrations-credential-list-mapping
    — 从请求的域名中删除凭证列表映射
  • twilio-pp-cli sip delete-credential
    — 删除凭证资源
  • twilio-pp-cli sip delete-credential-list
    — 删除凭证列表
  • twilio-pp-cli sip delete-credential-list-mapping
    — 从账户中删除CredentialListMapping资源
  • twilio-pp-cli sip delete-domain
    — 删除域名实例
  • twilio-pp-cli sip delete-ip-access-control-list
    — 从请求的账户中删除IpAccessControlList
  • twilio-pp-cli sip delete-ip-access-control-list-mapping
    — 删除IpAccessControlListMapping资源
  • twilio-pp-cli sip delete-ip-address
    — 删除IpAddress资源
  • twilio-pp-cli sip fetch-auth-calls-credential-list-mapping
    — 获取特定的凭证列表映射实例
  • twilio-pp-cli sip fetch-auth-calls-ip-access-control-list-mapping
    — 获取特定的IP访问控制列表映射实例
  • twilio-pp-cli sip fetch-auth-registrations-credential-list-mapping
    — 获取特定的凭证列表映射实例
  • twilio-pp-cli sip fetch-credential
    — 获取单个凭证信息
  • twilio-pp-cli sip fetch-credential-list
    — 获取凭证列表信息
  • twilio-pp-cli sip fetch-credential-list-mapping
    — 从账户中获取单个CredentialListMapping资源
  • twilio-pp-cli sip fetch-domain
    — 获取域名实例信息
  • twilio-pp-cli sip fetch-ip-access-control-list
    — 获取特定的IpAccessControlList实例
  • twilio-pp-cli sip fetch-ip-access-control-list-mapping
    — 获取IpAccessControlListMapping资源
  • twilio-pp-cli sip fetch-ip-address
    — 读取单个IpAddress资源信息
  • twilio-pp-cli sip list-auth-calls-credential-list-mapping
    — 获取请求域名所属的凭证列表映射列表
  • twilio-pp-cli sip list-auth-calls-ip-access-control-list-mapping
    — 获取请求域名所属的IP访问控制列表映射列表
  • twilio-pp-cli sip list-auth-registrations-credential-list-mapping
    — 获取请求域名所属的凭证列表映射列表
  • twilio-pp-cli sip list-credential
    — 获取凭证列表
  • twilio-pp-cli sip list-credential-list
    — 获取所有凭证列表
  • twilio-pp-cli sip list-credential-list-mapping
    — 从账户中读取多个CredentialListMapping资源
  • twilio-pp-cli sip list-domain
    — 获取发起请求的账户所属的域名列表
  • twilio-pp-cli sip list-ip-access-control-list
    — 获取发起请求的账户所属的IpAccessControlLists列表
  • twilio-pp-cli sip list-ip-access-control-list-mapping
    — 获取IpAccessControlListMapping资源列表
  • twilio-pp-cli sip list-ip-address
    — 读取多个IpAddress资源信息
  • twilio-pp-cli sip update-credential
    — 更新凭证资源信息
  • twilio-pp-cli sip update-credential-list
    — 更新凭证列表信息
  • twilio-pp-cli sip update-domain
    — 更新域名属性
  • twilio-pp-cli sip update-ip-access-control-list
    — 重命名IpAccessControlList
  • twilio-pp-cli sip update-ip-address
    — 更新IpAddress资源信息
sms — 管理SMS
  • twilio-pp-cli sms fetch-short-code
    — 获取短码实例信息
  • twilio-pp-cli sms list-short-code
    — 获取发起请求的账户所属的短码列表
  • twilio-pp-cli sms update-short-code
    — 使用以下参数更新短码信息
tokens-json — 管理令牌(JSON格式)
  • twilio-pp-cli tokens-json <AccountSid>
    — 为ICE服务器创建新令牌
transcriptions — 管理转录内容
  • twilio-pp-cli transcriptions delete
    — 从发起请求的账户中删除转录内容
  • twilio-pp-cli transcriptions fetch
    — 获取转录内容实例信息
transcriptions-json — 管理转录内容(JSON格式)
  • twilio-pp-cli transcriptions-json <AccountSid>
    — 获取发起请求的账户所属的转录内容列表
usage — 管理使用情况
  • twilio-pp-cli usage create-trigger
    — 创建新的UsageTrigger
  • twilio-pp-cli usage delete-trigger
    — 删除触发器
  • twilio-pp-cli usage fetch-trigger
    — 获取usage-trigger实例信息
  • twilio-pp-cli usage list-record
    — 获取发起请求的账户所属的usage-records列表
  • twilio-pp-cli usage list-record-all-time
    — 获取所有时间的使用记录
  • twilio-pp-cli usage list-record-daily
    — 获取每日使用记录
  • twilio-pp-cli usage list-record-last-month
    — 获取上月使用记录
  • twilio-pp-cli usage list-record-monthly
    — 获取月度使用记录
  • twilio-pp-cli usage list-record-this-month
    — 获取本月使用记录
  • twilio-pp-cli usage list-record-today
    — 获取今日使用记录
  • twilio-pp-cli usage list-record-yearly
    — 获取年度使用记录
  • twilio-pp-cli usage list-record-yesterday
    — 获取昨日使用记录
  • twilio-pp-cli usage list-trigger
    — 获取发起请求的账户所属的usage-triggers列表
  • twilio-pp-cli usage update-trigger
    — 更新usage trigger实例信息

Finding the right command

查找合适的命令

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

Recipes

使用示例

Weekly delivery-failure report

每周投递失败报告

bash
twilio-pp-cli delivery-failures --since 7d --json --select error_code,to_country,count,cost_total
Runs the failure aggregation against the local store, narrows the response to the four fields that matter so an agent can summarise without parsing 4000 raw rows.
bash
twilio-pp-cli delivery-failures --since 7d --json --select error_code,to_country,count,cost_total
对本地存储执行失败聚合,将响应缩小到关键的四个字段,以便代理无需解析4000条原始记录即可汇总信息。

Last-month agency billing CSV

上月代理账单CSV

bash
twilio-pp-cli subaccount-spend --period last-month --csv > march-billing.csv
Walks every subaccount, calls usage/records per subaccount, pivots categories to columns, writes one wide CSV the finance team can paste straight into a spreadsheet.
bash
twilio-pp-cli subaccount-spend --period last-month --csv > march-billing.csv
遍历每个子账户,调用每个子账户的usage/records接口,将类别转换为列,生成一个宽格式CSV文件,财务团队可直接粘贴到电子表格中。

On-call call-trace from a Slack page

从Slack告警进行值班通话追踪

bash
twilio-pp-cli call-trace CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --json --select call.status,call.duration,recordings,transcriptions.text
Single command for the full Call → Recording → Transcription chain. Use --select with dotted paths to keep the response small enough that an agent can summarise it in a Slack reply.
bash
twilio-pp-cli call-trace CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --json --select call.status,call.duration,recordings,transcriptions.text
通过单个命令获取完整的通话→录音→转录内容链。使用--select和点路径可缩小响应内容,以便代理在Slack回复中汇总信息。

Quarterly TCPA opt-out audit

季度TCPA退订审计

bash
twilio-pp-cli opt-out-violations --since 90d --csv > q1-opt-out-audit.csv
Local temporal join finds inbound STOP/UNSUBSCRIBE messages and any subsequent outbound messages to the same number — the report compliance teams pay legal teams to construct manually today.
bash
twilio-pp-cli opt-out-violations --since 90d --csv > q1-opt-out-audit.csv
通过本地时间关联查找入站STOP/UNSUBSCRIBE消息以及之后向同一号码发送的任何出站消息——这是合规团队目前需付费请法务手动生成的报告。

Find idle numbers wasting money

查找浪费资金的闲置号码

bash
twilio-pp-cli idle-numbers --since 30d --json --select phone_number,friendly_name,monthly_cost,last_activity
LEFT JOIN over IncomingPhoneNumbers / Messages / Calls flagging numbers with no activity in 30 days. Output is one row per number with the dollar amount being wasted per month.
bash
twilio-pp-cli idle-numbers --since 30d --json --select phone_number,friendly_name,monthly_cost,last_activity
通过对来电号码/消息/通话执行LEFT JOIN,标记30天内无活动的号码。输出为每个号码一行,包含每月浪费的费用。

Auth Setup

认证设置

Twilio uses HTTP Basic auth. You can authenticate with your Account SID (AC...) plus your Auth Token, OR with a scoped API Key SID (SK...) plus its Secret. The Account SID is always required because it is part of the URL path. Run
twilio-pp-cli doctor
to verify your credentials, detect whether the key is master or scoped, and warn on parent/subaccount mismatches.
Run
twilio-pp-cli doctor
to verify setup.
Twilio使用HTTP Basic认证。您可以使用账户SID(AC...)加认证令牌,或使用范围化API密钥SID(SK...)加密钥进行认证。账户SID始终是必需的,因为它是URL路径的一部分。执行
twilio-pp-cli doctor
可验证您的凭证,检测密钥是主密钥还是范围化密钥,并警告父账户/子账户不匹配的情况。
执行
twilio-pp-cli doctor
验证设置。

Agent Mode

代理模式

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
    twilio-pp-cli 2010-04-01 create-account --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输出到stdout,错误输出到stderr
  • 可筛选
    --select
    保留字段子集。点路径可深入嵌套结构;数组可遍历元素。这对于在冗长API中缩小上下文至关重要:
    bash
    twilio-pp-cli 2010-04-01 create-account --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
可了解数据是实时的还是本地的。仅当stdout为终端时,才会向stderr打印人类可读的
N results (live)
摘要——管道/代理消费者仅会在stdout获取纯JSON。

Agent Feedback

代理反馈

When you (or the agent) notice something off about this CLI, record it:
twilio-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
twilio-pp-cli feedback --stdin < notes.txt
twilio-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.twilio-pp-cli/feedback.jsonl
. They are never POSTed unless
TWILIO_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
TWILIO_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.
当您(或代理)发现本CLI存在问题时,可记录反馈:
twilio-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
twilio-pp-cli feedback --stdin < notes.txt
twilio-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.twilio-pp-cli/feedback.jsonl
文件中。除非设置了
TWILIO_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置了
TWILIO_FEEDBACK_AUTO_SEND=true
,否则反馈不会被POST发送。默认行为仅存储在本地。
请记录让您感到意外的内容,而非提交错误报告。简短、具体、单行描述:这样的反馈才更有价值。

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,同时(或替代)输出到stdout,以便代理无需手动管道即可路由命令结果。支持三种sink:
Sink效果
stdout
默认;仅输出到stdout
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(当使用
--compact
时为
application/json
application/x-ndjson
格式)
未知的协议会被拒绝,并返回结构化错误,列出支持的协议集。Webhook失败会返回非零退出码,并在stderr记录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.
twilio-pp-cli profile save briefing --json
twilio-pp-cli --profile briefing 2010-04-01 create-account
twilio-pp-cli profile list --json
twilio-pp-cli profile show briefing
twilio-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.
配置文件是一组保存的参数值,可在多次调用中重复使用。当调度代理每次运行都使用相同配置调用同一命令时,可使用此功能——即HeyGen的"Beacon"模式。
twilio-pp-cli profile save briefing --json
twilio-pp-cli --profile briefing 2010-04-01 create-account
twilio-pp-cli profile list --json
twilio-pp-cli profile show briefing
twilio-pp-cli profile delete briefing --yes
显式参数始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,以便内省代理在运行时发现它们。

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
    twilio-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
    → 显示
    twilio-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/social-and-messaging/twilio/cmd/twilio-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add twilio-pp-mcp -- twilio-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/social-and-messaging/twilio/cmd/twilio-pp-mcp@latest
  2. 在Claude Code中注册:
    bash
    claude mcp add twilio-pp-mcp -- twilio-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

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