@cowliss/cli (英语)
cow,Cowliss的命令行。 它所做的一切仪表板,
它推动自动化(JSON定义)和电子邮件模板
在你的回购.
安装
npm install -D @cowliss/cli
或运行它而不安装:
npx -y @cowliss/cli whoami
节点22和上.
签名
cow login
cow whoami
cow login 打开仪表盘并缓存 API 的会话符号
谈话,每个API URL。 在CI中,设置 COW_PIPELINE_KEY 转到管道密钥
换句话说.
自动化和电子邮件作为代码
cow init my-messaging
cd my-messaging
npm install
你会得到 cow.json,一个 automations/ 文件夹, a emails/ 文件夹和文件
这造就了他们。 自动化是JSON定义、触发器和列表
步骤; 写入 automations/abandoned-checkout.json数字 :
{
"trigger": { "event": "checkout_started" },
"purpose": "marketing",
"from": "Shop <[email protected]>",
"steps": [
{
"id": "wait",
"type": "waitForEvent",
"event": "purchase_completed",
"timeout": "24h"
},
{
"id": "purchased",
"type": "branch",
"if": { "var": "steps.wait.matched" },
"then": [{ "id": "done", "type": "exit" }]
},
{
"id": "nudge",
"type": "sendEmail",
"template": "abandoned-checkout",
"props": { "checkoutUrl": { "var": "event.properties.checkoutUrl" } }
}
]
}
然后说:
# run its scenarios (scenarios/abandoned-checkout.*.json) on a virtual clock, nothing sent
cow test abandoned-checkout
# check the project and show what a push would change, including conflicts with dashboard edits
cow plan
# write the project's resources to the app in one transaction
cow push
# what the server holds, and what is running
cow status
# turn it on
cow enable abandoned-checkout
推动创造了每个自动化和模板的新版本,
并更改任何旗帜 : cow enable 财务报告和审定财务报表 cow disable 是唯一的东西
在任何人面前放一个自动化设备 已经启动的运行继续
它开始的自动化版本。 上次编辑于仪表板的资源
或 API 之上是冲突
运行与 --force· ; cow pull 将应用程序的行写回文件 。 要撤销,
git revert 并再次推进.
行政,还有其他一切
cow users, (中文(简体) ), cow events, (中文(简体) ), cow apps, (中文(简体) ), cow sources, (中文(简体) ), cow segments, (中文(简体) ),
cow automations, (中文(简体) ), cow deliveries, (中文(简体) ), cow domains, (中文(简体) ), cow billing 和其余部分
读取和写入仪表板使用的相同的API. 添加 --json 用于输出您
可以吹烟管.
对于您编辑中的代理
cow mcp
一个MCP服务器在stdio上,曝光管理员API作为工具. 指向编辑器
时间 npx -y @cowliss/cli mcp。 。 。 .
文档
页面存档备份,存于互联网档案馆. docs.cowliss.com
许可证
麻省理工学院