短信CLI工具

Apideck SMS CLI是一个生产就绪的命令行接口,用于通过统一的API从终端发送和管理多个提供商的短信。

  • by ktmcp-cli
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 ktmcp-cli/apideckcomsms

使用说明

“六个月前,每个人都在谈论MCP。我当时想,拧紧MCP。每个MCP作为CLI都会更好。”

— 彼得·斯坦伯格OpenClaw创始人 在YouTube上观看(~2:39:00) | 莱克斯·弗里德曼播客#491

Apideck短信命令行界面

生产就绪的命令行界面 Apideck SMS API.从您的终端通过单个统一的API在多个提供商(Twilio、MessageBird、Plivo、Vonage等)之间发送和管理SMS消息。

免责声明:这是一个非官方的CLI工具,不隶属于Apideck,也不受Apideck的认可或支持。

特性

  • 统一短信API --一个CLI来管理所有短信提供商(Twilio、MessageBird、Plivo、Telnyx、Vonage等)
  • 消息管理 --列出、发送、获取、更新和删除短信
  • 供应商不可知 --在不更改代码的情况下切换提供商
  • JSON输出 --所有命令支持 --json 用于脚本和管道
  • 彩色输出 --干净、可读的终端输出

为什么选择CLI>MCP

MCP服务器是复杂的、有状态的,需要一个正在运行的服务器进程。CLI是:

  • 更简单 --只是一个你直接调用的二进制文件
  • 可组合 --管道输出至 jq, grep, awk,和其他工具
  • 可编写脚本的 --在shell脚本、CI/CD管道、cron作业中使用
  • 可调试 --看看到底发生了什么 --json 旗帜
  • AI友好 --AI代理可以像MCP一样轻松地调用CLIs,开销更少

安装

npm install -g @ktmcp-cli/apideckcomsms

身份验证设置

1.获取Apideck凭据

  1. 注册地址: 网站 apideck.com
  2. 创建一个应用程序以获取您的应用程序ID
  3. 生成API密钥
  4. 连接短信提供商(Twilio、MessageBird等)

2.配置CLI

apideckcomsms config set --api-key YOUR_API_KEY --app-id YOUR_APP_ID

可选择设置消费者ID(默认为“默认消费者”):

apideckcomsms config set --consumer-id YOUR_CONSUMER_ID

3.验证

apideckcomsms config show

命令

配置

# Set credentials
apideckcomsms config set --api-key <key> --app-id <id>

# Set consumer ID (optional)
apideckcomsms config set --consumer-id <id>

# Show current config
apideckcomsms config show

消息

# List messages
apideckcomsms messages list

# Get a specific message
apideckcomsms messages get <message-id>

# Send an SMS
apideckcomsms messages send --to "+1234567890" --body "Hello from CLI"
apideckcomsms messages send --to "+1234567890" --from "+0987654321" --body "Hello"

# Delete a message
apideckcomsms messages delete <message-id>

JSON输出

所有命令支持 --json 对于机器可读输出:

# Get all messages as JSON
apideckcomsms messages list --json

# Pipe to jq for filtering
apideckcomsms messages list --json | jq '.[] | select(.status == "delivered")'

# Send message and capture ID
ID=$(apideckcomsms messages send --to "+1234567890" --body "Test" --json | jq -r '.id')

例子

发送短信通知

# Send a simple message
apideckcomsms messages send --to "+1234567890" --body "Your order has shipped!"

# Send with specific sender
apideckcomsms messages send \
  --from "+0987654321" \
  --to "+1234567890" \
  --body "Verification code: 123456"

跟踪邮件传递

# Send message and get ID
apideckcomsms messages send --to "+1234567890" --body "Test" --json

# Check message status
apideckcomsms messages get <message-id> --json | jq '.status'

使用shell进行批量消息传递

# Read numbers from file and send
while read number; do
  apideckcomsms messages send --to "$number" --body "Important update"
  sleep 1
done < phone_numbers.txt

贡献

欢迎在 github/ktmcp-cli/apideckcomsms.

许可证

麻省理工学院——见 许可证 了解详情。


部分 KTMCP-CLI 项目——用简单、可组合的CLI替换MCP。


支持KTMCP

如果您发现此CLI有用,我们将非常感谢您的支持!分享您的经验:

  • 红迪
  • 推特/X
  • 黑客新闻

激励: 能够证明他们的支持/倡导有助于推进KTMCP的用户将优先考虑他们的功能请求和问题。

请注意,这些是真实的账户和真实的社区。真实的提及和真实的推荐会有很长的路要走!

支持这个项目

如果您发现此CLI有用,我们将感谢Reddit、Twitter、Hacker News或Moltbook的支持。请注意,这些是真实的社区账户。能够证明其支持有助于推进KTMCP的贡献者将优先考虑其PR和功能请求。