[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108392":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":14,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":10,"pushedAt":29,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},108392,"equal","Balanov\u002Fequal","Balanov","Turn real API traffic into a local sandbox and OpenAPI. Tiny static Go binary, any HTTP SDK, offline development, MIT.","https:\u002F\u002Fbalanov.pro\u002Fequal\u002F",null,"Go",28,3,1,0,19,44.21,"MIT License",false,"main",[22,23,24,25,26,27,28],"api","contract-testing","differential-testing","go","local-first","mit","record-replay","2026-11-15 01:00:39","2026-11-20 02:41:43","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo.svg\" alt=\"EQUAL logo\" width=\"112\">\n  \u003Ch1>EQUAL\u003C\u002Fh1>\n  \u003Cp>\u003Cstrong>Turn real API traffic into a local sandbox and OpenAPI.\u003C\u002Fstrong>\u003C\u002Fp>\n  \u003Cp>One 7.4 MB static binary. Any HTTP SDK. No runtime or account.\u003Cbr>Linux · macOS · Windows · amd64 + arm64 · MIT\u003C\u002Fp>\n  \u003Cp>\u003Ca href=\"https:\u002F\u002Fbalanov.pro\u002Fequal\u002F\">Landing page: balanov.pro\u002Fequal\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fdiv>\n\nEQUAL lets you keep building when an API is unavailable, rate-limited, paid per call, or unsafe to trigger from CI.\n\nPoint your application at the local recorder and run its normal workflow once. EQUAL turns the observed requests and responses into three useful artifacts:\n\n1. **A local API server** that returns the recorded responses without contacting the provider.\n2. **A portable JSONL cassette** that you can review, edit, share, and version in Git.\n3. **An OpenAPI 3.1 document** for Postman, Prism, documentation tools, and SDK generators.\n\nYour application only needs a configurable HTTP base URL. There is no language plugin, control plane, database, account, telemetry, or connector catalogue.\n\n## What this is useful for\n\n- **Offline development.** Keep working on a plane, in a restricted network, or while the provider is down.\n- **Deterministic CI.** Stop depending on sandbox availability, rate limits, and changing third-party data.\n- **Fewer live credentials.** Record with a test credential, then run the local sandbox without the real secret.\n- **One fixture across stacks.** Share the same cassette between Python, Node, Go, mobile, and CI jobs instead of maintaining a recorder per language.\n- **API documentation from reality.** Export the observed endpoints and examples instead of writing the first OpenAPI draft by hand.\n- **Replacements and migrations.** Optionally replay recorded requests against another implementation and inspect field-level differences.\n\nEQUAL is a development and testing tool, not a production proxy. It proves only the traffic it recorded.\n\n## Install\n\n### Unix\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FBalanov\u002Fequal\u002Fmain\u002Finstall.sh | sh\nequal --version\n```\n\nSet `EQUAL_VERSION=0.2.0` to pin a version and `EQUAL_INSTALL_DIR` to change `$HOME\u002F.local\u002Fbin`.\n\n### Windows PowerShell\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002FBalanov\u002Fequal\u002Fmain\u002Finstall.ps1 | iex\nequal --version\n```\n\nSet `$env:EQUAL_VERSION = \"0.2.0\"` to pin a version and `$env:EQUAL_INSTALL_DIR` to change the install directory.\n\n### Go\n\nWith Go 1.26+:\n\n```sh\ngo install github.com\u002FBalanov\u002Fequal\u002Fcmd\u002Fequal@latest\n```\n\nOr build a checkout:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FBalanov\u002Fequal.git\ncd equal\ngo build -trimpath -ldflags=\"-s -w\" -o bin\u002Fequal .\u002Fcmd\u002Fequal\n```\n\nOn Windows, use `bin\u002Fequal.exe`. Every release includes SHA-256 checksums. The binaries are not code-signed yet.\n\n## Start in 90 seconds\n\n### 1. Record your application's real traffic\n\n```sh\nequal record \\\n  --target https:\u002F\u002Fapi.example.com \\\n  --cassette account.jsonl\n```\n\nThe recorder listens on `127.0.0.1:8080`. Set your application's existing API base URL to `http:\u002F\u002F127.0.0.1:8080` and use it normally. For example:\n\n```sh\ncurl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Faccount \\\n  -H \"Authorization: Bearer $TEST_TOKEN\"\n```\n\nStop the recorder with Ctrl+C and **review the cassette for sensitive data**:\n\n```sh\nequal inspect --cassette account.jsonl\n```\n\n### 2. Run the local copy without the provider\n\n```sh\nequal replay --cassette account.jsonl\n```\n\nRun 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.\n\n### 3. Export OpenAPI\n\n```sh\nequal export \\\n  --cassette account.jsonl \\\n  --out openapi.json \\\n  --title 'Account API'\n```\n\nImport `openapi.json` into your existing API tools. See the complete synthetic [cassette](examples\u002Fcassette.jsonl) and its [generated OpenAPI document](examples\u002Fopenapi.json). The generated example was independently validated against the OpenAPI 3.1 schema.\n\n## Compare another implementation\n\nThis is an additional workflow for clean-room replacements, migrations, and rewrites:\n\n```sh\nequal verify \\\n  --target http:\u002F\u002F127.0.0.1:9000 \\\n  --cassette account.jsonl \\\n  --ignore-json '\u002Frequest_id' \\\n  --ignore-json '\u002Fusers\u002F*\u002Fcreated_at' \\\n  --header 'Authorization: Bearer candidate-test-token' \\\n  --json compatibility-report.json\n```\n\nEQUAL sends the recorded requests to the candidate and compares status, `Content-Type`, `Location`, semantic JSON, and binary bodies. Exit code 0 means every observed interaction matched under your rules; exit code 3 identifies incompatibility. Use disposable test tenants because verification can trigger real side effects.\n\n## Commands\n\n### `record`\n\n```text\nequal record --target URL --cassette FILE [options]\n```\n\n| Flag | Default | Meaning |\n| --- | --- | --- |\n| `--listen ADDR` | `127.0.0.1:8080` | Local reverse-proxy listener |\n| `--redact NAME` | built-in list | Additional header, query, or JSON field name; repeatable |\n| `--no-redact` | false | Disable built-in redaction for controlled local fixtures |\n| `--overwrite` | false | Replace an existing cassette |\n| `--fsync` | false | fsync every recorded interaction |\n| `--max-body BYTES` | `16777216` | Per-message body limit |\n| `--timeout DURATION` | `30s` | Upstream request timeout |\n\nThe live caller receives the original response; only the stored copy is redacted. Existing cassettes require explicit `--overwrite`.\n\n### `replay`\n\n```text\nequal replay --cassette FILE [--strict] [--match-header NAME]\n```\n\nMatching uses method, escaped path, canonical query parameters, and the request body. JSON object key order and whitespace are normalized; array order remains significant. Repeated identical requests consume responses in capture order. `--strict` enforces the global interaction sequence.\n\nReplay has no upstream option and no live passthrough mode.\n\n### `export`\n\n```text\nequal export --cassette FILE [--out openapi.json] [--title NAME] [--api-version VERSION]\n```\n\nWithout `--out`, the OpenAPI JSON is written to stdout. Output files are created without overwriting an existing file.\n\nThe document includes observed paths, methods, query parameters, JSON request bodies, response statuses, schemas, examples, binary content encodings, and interaction IDs. Numeric and UUID path segments become documented inferred parameters. Alternative responses are retained in a provenance extension.\n\nThis 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.\n\n### `verify`\n\n```text\nequal verify --target URL --cassette FILE [options]\n```\n\n| Flag | Meaning |\n| --- | --- |\n| `--ignore-json POINTER` | Ignore a response JSON Pointer; `*` matches one segment; repeatable |\n| `--compare-header NAME` | Replace the default compared response headers; repeatable |\n| `--header 'Name: value'` | Inject candidate credentials or request headers; repeatable |\n| `--json FILE` | Write a machine-readable report |\n| `--max-body BYTES` | Per-message body limit |\n| `--timeout DURATION` | Candidate request timeout |\n\n### `inspect`\n\n```text\nequal inspect --cassette FILE [--json]\n```\n\nPrint capture provenance, interaction count, redaction settings, methods, URIs, and statuses without network access.\n\n## Cassette format\n\nThe first line is an `equal\u002Fv1` header. Every following line is one interaction:\n\n```jsonl\n{\"format\":\"equal\u002Fv1\",\"created_at\":\"2026-11-04T12:00:00Z\",\"target\":\"https:\u002F\u002Fapi.example.com\",\"redactions\":[\"authorization\",\"password\"]}\n{\"id\":1,\"request\":{\"method\":\"GET\",\"uri\":\"\u002Fv1\u002Faccount\",\"headers\":{\"Authorization\":[\"[REDACTED]\"]}},\"response\":{\"status\":200,\"headers\":{\"Content-Type\":[\"application\u002Fjson\"]},\"body\":\"{\\\"plan\\\":\\\"free\\\"}\",\"body_encoding\":\"utf8\"}}\n```\n\nUTF-8 remains readable; non-UTF-8 payloads use base64. See [architecture and invariants](docs\u002FARCHITECTURE.md) and [SECURITY.md](SECURITY.md). Built-in redaction is a safeguard, not a privacy guarantee: inspect every cassette before sharing it.\n\n## Measured locally\n\nWindows 11 AMD64, Go 1.27.3, EQUAL 0.2.0 and Hoverfly 1.12.17:\n\n| Observation | EQUAL | Hoverfly | Scenario |\n| --- | ---: | ---: | --- |\n| Median process launch | **9.050 ms** | 39.984 ms | 100 version launches, warm cache |\n| Executable | **7,776,768 bytes** | 22,234,112 bytes | Complete standalone binaries |\n| Median replay batch | **269.472 ms** | 551.879 ms | 2,000 unique GETs, 16 keep-alive clients |\n| Median requests\u002Fs | **7,422** | 3,624 | Same replay scenario |\n| Median working set | **14.57 MiB** | 31.98 MiB | 2,000 loaded interactions |\n\nThe replay ratio is 2.05× in this exact scenario, not a universal performance ranking. Hoverfly provides a broader simulation and matching feature set. Startup\u002Fimport was excluded; fresh server state was used for every batch. Raw samples and reproduction commands are in [BENCHMARKS.md](BENCHMARKS.md) and [bench\u002F](bench\u002FREADME.md).\n\n## End-to-end proof\n\n```sh\ngo build -o bin\u002Fequal.exe .\u002Fcmd\u002Fequal\npython bench\u002Fproof.py .\u002Fbin\u002Fequal.exe\n```\n\nThe proof drives the real executable through record → OpenAPI export → upstream shutdown → offline replay → compatible verification → intentional incompatibility. The recorded Windows run passed **22 checks**, including OpenAPI generation, secret redaction, binary fidelity, fail-closed misses, reports, and exit code 3 on drift. It uses synthetic loopback services and needs no credentials or third-party Python packages.\n\n## Develop\n\n```sh\ngofmt -w cmd internal\ngo test -count=1 .\u002F...\ngo test -race -count=1 .\u002F...\ngo vet .\u002F...\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) and [docs\u002FRESEARCH.md](docs\u002FRESEARCH.md). Portable cassette tooling, public-SDK fixtures, precise bug reports, and performance reproductions are welcome.\n\nThe bilingual landing source lives in `site\u002F`:\n\n```sh\npython bench\u002Frender_site.py\ncd site\nnpm install\nnpm run dev\nnpm run build\n```\n\nThe production site is static output in `site\u002Fdist\u002F`; asset URLs work under `\u002Fequal\u002F`.\n\n## Citation\n\n```bibtex\n@misc{balanov2026equal,\n  title        = {EQUAL: Turn Real API Traffic into a Local Sandbox and OpenAPI},\n  author       = {Balanov, Anton},\n  year         = {2026},\n  howpublished = {\\url{https:\u002F\u002Fgithub.com\u002FBalanov\u002Fequal}},\n  url          = {https:\u002F\u002Fbalanov.pro\u002Fequal\u002F}\n}\n```\n\n## License\n\nMIT. Fork it, modify it, ship it. See [LICENSE](LICENSE).\n","EQUAL 是一个轻量级 API 流量录制与回放工具，可将真实 HTTP 请求\u002F响应转化为本地可运行的沙箱服务、结构化 JSONL 录音带（cassette）和标准 OpenAPI 3.1 文档。它以单个静态 Go 二进制（7.4 MB）分发，无需运行时依赖、账户或网络连接，支持跨平台及多语言 SDK 无缝集成。核心能力包括离线 API 模拟、CI 环境确定性测试、敏感凭证隔离、多语言共享 fixture，以及基于真实流量自动生成 API 规范。适用于开发联调中断、受限网络环境、持续集成稳定性保障及 API 迁移验证等场景。",2,"2026-11-24 04:34:02","CREATED_QUERY"]