A PHP CLI tool for looking up HTTP status codes. Get instant access to status names, descriptions, RFC references, categories, and common causes — right from your terminal.
- Quick lookup:
http-status 404shows full details for any status code - List all codes:
http-status --listdisplays every code grouped by class (1xx–5xx) - Filter by class:
http-status --class 4xxshows only client error codes - Fuzzy search:
http-status --search "timeout"finds codes by keyword - JSON output:
http-status --json 200for scripting and piping
- PHP 8.2+
- No Composer dependencies required at runtime
git clone https://github.com/sen-ltd/http-status.git
cd http-status
chmod +x bin/http-statusAdd to your PATH or create an alias:
alias http-status='/path/to/http-status/bin/http-status'http-status 404404 Not Found
Category: 4xx Client Error
RFC: RFC 9110 §15.5.5
Description:
The server cannot find the requested resource. The URI is not
recognized.
Common Causes:
• Typo in URL
• Deleted resource
• Wrong API endpoint
• Missing route
http-status --listhttp-status --class 5xxhttp-status --search "authentication"http-status --json 200
http-status --json --list
http-status --json --search "redirect"docker build -t http-status .
docker run --rm http-status 404
docker run --rm http-status --listcomposer install
composer testThe tool includes data for 60+ HTTP status codes covering:
- 1xx Informational (100–103)
- 2xx Success (200–226)
- 3xx Redirection (300–308)
- 4xx Client Error (400–451)
- 5xx Server Error (500–511)
Each code includes the official RFC reference, a human-readable description, and a list of common real-world causes.
MIT
