正在自动登录…
Balanov/ equal
EQUAL 是一个开发测试工具,将真实 API 流量记录为本地沙箱和 OpenAPI 文档,支持离线开发、确定性 CI 和 API 文档生成。适用于需要在不稳定或受限网络环境下开发、测试或迁移 API 的开发者。
AI 中文解读 · 根据仓库描述与 README 生成 · 2026/11/5 04:26:59 · 查看原文
- 累计 Stars
- 109
- 当前热度
- 1 天内 · 小火
- 仓库创建时间
选用指南
AI 根据 README 整理 · 2026/11/5 04:26:59
- 使用方式
通过命令行使用,提供 record、replay、export、verify、inspect 等子命令。
查看 README 依据
On Windows, use `bin/equal.exe`. Every release includes SHA-256 checksums. The binaries are not code-signed yet. ## Start in 90 seconds ### 1. Record your application's real traffic ```sh equal record \ --target https://api.example.com \ --cassette account.jsonl ``` The recorder listens on `127.0.0.1:8080`. Set your application's existing API base URL to `http://127.0.0.1:8080` and use it normally. For example: ```sh curl http://127.0.0.1:8080/v1/account \ -H "Authorization: Bearer $TEST_TOKEN" ``` Stop the recorder with Ctrl+C and **review the cassette for sensitive data**:
```sh equal inspect --cassette account.jsonl ``` ### 2. Run the local copy without the provider ```sh equal replay --cassette account.jsonl ``` Run the same application against the same local base URL. The recorded responses come back without contacting the original provider. An unrecorded request returns an explicit 404 instead of silently reaching the network. ### 3. Export OpenAPI ```sh equal export \ --cassette account.jsonl \ --out openapi.json \ --title 'Account API' ```
Import `openapi.json` into your existing API tools. See the complete synthetic [cassette](examples/cassette.jsonl) and its [generated OpenAPI document](examples/openapi.json). The generated example was independently validated against the OpenAPI 3.1 schema. ## Compare another implementation This is an additional workflow for clean-room replacements, migrations, and rewrites: ```sh equal verify \ --target http://127.0.0.1:9000 \ --cassette account.jsonl \ --ignore-json '/request_id' \ --ignore-json '/users/*/created_at' \ --header 'Authorization: Bearer candidate-test-token' \
- 部署要求
需要 Go 1.26+ 才能通过 go install 安装,或使用预编译二进制。
查看 README 依据
Set `EQUAL_VERSION=0.2.0` to pin a version and `EQUAL_INSTALL_DIR` to change `$HOME/.local/bin`. ### Windows PowerShell ```powershell irm https://raw.githubusercontent.com/Balanov/equal/main/install.ps1 | iex equal --version ``` Set `$env:EQUAL_VERSION = "0.2.0"` to pin a version and `$env:EQUAL_INSTALL_DIR` to change the install directory. ### Go With Go 1.26+: ```sh go install github.com/Balanov/equal/cmd/equal@latest ``` Or build a checkout: ```sh git clone https://github.com/Balanov/equal.git cd equal go build -trimpath -ldflags="-s -w" -o bin/equal ./cmd/equal ```
- 已知限制
EQUAL 是开发测试工具,不是生产代理,只证明录制的流量。生成的 OpenAPI 是示例驱动的非完整规范,未观察到的端点和字段缺失。
查看 README 依据
- **API documentation from reality.** Export the observed endpoints and examples instead of writing the first OpenAPI draft by hand. - **Replacements and migrations.** Optionally replay recorded requests against another implementation and inspect field-level differences. EQUAL is a development and testing tool, not a production proxy. It proves only the traffic it recorded. ## Install ### Unix ```sh curl -fsSL https://raw.githubusercontent.com/Balanov/equal/main/install.sh | sh equal --version ```
This is an **example-driven, incomplete specification**, not the provider's authoritative schema. Unobserved endpoints and fields are absent. JSON array item schemas currently follow the first observed item; non-JSON request bodies are not described. Redacted examples remain redacted. ### `verify` ```text equal verify --target URL --cassette FILE [options] ``` | Flag | Meaning | | --- | --- | | `--ignore-json POINTER` | Ignore a response JSON Pointer; `*` matches one segment; repeatable | | `--compare-header NAME` | Replace the default compared response headers; repeatable |
README
正在加载 README…
收录信息
- 仓库创建时间
- 2026/11/5 01:43:22
- 首次达标收录
- 2026/11/5 04:22:32
- 统计更新时间
- 2026/11/5 05:22:34
按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。
模型评估
值得看加权总分 4.3 / 5
由 Jev 模型根据仓库描述与 README 评估,2026/11/5 04:22:32 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。
仓库信息
- 最近推送
- 2026/11/5 03:25:45
- 许可证标识
- MIT
- Fork 数
- 0
- 当前状态
- 未归档
收录记录
按创建时长与累计 Stars 首次收录:小火
首次发现项目