Tapeline records HTTP exchanges through a local reverse proxy and replays them from a YAML cassette. Inspect the request waterfall in a terminal or browser, or compare two recordings for status, JSON schema, and latency changes.
Build with Go 1.27.4 or later from the repository root.
CGO_ENABLED=0 go build -ldflags="-s -w" -o tapeline .
./tapeline --helpStart a test upstream in another terminal. This example requires Python 3.
upstream_dir=$(mktemp -d)
printf '{"ok":true}\n' > "$upstream_dir/status.json"
python3 -m http.server 3000 --bind 127.0.0.1 --directory "$upstream_dir"Start the recorder in the checkout.
./tapeline record --target http://127.0.0.1:3000 --port 8080 --out api.yamlSend a request from a separate terminal.
curl http://127.0.0.1:8080/status.jsonPress Ctrl+C in the recorder terminal to write the cassette. Stop the test upstream to check offline replay. Request the same URL again while replay is running.
./tapeline inspect api.yaml
./tapeline replay --cassette api.yaml --port 8080Run ./tapeline ui api.yaml --port 8788 and open
127.0.0.1:8788 for the waterfall and formatted
request and response bodies. Pass --compare next.yaml to compare recordings.
proxy.goforwards requests and streams responses as they arrive. It buffers bodies for each complete exchange, including binary bodies.cassette.goreads and writes YAML with sorted header keys. By default it redacts Authorization, Cookie, Set-Cookie, and X-Api-Key headers case-insensitively.--no-redactkeeps those values. Request and response bodies are stored verbatim.replay.goindexes exchanges by method, escaped path, and query. Replay treats different parameter names as unordered and preserves the value order for repeated names. A route with multiple recordings cycles through its responses in recording order. Matches setX-Tapeline-Replay: hit. Misses return 404 JSON andX-Tapeline-Replay: miss.- The CLI inspector and embedded web UI read the same cassette format.
Both comparison surfaces use the status, schema, and latency diff in
diff.go.
Use ./tapeline diff api.yaml next.yaml --json for machine-readable output.
Add --fail-on-drift to fail on breaking status or schema changes.
go test -race ./...
go test -run '^$' -bench '^BenchmarkReplay$' -benchmemOn an Apple M5 with Go 1.27.4 (darwin/arm64), matching a recorded route
and writing its 1,024-byte body took 523.0 ns/op, 2,080 B/op, and
16 allocs/op over 2,250,187 iterations. The benchmark calls the replay
handler with an in-memory HTTP recorder and includes query normalization.
Download binaries and checksums for macOS arm64 and Linux x86_64 or arm64 from the releases page. Licensed under MIT or Apache-2.0.