Skip to content

Justhiro55/httpcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpcat

Crates.io Downloads CI License Rust

A CLI HTTP client that shows cat images based on status codes 🐱

Send HTTP requests and get adorable cat images from http.cat displayed right in your terminal based on the response status code.

httpcat demo

Installation

Using Cargo

cargo install httpcat

From source

git clone https://github.com/Justhiro55/httpcat
cd httpcat
cargo install --path .

Usage

$ httpcat https://example.com

🌐 Requesting: https://example.com

⏳ Loading...

✅ 200 OK

🐱 Here's your cat:

[cat image displayed in terminal]

⏱️  Response time: 234ms
$ httpcat https://example.com/notfound

🌐 Requesting: https://example.com/notfound

⏳ Loading...

❌ 404 Not Found

🐱 Here's your cat:

[404 cat image]

⏱️  Response time: 156ms

Options

httpcat [OPTIONS] <URL>
  • -X, --method <METHOD> - HTTP method to use (default: GET)
  • --size <N> - Image width in terminal characters (default: 60)
  • --ascii - Display image as ASCII art
  • --no-image - Don't display cat image
  • --headers - Show response headers
  • --body - Show response body
  • -H, --header <HEADER> - Add request header (can be used multiple times)
  • -h, --help - Print help
  • -V, --version - Print version

Examples

POST request:

httpcat -X POST https://api.example.com/data

With custom headers:

httpcat -H "Authorization: Bearer token123" https://api.example.com

Show response details:

httpcat --headers --body https://example.com

ASCII art mode:

httpcat --ascii https://example.com

Status check only:

httpcat --no-image https://example.com

Terminal Compatibility

Image display has been tested on terminals like iTerm and Kitty, but has not been fully verified on other terminals. Image quality may vary depending on your terminal, and in some cases, using the --ascii option for ASCII art display may be recommended.

License

Licensed under either of MIT or Apache-2.0 at your option. See LICENSE for details.

Credits

Cat images are provided by https://http.cat.

About

HTTP client that shows cat images based on status codes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages