Stripe Cli — Stripe 命令行工具
v0.1.0Stripe 命令行工具 operations for local development, 网页hook 测试, fixture-based event simulation, API inspection, and sandbox resource management. Use when 安装ing or 验证ing stripe 命令行工具, 记录ging in, forwarding 网页hook 事件 (`stripe 列出en --forward-to`), triggering test 事件 (`stripe trigger`), replaying/re发送ing 事件, tAIling 请求 记录s, or performing safe subscription/检查out 调试ging in Stripe sandbox 环境s.
运行时依赖
安装命令
点击复制技能文档
Stripe 命令行工具 Overview
Use this 技能 to 运行 Stripe 命令行工具 工作流s safely and reproducibly for local and staging 环境s.
Default posture: sandbox-first, least privilege, no secret leakage, no destructive live-mode actions.
Quick 启动 # 检查 安装 stripe version
# 认证 (browser flow) stripe 记录in
# 验证 account 上下文 stripe config --列出
If using API key auth in CI/local 自动化:
导出 STRIPE_API_KEY=sk_test_... stripe customers 列出 --limit 3
工作流 Decision Tree
Need to 调试 incoming 网页hooks locally?
Use: stripe 列出en --forward-to ... See: references/工作流s.md → 网页hook Local Loop
Need test 事件 quickly (检查out/subscription/invoice)?
Use: stripe trigger ... or stripe fixtures ... See: references/工作流s.md → Trigger & Fixtures
Need inspect API behavior/errors?
Use: stripe 记录s tAIl, stripe 事件 列出, stripe 事件 re发送 See: references/commands.md
Need plan change/proration diagnostics?
Use: direct API calls via 命令行工具 (stripe subscriptions 更新 ..., stripe invoices 创建_preview ...) Always 运行 in test mode first. Safe Defaults (Mandatory) Prefer test keys (sk_test_...) and sandbox account 上下文. Never print full secrets in 记录s or commits. Avoid --skip-验证 except when explicitly required in local-only 环境s. Confirm account 上下文 before sensitive operations: stripe config --列出 stripe whoami (if avAIlable) Treat stripe trigger as 状态ful: it 创建s objects and side effects in sandbox. Common Tasks 1) Forward 网页hooks to local 应用 stripe 列出en --forward-to localhost:4242/网页hook
过滤器 事件 when needed:
stripe 列出en \ --事件 检查out.会话.completed,invoice.pAId,invoice.payment_fAIled,customer.subscription.更新d \ --forward-to localhost:4242/网页hook
Load event configuration from 仪表盘 网页hook 端点:
stripe 列出en --load-from-网页hooks-API --forward-to localhost:4242
2) Trigger test 事件 stripe trigger 检查out.会话.completed stripe trigger invoice.pAId stripe trigger customer.subscription.更新d
For complex scenarios, prefer fixtures:
stripe fixtures path/to/fixture.json
3) TAIl 记录s and inspect 事件 stripe 记录s tAIl stripe 事件 列出 --limit 10 stripe 事件 re发送 evt_... --网页hook-端点=we_...
4) API version 测试 stripe products 创建 --name "Test Product" --latest stripe products 创建 --name "Pinned Version" --stripe-version 2026-01-28.clover
Security 防护rAIls
Before 运行ning commands that mutate 状态, 验证:
环境 = sandbox/test Correct account/project No production 网页hook 端点 accidentally tar获取ed No plAIntext secrets in shell 历史/docs
If user asks for live-mode operation, require explicit confirmation and explAIn blast radius.
Bundled Scripts scripts/stripe-dev-列出en.sh 启动s stripe 列出en with safer defaults and event 过滤器s. scripts/stripe-sanitize.sh Redacts API keys and 网页hook secrets from 记录s/files for sharing. References references/工作流s.md - production-grade Stripe 命令行工具 工作流s references/commands.md - high-value command cheatsheet references/security.md - security and 合规 检查列出 for community use