{"_id":"@35m/cli","name":"@35m/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@35m/cli","version":"0.1.0","description":"35pay command-line tool — JSON-first, agent-friendly. PaymentLink / checkout / refund from your shell.","license":"MIT","homepage":"https://pay.35team.com/docs/cli","repository":{"type":"git","url":"git+https://github.com/guo2001china/35m.git","directory":"packages/cli"},"bugs":{"url":"https://github.com/guo2001china/35m/issues"},"keywords":["35pay","payment","cli","agent","ai-agent","wechat-pay","stripe-cli-alternative"],"type":"module","main":"./dist/cli.js","bin":{"35pay":"dist/cli.js"},"engines":{"node":">=18"},"dependencies":{"@35m/sdk":"^0.1.0"},"devDependencies":{"@types/node":"^22.15.17","tsup":"^8.3.0","tsx":"^4.21.0","typescript":"^5.8.3"},"publishConfig":{"access":"public"},"author":{"name":"35m","email":"sdk@35m.ai"},"scripts":{"build":"tsup","dev":"tsx src/cli.ts"},"_id":"@35m/cli@0.1.0","_integrity":"sha512-Da9gl4V2Ow/jORnpNFIrt7GI4jCGVB1xNTIg2AiHfgU35nAp5bJi/fd+NKPC2HWy6mdrUl+3jP5t4kbK3s3z5Q==","_resolved":"/private/var/folders/sd/6t1pmz9j4dg98pszcfsvcq440000gn/T/87d12d0cd06518c91369b375f2bb1f39/35m-cli-0.1.0.tgz","_from":"file:35m-cli-0.1.0.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Da9gl4V2Ow/jORnpNFIrt7GI4jCGVB1xNTIg2AiHfgU35nAp5bJi/fd+NKPC2HWy6mdrUl+3jP5t4kbK3s3z5Q==","shasum":"b25ad67afd9c2a983fefa620b366d73348a8a7ad","tarball":"https://registry.npmjs.org/@35m/cli/-/cli-0.1.0.tgz","fileCount":4,"unpackedSize":7991,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHqVLqrJNYBquErvhd+GBEulNSO5JyuH3uNmABejqxG0AiEA5n7F/vk+gLLH7TY67p0DSq2snhdHZ1TRtpypU3M3p1E="}]},"_npmUser":{"name":"35m.ai","email":"sdk@35m.ai"},"directories":{},"maintainers":[{"name":"35m.ai","email":"sdk@35m.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1777375487170_0.5823653037843759"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T11:24:47.080Z","0.1.0":"2026-04-28T11:24:47.320Z","modified":"2026-04-28T11:24:47.545Z"},"maintainers":[{"name":"35m.ai","email":"sdk@35m.ai"}],"description":"35pay command-line tool — JSON-first, agent-friendly. PaymentLink / checkout / refund from your shell.","homepage":"https://pay.35team.com/docs/cli","keywords":["35pay","payment","cli","agent","ai-agent","wechat-pay","stripe-cli-alternative"],"repository":{"type":"git","url":"git+https://github.com/guo2001china/35m.git","directory":"packages/cli"},"author":{"name":"35m","email":"sdk@35m.ai"},"bugs":{"url":"https://github.com/guo2001china/35m/issues"},"license":"MIT","readme":"# @35m/cli\n\n35pay 命令行工具，JSON 输出，agent 友好。\n\n## 安装\n\n```bash\nnpm i -g @35m/cli\n# 或\nnpx @35m/cli help\n```\n\n## 用法\n\n```bash\nexport PAY_KEY=sk_test_xxx           # 或 sk_live_xxx\n\n# 创建支付\n35pay checkout create --amount 9900 --currency CNY \\\n  --description \"顾问费\" \\\n  --metadata '{\"orderId\":\"o_001\"}' \\\n  --success-url https://yoursite.com/done \\\n  --pretty\n\n# 输出（一行 JSON，--pretty 缩进）：\n# {\n#   \"id\": \"sess_abc123\",\n#   \"url\": \"https://pay.35team.com/c/sess_abc123\",\n#   \"status\": \"pending\",\n#   \"amount\": 9900,\n#   \"currency\": \"CNY\",\n#   \"mode\": \"test\"\n# }\n\n# 查询状态\n35pay checkout get sess_abc123\n\n# 退款\n35pay refund rec_xyz789 --amount 5000 --reason \"客户要求\"\n\n# 帮助\n35pay help\n```\n\n## Agent / 脚本场景\n\n```bash\n# pipe 给 jq 处理\nSK=sk_test_xxx 35pay checkout create --amount 100 --currency CNY \\\n  | jq -r '.url'\n# https://pay.35team.com/c/sess_xxx\n\n# 一句话帮人收款\nLINK=$(35pay checkout create --amount 9900 --currency CNY --description \"$1\" | jq -r '.url')\necho \"付款链接：$LINK\" | mail -s \"付款\" customer@example.com\n```\n\n## Env\n\n| 变量 | 默认 | 说明 |\n|---|---|---|\n| `PAY_KEY` | （必填） | sk_test_xxx 或 sk_live_xxx |\n| `PAY_BASE_URL` | https://pay.35team.com | 自部署 / 测试覆盖 |\n\n## 退出码\n\n- `0` 成功\n- `1` 用法错误 / 鉴权失败 / API 报错（错误以 JSON 形式打到 stderr）\n\n## 错误格式\n\n```json\n{ \"error\": \"HTTP 401: Invalid API key\" }\n```\n","readmeFilename":"README.md","_rev":"1-41009df9917fb1e94f92757981f3f992"}