
Capture, inspect, and replay HTTP requests. Point your webhooks or API calls at snago, and it saves every incoming request to disk. Replay them later against any target — original or different — with headers, body, and query strings fully preserved.
Single binary, zero runtime dependencies.
Use cases
- Webhook development — Capture GitHub/Stripe/Slack webhooks locally, inspect payloads, and replay them while iterating on your handler.
- API debugging — Record requests from a client, inspect what was actually sent, and replay to reproduce issues.
- Request archiving — Persist incoming traffic for later analysis without modifying your application.
Install
go install github.com/nikooo777/snago@latest
Or build from source:
git clone https://github.com/nikooo777/snago.git
cd snago
make build
Quick start
# 1. Start capturing on port 8080
snago serve
# 2. Send a request (from another terminal)
curl -X POST -H "Content-Type: application/json" \
-d '{"event":"push"}' http://localhost:7624/webhooks/github
# 3. Inspect the captured request
snago inspect captures/<file>.gob
# 4. Replay it to your real server
snago replay --target http://localhost:9090 captures/<file>.gob
Commands
snago serve
Start an HTTP server that captures every incoming request to a .gob file. All requests receive a 200 OK response with body ok — it acts as a universal sink.
snago serve [--addr :7624] [--dir ./captures] [--verbose]
| Flag |
Default |
Description |
--addr |
:7624 |
Listen address |
--dir |
./captures |
Output directory for captured .gob files |
--verbose |
false |
Print full request details (headers + body) for each capture |
Example output:
$ snago serve
INFO snago listening addr=:7624 dir=./captures
INFO request captured method=POST path=/webhooks/github headers=5 body=66b file=1771366415797329694_38aab851.gob
INFO request captured method=GET path=/api/health headers=2 body=0b file=1771366415801479108_bd746ac6.gob
The server shuts down gracefully on Ctrl+C. If running behind a reverse proxy, it reads X-Forwarded-Proto to detect the original scheme (http/https).
snago inspect
Pretty-print a captured request — method, URL, timestamp, headers, and body.
snago inspect <file.gob>
$ snago inspect captures/1771366415797329694_38aab851.gob
POST https://example.com/webhooks/github
Captured: 2026-02-17 23:15:56
Content-Type: application/json
X-GitHub-Event: push
{"ref":"refs/heads/main","commits":[{"message":"initial commit"}]}
snago replay
Re-send a captured request. By default, replays to the original host. Use --target to redirect it.
snago replay [--target URL] <file.gob>
| Flag |
Default |
Description |
--target |
(original host) |
Override destination URL (scheme://host) |
# Replay to original destination
snago replay captures/1771366415797329694_38aab851.gob
# Replay to a different host (path and query string are preserved)
snago replay --target http://localhost:9090 captures/1771366415797329694_38aab851.gob
Hop-by-hop headers (Connection, Transfer-Encoding, Content-Length) are automatically stripped before sending.
snago version
snago version
# or
snago --version
Environment variables
All flags can be set via environment variables (flags take precedence when both are set):
| Variable |
Flag equivalent |
Default |
SNAGO_SERVE_ADDR |
--addr |
:7624 |
SNAGO_SERVE_DIR |
--dir |
./captures |
SNAGO_SERVE_VERBOSE |
--verbose |
false |
SNAGO_REPLAY_TARGET |
--target |
(empty) |
Shell completion
Snago supports shell completion via Cobra:
# Bash
snago completion bash > /etc/bash_completion.d/snago
# Zsh
snago completion zsh > "${fpath[1]}/_snago"
# Fish
snago completion fish > ~/.config/fish/completions/snago.fish
License
MIT