close
Skip to content

sen-ltd/http-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-status

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.

Screenshot

Features

  • Quick lookup: http-status 404 shows full details for any status code
  • List all codes: http-status --list displays every code grouped by class (1xx–5xx)
  • Filter by class: http-status --class 4xx shows only client error codes
  • Fuzzy search: http-status --search "timeout" finds codes by keyword
  • JSON output: http-status --json 200 for scripting and piping

Requirements

  • PHP 8.2+
  • No Composer dependencies required at runtime

Installation

git clone https://github.com/sen-ltd/http-status.git
cd http-status
chmod +x bin/http-status

Add to your PATH or create an alias:

alias http-status='/path/to/http-status/bin/http-status'

Usage

Look up a status code

http-status 404
404 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

List all codes

http-status --list

Filter by class

http-status --class 5xx

Search

http-status --search "authentication"

JSON output

http-status --json 200
http-status --json --list
http-status --json --search "redirect"

Docker

docker build -t http-status .
docker run --rm http-status 404
docker run --rm http-status --list

Testing

composer install
composer test

Coverage

The 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.

License

MIT

Links

About

CLI tool for instant HTTP status code lookup with RFC references and common causes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors