Api Integration
指导前端与后端API集成的类型、错误、鉴权及实时通信设计规范。
通过命令行控制HTTPeep代理,实现网络请求捕获与调试。
openclaw skills install @imchrischen/httpeep-cli命令、参数、文件名以原文为准
使用 httpeep-cli 通过终端操作 HTTPeep,适用于本地调试、自动化任务、CI 检查以及代理工作流。当 Codex 需要解析或总结命令输出时,请优先使用 --format json。
有关详细参数、示例及命令特定说明,请阅读 references/cli-reference.md。
httpeep-cli --version
httpeep-cli --format json proxy status
httpeep-cli proxy logs --lines 50httpeep-cli proxy start --port 8800
httpeep-cli proxy system status
httpeep-cli cert status仅在用户需要系统级代理时使用 proxy system on。对于限定范围的交互式终端捕获,建议使用 httpeep-cli shell 或 hp shell;该命令会启动或复用代理,并进入一个子 Shell,其中已加载 HTTPeep 代理变量和运行时钩子。对于非交互式代理执行,应优先使用显式的应用代理环境变量,或采用 proxy start --capture-pid <pid> 方式,以避免代理阻塞在交互式 Shell 中。
httpeep-cli --format json sessions list --keyword login
httpeep-cli --format json sessions watch --domain api.example.com在执行破坏性清理操作前,请先使用过滤器筛选。尽可能先进行预演删除:
httpeep-cli sessions delete --keyword login --dry-run
httpeep-cli sessions clear --all --yes --dry-runhttpeep-cli rules run \
--map-remote "api.example.com=http://127.0.0.1:3000" \
-- httpeep-cli request --method GET --url "https://api.example.com/users"仅在需要持久化规则时才使用 rules upsert、rules import、rules replace 或 rules reset。在执行破坏性变更前,务必先导出现有规则:
httpeep-cli rules export --output rules-backup.jsonhttpeep-cli --format json request --method GET --url "https://api.example.com/v2/users"
httpeep-cli replay --id <session_id> --retry-times 3 --retry-interval-ms 800
httpeep-cli record start
httpeep-cli record stop --output baseline.httpeep
httpeep-cli replay file baseline.httpeep按以下顺序检查失败原因:
httpeep-cli --versionhttpeep-cli --format json proxy statushttpeep-cli proxy logs --lines 100HTTP_PROXY、HTTPS_PROXY 或 httpeep-cli proxy system statushttpeep-cli cert status,如需则执行 httpeep-cli cert installhttpeep-cli shell / hp shell 会创建 ~/.httpeep/automatic-setup/ 目录,并在子 Shell 中暴露 httpeep_intercept_off 变量--format json;注意 sessions watch --format json 输出为 NDJSON 格式若 httpeep-cli 不在 PATH 中,请指导用户打开 HTTPeep 桌面设置,通过“设置 -> MCP -> 修复 CLI / PATH 安装”进行修复,或在可用时调用 MCP 修复工具。
在复杂调试或多步骤捕获/重放任务中,应在最终答案或任务备注中记录简洁的追踪日志:
sessions list、request、rules run 或 replay 的相关 JSON 字段httpeep-cli proxy logs --lines <n> 的摘要避免记录来自请求头、Cookie、Authorization 值或请求体中的敏感信息。报告前请对敏感值进行脱敏处理。
rules run、request 或 replay --id 等临时规则。--format json。httpeep-cli shell;该命令会主动接管终端,直到子 Shell 退出。rules replace 或 rules reset 前,务必先导出规则。cert install、cert uninstall、proxy system on 或 proxy system off。rules replace、rules reset 或 sessions clear --all --yes。在可能的情况下,应先展示或执行备份/预演命令。import curl、import har 和 import http 视为版本相关功能,因为部分 CLI 构建版本可能尚未实现这些命令。已收录 1 个 Skill