A fast, zero-dependency HTTP status code lookup CLI for the terminal. Pure Python 3, no external packages.
Stop opening a browser tab to remember what 422 means. Look it up where you already are.
- Look up any HTTP status code by number (
httpstatus 404) - Wildcard category lookup (
httpstatus 4xx) - Full-text search across names and descriptions (
httpstatus -s timeout) - Filter by category (
httpstatus -c client) - Color-coded output by category, auto-disabled when piping
- 60+ status codes including WebDAV (RFC 4918), rate limiting, and the teapot
- Nearest-code suggestions on miss
- Single file, no dependencies, runs anywhere Python 3 runs
git clone https://github.com/technicalanalysis00005-cell/httpstatus.git
cd httpstatus
chmod +x httpstatus.py
sudo ln -s "$(pwd)/httpstatus.py" /usr/local/bin/httpstatusOr just call it directly:
python3 httpstatus.py 404$ httpstatus 418
418 I'm a teapot
Category: 4xx Client Error
Defined in 1998 as one of the traditional IETF April Fools' jokes (RFC 2324).$ httpstatus 5xx
500 Internal Server Error
Category: 5xx Server Error
...
502 Bad Gateway
...$ httpstatus -s "rate limit"
429 Too Many Requests
Category: 4xx Client Error
The user has sent too many requests in a given amount of time. Rate limiting.$ httpstatus -c redirection
$ httpstatus -c 3xx # equivalent$ httpstatus 404 --no-colorColors are also auto-disabled when stdout is not a TTY, so piping to grep and friends works cleanly.
| Range | Category | Color |
|---|---|---|
| 1xx | Informational | cyan |
| 2xx | Success | green |
| 3xx | Redirection | yellow |
| 4xx | Client Error | red |
| 5xx | Server Error | magenta |
0— code or query found1— not found, invalid input, or no arguments given
Useful in scripts:
if httpstatus "$code" >/dev/null 2>&1; then
echo "Known status code"
ficurl httpstat.us/418 is fun, but offline tools are faster. This is one Python file you can drop on any box you SSH into.
MIT