Quick Comparison
| Feature | kill-port | portrm |
|---|---|---|
| Kill process on port | Yes | Yes |
| Service identification | No | Yes (13+ services) |
| Safety checks | No | 3-tier system |
| Graceful shutdown | No (SIGKILL only) | SIGTERM first |
| Auto-restart | No | --run flag |
| Port scanning | No | ptrm scan |
| Dev stack management | No | ptrm up/down |
| Project config | No | .ptrm.toml |
| CI/CD mode | No | ptrm ci |
| VS Code extension | No | Yes |
| Binary size | ~50MB (Node.js) | ~1.2MB |
| Runtime required | Node.js | None |
| Language | JavaScript | Rust |
Why Developers Switch from kill-port
1. Safety
kill-port sends SIGKILL to any process without checking what it is. This means you can accidentally kill your database and lose data. portrm identifies services and has a 3-tier safety system that blocks killing system processes, warns about databases, and approves dev servers.
2. Intelligence
kill-port just kills. portrm shows you what is running: the service type (Next.js, PostgreSQL, Docker), memory usage, uptime, and project directory. You make informed decisions instead of guessing.
3. Graceful Shutdown
kill-port uses SIGKILL (force kill) which does not allow the process to clean up. portrm uses SIGTERM first, waits for the process to exit cleanly, and only escalates to SIGKILL if needed. This prevents data corruption, orphaned files, and socket leaks.
4. Auto-restart
kill-port kills the process and you manually restart. portrm can kill and restart in one step:
ptrm fix 3000 --run "npm run dev"
5. Size & Speed
kill-port requires Node.js (~50MB runtime overhead). portrm is a ~1.2MB native binary with zero dependencies. Instant startup, no node_modules.
Usage Comparison
# kill-port
npx kill-port 3000
# That's it. No output. No safety. No restart.
# portrm
ptrm fix 3000
# Shows what's running, checks safety, kills gracefully
# Optional: -y (skip prompt), --run "cmd" (restart)
Migration
Switching from kill-port to portrm is simple:
# Instead of:
npx kill-port 3000
# Use:
ptrm fix 3000 -y
# Install globally:
npm install -g portrm
Ready to upgrade from kill-port?
portrm does everything kill-port does, plus safety, intelligence, and dev stack management.