Visualize HTTP request timing in your terminal.
TypeScript | Zero dependencies | CLI + API
- Beautiful terminal timing breakdown (DNS, TCP, TLS, Server, Transfer)
- Color-coded bar chart visualization
- JSON output for scripting (
--json) - Show response headers (
-I) and body (-b) - Custom HTTP methods, headers, and request body
- Automatic HTTPS upgrade
- Follow redirects (configurable)
- Programmatic API for Node.js
- Zero runtime dependencies
npm install && npm run build
node dist/cli.js https://example.com HTTP/GET https://example.com
200 OK | 93.184.216.34 | 1.2KB body
┌─ Timing Breakdown ─────────────────────────────────┐
│
│ DNS Lookup 15ms ██
│ TCP Connection 25ms ███
│ TLS Handshake 45ms █████
│ Server Processing 80ms █████████
│ Content Transfer 10ms █
│
│ Total 175ms
└────────────────────────────────────────────────────┘
# Basic timing
httpstat https://example.com
# POST with JSON body
httpstat -X POST -H "Content-Type: application/json" -d '{"key":"val"}' https://api.example.com
# Show headers
httpstat -I https://example.com
# JSON output (pipe to jq)
httpstat --json https://example.com | jq .timing
# Show response body
httpstat -b https://example.com| Flag | Description |
|---|---|
-X, --method <M> |
HTTP method (default: GET) |
-H, --header <H> |
Add request header |
-d, --data <body> |
Request body |
-I, --headers |
Show response headers |
-b, --body |
Show response body |
--json |
Output as JSON |
-h, --help |
Show help |
import { makeRequest, formatTimingDisplay } from 'httpstat-cli';
const result = await makeRequest('https://example.com');
console.log(formatTimingDisplay(result));
console.log(`Total: ${result.timing.total}ms`);MIT