Changelog#
v0.1.0#
Mock HTTP server: define endpoints as YAML files, watch the directory, hot-reload live, and log every request as a JSON line. Ships with a full-screen TUI dashboard.
Highlights#
- Colorized request detail —
enterexpansion andiinspector show cyan labels/keys, yellow request bodies, green response bodies, and JSON syntax highlighting. - Response in the
enterexpansion — expanding a feed row shows the full response alongside the request: status-tintedRESPONSEheader, response headers, and a multi-line response body. Unmatched requests showRESPONSE 404. - Request/response visual separation — a muted
─separator plus full-width background bands (REQUEST dark gray236, RESPONSE dark navy17) make the two sides instantly distinguishable; response keys are magenta, request keys cyan. --versionflag — print the version and exit. Release builds carryv0.1.0via ldflags; dev builds reportdev.- TUI dashboard — live counts, latency stats (incl. approximate p95), filterable recent-request feed (
ep:/method:/status:prefixes), per-endpoint stats, request/response inspector, pause/resume, g/G scroll jumps. - Mock engine — YAML stubs with method/path/query/header/payload matching,
echo/templatemodes, configurable delay, weighted response variants (round-robin on equal weight), hot-reload via fsnotify. - Logging — every request (matched and unmatched) logged as a JSON line;
--max-log-bodycaps stored body size.
CLI#
simuhook [flags]
--addr :8080 listen address (env PORT)
--stubs ../stubs stubs directory (env STUBS_DIR)
--log-dir logs log directory (env LOG_DIR)
--tui auto|on|off dashboard mode: auto = TUI on a TTY, line output otherwise
--recent N recent-log ring buffer size (default 50)
--max-log-body N cap stored body size for logs/dashboard (0 = unlimited; env LOG_MAX_BODY)
--help, --version usage / versionFeatures In Depth#
- Matching — method, exact path, glob path, regex path, query, headers, exact payload, and partial-JSON payload matching. Most-specific match wins deterministically.
- Response templates — variables,
Header/Query/RandomInt/RandomHexfunctions, 27 faker data generators, and JSONPath request-body extraction. - Dashboard — live dashboard with counts, latency stats (avg/min/max/p95), filterable feed, and per-request expansion and inspector views.
- Logging — JSON Lines, per-endpoint files, unmatched request capture.
Binary Assets#
simuhook-darwin-arm64(Apple Silicon)simuhook-darwin-amd64(Intel Mac)simuhook-linux-arm64simuhook-linux-amd64
See Installation for download and setup.