Skip to content

dinakars777/api-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-ping ⚡️

Fast CLI to hit API endpoints and format responses.

npm version npm downloads MIT License Node.js

api-ping hits your endpoint and prints syntax-highlighted JSON with timing and status badges. Zero config.


Usage

Run instantly via npx — no install needed:

npx @dinakars777/api-ping https://jsonplaceholder.typicode.com/todos/1

Options

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"

POST request with body

npx @dinakars777/api-ping https://api.example.com/data -X POST -d '{"name":"api-ping"}'

Custom headers

npx @dinakars777/api-ping https://api.example.com/protected -H "Authorization: Bearer my-token"

Features

  • 🚀 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)

Tech Stack

Tool Purpose
TypeScript Source language
tsup Build & bundle
commander CLI argument parsing
picocolors Terminal color output
@clack/prompts Interactive prompts

License

MIT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors