Fast CLI to hit API endpoints and format responses.
api-ping hits your endpoint and prints syntax-highlighted JSON with timing and status badges. Zero config.
Run instantly via npx — no install needed:
npx @dinakars777/api-ping https://jsonplaceholder.typicode.com/todos/1| Flag | Description | Example |
|---|---|---|
-X <method> |
HTTP method (default: GET) | -X POST |
-d <body> |
Request body (JSON string) | -d '{"name":"test"}' |
-H <header> |
Custom header | -H "Authorization: Bearer token" |
npx @dinakars777/api-ping https://api.example.com/data -X POST -d '{"name":"api-ping"}'npx @dinakars777/api-ping https://api.example.com/protected -H "Authorization: Bearer my-token"- 🚀 Native Node.js fetch
- 🎨 JSON syntax highlighting via
picocolors - ⏱️ Request timing (e.g.
24ms) - 🚥 Color-coded HTTP status (green 2xx, yellow 3xx, red 4xx/5xx)
| Tool | Purpose |
|---|---|
| TypeScript | Source language |
tsup |
Build & bundle |
commander |
CLI argument parsing |
picocolors |
Terminal color output |
@clack/prompts |
Interactive prompts |
MIT