🇨🇳 · 🇬🇧
Forget ports. Just preview.
Based on python3 -m http.server, zero external dependencies. Just hs -o to preview your project.
Multiple frontend projects → constant context switching: "Which port is A on?" "Who's occupying 8080?".
hs closes the loop: Start → Track → List → Kill .
Scenario Before With hs Start server python3 -m http.server 8080 + open browser manuallyhs -o — auto-find free port, open browserView servers lsof -i :8080, then pshs listSwitch projects Kill old, start new (or conflict) hs ../project-bKill server lsof → kill <pid>hs kill 8080
pip install http-server-cli
# or: pip install --upgrade http-server-cli Verify:
hs version # → http-server-cli v1.0.x
hs -o # Start in current directory + open browser
# 1. Preview your projectcd ~ /project-alpha
hs -o # Auto port + open browser# 2. Check running servers
hs list
# ✅ http://localhost:8080 → ~/project-alpha# ✅ http://localhost:8081 → ~/project-beta (daemon)# 3. Kill unwanted servers
hs kill 8080 # By port
hs kill ~ /project-alpha # By path
hs kill-all # Kill allCommand Description hs . [-o] [-d] [-f]Current directory, auto-find free port hs /path [-o] [-d] [-f]Specify directory hs . -i app.html [-o]Custom index file hs . -i './snapshots/*.html' [-o]Glob → most recently modified file hs /path/to/file.html [-o]HTML file path → auto-extract directory + set index hs /path/snapshots/*.html [-o]Path glob → most recent file hs start [path] [-o] [-d] [-f] [-i <file>]Full form of hs .
Command Description hs listList running servers (alive only) hs list --portPorts only hs list --pathPaths only hs list --shortport:path formaths list --jsonJSON output hs search <keyword> [--json]Search by port or path hs status <port|path> [--json]Single server status (CPU/memory/log)
Command Description hs kill 8080By port hs kill ~/projectBy path hs kill /path/to/file.htmlHTML file → auto-resolve to parent dir hs kill /path/*.htmlGlob → most recent file hs kill-allKill all user services hs kill-all --jsonJSON output
Command Description hs dashboard [-p PORT] [-o] [--json]Web dashboard (default 8180) hs dashboard stop|status|restart|helpSubcommands
Command Description hs mcp [--transport stdio|sse] [--port PORT]MCP Server for AI Agent hs mcp stop|status|restart|helpSubcommands
Command Description hs history [--json]Server start/stop history (excludes temp dirs) hs config [--json]Show configuration hs set port|domain <value>Change configuration hs version [--json]Show version hs helpShow help
hs without args = hs start . (start in current directory)hs . -i app.html : use app.html as the index page~/.http-server-cli/
├── config.json # Default port/domain configuration
├── registry.json # port → {path, pid, domain, started_at, index_page}
├── registry-managed.json # Infrastructure services (dashboard, MCP SSE)
└── logs/{port}.log # http.server logs
git clone git@github.com:imjaden/http-server-cli.git
cd http-server-cli
pip install -e .
python3 -m pytest tests/ Is This Reinventing the Wheel? Tool Start Server Auto Port Track Project↔Port List All Kill by Name Open Browser python3 -m http.server✅ ❌ ❌ ❌ ❌ ❌ http-server (npm)✅ ❌ ❌ ❌ ❌ ✅ serve (npm)✅ ❌ ❌ ❌ ❌ ✅ live-server✅ ✅ ❌ ❌ ❌ ✅ portless (npm)✅ ✅ ❌ ❌ ❌ ✅ kill-port-cli (npm)❌ ❌ ❌ ✅ ✅ ❌ lsof / netstat❌ ❌ ❌ Manual Manual ❌ http-server-cli✅ ✅ ✅ ✅ ✅ ✅