API Pulse is a zero-dependency command-line health checker for small services, demos, and CI environments. Define the endpoint contract once, then get a readable availability and latency report with a useful exit code.
Create pulse.config.json:
{
"endpoints": [
{
"name": "Public API",
"url": "https://api.example.com/health",
"expectedStatus": 200,
"timeoutMs": 5000,
"maxLatencyMs": 800
}
]
}expectedStatus accepts one code or an array. Without it, any response from 200 through 399 is accepted.
npm link
api-pulse
api-pulse --config examples/pulse.config.json
api-pulse --json --output report.json
api-pulse --strict-latencyAn unreachable endpoint or unexpected HTTP status returns exit code 1. Degraded latency is informational unless --strict-latency is enabled. Invalid configuration returns 2.
- Multiple checks run concurrently while output retains configuration order.
- Per-endpoint timeout, latency target, method, and accepted statuses are explicit.
- Reports never include response bodies, tokens, or headers.
- JSON output can feed CI artifacts or a lightweight status dashboard.
- Runtime code uses only APIs included with Node.js 20 and newer.
npm test
npm run checkThe test suite injects fake network responses and does not rely on public endpoint availability.