HookCatch - Webhook Testing & Tunneling for OpenClaw
HookCatch is a webhook testing and localhost tunneling tool that lets you:
- - Create webhook bins to capture and inspect HTTP requests
- Tunnel your localhost to test webhooks locally
- Manage bins and view captured requests programmatically
Perfect for testing webhook integrations (Stripe, Twilio, GitHub, etc.) from your OpenClaw skills.
Quick Start
- 1. Authenticate with HookCatch:
CODEBLOCK0
- 2. Create a webhook bin:
CODEBLOCK1
- 3. View created bins:
CODEBLOCK2
- 4. View captured requests:
hookcatch bin requests abc123xyz --format json
OR
CODEBLOCK4
Available Commands
Bin Management
Create a new webhook bin:
hookcatch bin create [--name "My Bin"] [--private] [--password "secret"] [--format json]
Options:
- -
--name: Optional bin name for organization - INLINECODE1 : Create private bin (PLUS+ tier required)
- INLINECODE2 : Set password for private bin (min 4 chars)
- INLINECODE3 : Output format (
json recommended for automation)
Returns: Bin ID, webhook URL, and view URL
List your bins:
hookcatch bin list [--format json]
Shows all your bins with request counts and status.
Get requests for a bin:
hookcatch bin requests <binId> [--limit 50] [--format json|table] [--method GET] [--password "secret"]
Options:
- -
--limit: Number of requests to fetch (default: 50) - INLINECODE6 : Output format -
json for scripts, table for viewing - INLINECODE9 : Filter by HTTP method (GET, POST, etc.)
- INLINECODE10 : Password for private bins (if required; owners can use their auth token)
Show a single request:
CODEBLOCK8
Delete a bin:
CODEBLOCK9
Update a bin:
CODEBLOCK10
Show a single request:
CODEBLOCK11
Replay a request to a new URL:
CODEBLOCK12
Localhost Tunneling
Expose your localhost:
CODEBLOCK13
List active tunnels:
CODEBLOCK14
Stop a tunnel:
CODEBLOCK15
Forward incoming requests from the public URL to your local port 3000.
Tunnel limits:
- - FREE: 5 min/session, 3 sessions/day
- PLUS: 1h/session, unlimited
- PRO/ENTERPRISE: Unlimited
API Token Management
Generate long-lived API token:
CODEBLOCK16
Check token status:
CODEBLOCK17
Revoke token:
CODEBLOCK18
Account status:
CODEBLOCK19
Usage Examples for OpenClaw Skills
Example 1: Test Stripe Webhooks
CODEBLOCK20
Example 2: Test Local API
CODEBLOCK21
Example 3: Debug GitHub Webhooks
CODEBLOCK22
Integration with OpenClaw Skills
When building OpenClaw skills that need to test webhooks:
CODEBLOCK23
Environment Variables
- -
HOOKCATCH_API_KEY - API token for authentication (recommended for automation) - INLINECODE12 - Override API URL (default: https://api.hookcatch.dev)
Benefits for OpenClaw Users
- - No more ngrok setup: Use HookCatch tunnels for quick local testing
- Webhook inspection: See exactly what Stripe/Twilio/etc. is sending
- Automation-friendly: JSON output for easy parsing in skills
- Private bins: Keep your test data secure with password protection
- Fast & simple: One command to create bins or tunnels
Getting Help
- - Documentation: https://docs.hookcatch.dev
- Discord: Join #hookcatch in OpenClaw Discord
- GitHub: https://github.com/hookcatch/cli
- Email: support@hookcatch.dev
Tips
- 1. Use API tokens for skills: Generate a token once and use it in INLINECODE13
- JSON format for automation: Always use
--format json when parsing in scripts - Private bins for sensitive data: Use
--private for production webhook testing - Clean up after testing: Delete bins with
hookcatch bin delete to stay within limits
Built for OpenClaw by the HookCatch team 🪝
HookCatch - OpenClaw的Webhook测试与隧道工具
HookCatch是一个Webhook测试和本地主机隧道工具,让您可以:
- - 创建Webhook容器来捕获和检查HTTP请求
- 隧道化您的本地主机以在本地测试Webhook
- 以编程方式管理容器和查看捕获的请求
非常适合从您的OpenClaw技能中测试Webhook集成(Stripe、Twilio、GitHub等)。
快速开始
- 1. 使用HookCatch进行身份验证:
bash
hookcatch login
# 或使用API令牌(推荐用于自动化):
hookcatch token generate
export HOOKCATCH
APIKEY=hc
live...
- 2. 创建一个Webhook容器:
bash
hookcatch bin create --name 测试Stripe Webhooks
# 返回:https://hookcatch.dev/b/abc123xyz
- 3. 查看已创建的容器:
bash
hookcatch bin list
- 4. 查看捕获的请求:
bash
hookcatch bin requests abc123xyz --format json
或
bash
hookcatch bin requests --binId abc123xyz --format json
可用命令
容器管理
创建新的Webhook容器:
bash
hookcatch bin create [--name 我的容器] [--private] [--password secret] [--format json]
选项:
- - --name:可选的容器名称,用于组织管理
- --private:创建私有容器(需要PLUS+等级)
- --password:为私有容器设置密码(至少4个字符)
- --format:输出格式(自动化推荐使用json)
返回:容器ID、Webhook URL和查看URL
列出您的容器:
bash
hookcatch bin list [--format json]
显示所有容器及其请求计数和状态。
获取容器的请求:
bash
hookcatch bin requests [--limit 50] [--format json|table] [--method GET] [--password secret]
选项:
- - --limit:获取的请求数量(默认:50)
- --format:输出格式 - json用于脚本,table用于查看
- --method:按HTTP方法过滤(GET、POST等)
- --password:私有容器的密码(如果需要;所有者可以使用其身份验证令牌)
显示单个请求:
bash
hookcatch request [--format json|pretty] [--password secret]
删除容器:
bash
hookcatch bin delete --yes
更新容器:
bash
hookcatch bin update --name 新名称
hookcatch bin update --private --password secret123
hookcatch bin update --public
显示单个请求:
bash
hookcatch request [--format json|pretty]
将请求重放到新URL:
bash
hookcatch replay
hookcatch replay --binId --requestId --url
本地主机隧道
暴露您的本地主机:
bash
hookcatch tunnel 3000
创建:https://hookcatch.dev/tunnel/xyz789
列出活动隧道:
bash
hookcatch tunnel list
停止隧道:
bash
hookcatch stop
将来自公共URL的传入请求转发到您的本地端口3000。
隧道限制:
- - 免费版:每次会话5分钟,每天3次会话
- PLUS版:每次会话1小时,无限制
- PRO/企业版:无限制
API令牌管理
生成长期有效的API令牌:
bash
hookcatch token generate
存储令牌用于自动化
export HOOKCATCH
APIKEY=hc
live...
检查令牌状态:
bash
hookcatch token status
撤销令牌:
bash
hookcatch token revoke --yes
账户状态:
bash
hookcatch status
hookcatch whoami
OpenClaw技能使用示例
示例1:测试Stripe Webhooks
bash
为Stripe创建容器
BIN_URL=$(hookcatch bin create --name Stripe测试 --format json | jq -r .url)
在Stripe仪表板中使用此URL作为Webhook端点
echo 将Stripe Webhooks配置为:$BIN_URL
等待Webhooks...
sleep 10
获取并分析捕获的Webhooks
hookcatch bin requests abc123xyz --format json | jq .[] | {event: .body.type, amount: .body.data.object.amount}
示例2:测试本地API
bash
在端口8000上启动本地API
python -m http.server 8000 &
通过隧道暴露它
hookcatch tunnel 8000 --password
现在外部服务可以通过以下方式访问您的本地API:
https://hookcatch.dev/tunnel/xyz789
示例3:调试GitHub Webhooks
bash
创建容器
hookcatch bin create --name GitHub Webhooks
在GitHub仓库设置中,添加Webhook URL
触发事件(推送、PR等)
查看请求
hookcatch bin requests abc123xyz --method POST --limit 10
与OpenClaw技能的集成
在构建需要测试Webhook的OpenClaw技能时:
javascript
// 在您的技能脚本中
import { exec } from child_process;
import { promisify } from util;
const execAsync = promisify(exec);
// 创建容器
const { stdout } = await execAsync(hookcatch bin create --format json);
const { binId, url } = JSON.parse(stdout);
// 在集成中使用Webhook URL
console.log(Webhook URL: ${url});
// 稍后,获取请求
const { stdout: requests } = await execAsync(
hookcatch bin requests ${binId} --format json
);
const captured = JSON.parse(requests);
// 处理捕获的Webhooks
for (const req of captured) {
console.log(${req.method} ${req.path}: ${JSON.stringify(req.body)});
}
环境变量
- - HOOKCATCHAPIKEY - 用于身份验证的API令牌(推荐用于自动化)
- HOOKCATCHAPIURL - 覆盖API URL(默认:https://api.hookcatch.dev)
对OpenClaw用户的优势
- - 无需再设置ngrok:使用HookCatch隧道进行快速本地测试
- Webhook检查:准确查看Stripe/Twilio等发送的内容
- 自动化友好:JSON输出便于在技能中解析
- 私有容器:通过密码保护确保测试数据安全
- 快速简单:一条命令即可创建容器或隧道
获取帮助
- - 文档:https://docs.hookcatch.dev
- Discord:加入OpenClaw Discord中的#hookcatch频道
- GitHub:https://github.com/hookcatch/cli
- 邮箱:support@hookcatch.dev
提示
- 1. 为技能使用API令牌:生成一次令牌并在HOOKCATCHAPIKEY中使用
- 自动化使用JSON格式:在脚本中解析时始终使用--format json
- 敏感数据使用私有容器:生产环境Webhook测试使用--private
- 测试后清理:使用hookcatch bin delete删除容器以保持在限制范围内
由HookCatch团队为OpenClaw构建 🪝