Skip to main content

⚡ pnuke

The sub-millisecond port killer and listener cockpit for developers.

CI License Rust Crates.io


$ pnuke 3000
✔ Nuked 'node' (PID: 14205) on port 3000 in 0.82ms

💥 The Problem

Every developer has encountered this:

Error: listen EADDRINUSE: address already in use :::3000

To fix it, you usually have to remember messy, platform-specific bash runes:

# macOS / Linux
lsof -ti :3000 | xargs kill -9

# Windows
netstat -ano | findstr :3000
taskkill /F /PID 12345

Or you install heavy npm packages that pull in 15 dependencies and take 400ms just to boot Node.js.

pnuke solves this once and for all. Written in pure Rust, it finds the locking process and terminates it in under 2 milliseconds with zero runtime dependencies.


⚡ Features

  • Blazingly Fast: Executes in sub-milliseconds with a tiny ~1.8MB static binary.
  • Framework & Service Aliases: Nuke by name instead of remembering port numbers: pnuke vite, pnuke next, pnuke postgres, pnuke redis.
  • Port Range Support: Clear batches of incremented ports in one command: pnuke 3000..3005.
  • Interactive TUI Cockpit: Run pnuke without arguments to launch a real-time, searchable terminal dashboard powered by Ratatui.
  • Safety Shields: Automatically guards critical system ports (SSH 22, DNS 53) from accidental termination unless --danger is specified.
  • Shell Auto-Completions: Built-in completion generators for Bash, Zsh, Fish, and PowerShell (pnuke --generate-completion zsh).
  • Multi-Port Support: Nuke multiple ports simultaneously: pnuke 3000 8080 5432.
  • Graceful & Force Modes: Sends SIGTERM first with a 100ms graceful exit window, or instant SIGKILL with -f / --force.
  • Agent & Automation Friendly: --json output flag allows seamless integration into CI pipelines, scripts, and AI agents.
  • Cross-Platform: Works natively on macOS, Linux, and Windows.

🕹️ Interactive TUI Cockpit

Run pnuke with no arguments to launch the interactive cockpit:

pnuke
┌ Active Listening Ports ────────────────────────────────────────────────────────┐
│ PORT     PROTO    PID        PROCESS NAME             ADDRESS                  │
│ ▶ 3000   TCP      14205      node                     127.0.0.1:3000           │
│   5037   TCP      32913      adb                      127.0.0.1:5037           │
│   8000   TCP      42280      php8.5                   127.0.0.1:8000           │
│   5432   TCP      9102       postgres                 0.0.0.0:5432             │
└────────────────────────────────────────────────────────────────────────────────┘
 [↑/↓] Navigate   [Enter/k] Nuke Port   [/] Filter   [r] Refresh   [q] Quit
  • Navigate: Use ↑ / ↓ or j / k.
  • Search / Filter: Press / and type to filter by process name or port number in real time.
  • Nuke: Press Enter or x on any port to terminate it instantly.
  • Refresh: Press r to rescan listening sockets.

🚀 Installation

🦀 Cargo (Rust)

cargo install pnuke

📦 npm / npx (Node.js & Frontend)

# Run instantly with zero install:
npx pnuke 3000

# Or install globally:
npm install -g pnuke
pnpm add -g pnuke
bun add -g pnuke

🐍 uv & pip (Python)

# Run instantly with zero install:
uvx pnuke 3000

# Or install tool:
uv tool install pnuke
pip install pnuke

📖 CLI Usage

Usage: pnuke [OPTIONS] [TARGETS]...

Arguments:
  [TARGETS]...  Port(s), aliases (e.g. 'vite', 'next'), or ranges (e.g. '3000..3005')

Options:
  -f, --force                 Force immediate termination (SIGKILL) without grace period
  -c, --check                 Check and inspect what is running without terminating
  -l, --list                  Non-interactively list all active listening ports
  -i, --interactive           Explicitly launch the interactive terminal UI
      --aliases               List all supported framework and service aliases
      --danger                Allow terminating protected system ports (e.g. port 22 SSH)
      --generate-completion   Generate shell completions (bash, zsh, fish, powershell)
      --json                  Output results as machine-readable JSON
  -q, --quiet                 Suppress all informational output except errors
  -h, --help                  Print help
  -V, --version               Print version

Examples

1. Instant Kill (by Port or Alias)

# By port number:
pnuke 3000

# By framework or database alias:
pnuke vite          # targets port 5173
pnuke next          # targets port 3000
pnuke postgres      # targets port 5432
pnuke redis         # targets port 6379

2. Kill a Range of Ports

pnuke 3000..3005

3. Nuke Multiple Ports & Aliases at Once

pnuke vite next 8080 5432

4. Inspect / Dry-Run (Check without killing)

pnuke -c vite
# Output: ● Port 5173 is occupied by 'vite' (PID: 14205, Protocol: TCP)

5. List All Supported Aliases

pnuke --aliases

6. Generate Shell Completions

# For Zsh:
pnuke --generate-completion zsh > ~/.zfunc/_pnuke

# For Bash:
pnuke --generate-completion bash > /etc/bash_completion.d/pnuke

4. Non-Interactive List

pnuke -l

5. Machine-Readable JSON Output

pnuke 3000 --json
[
  {
    "port": 3000,
    "pid": 14205,
    "process_name": "node",
    "success": true,
    "message": "Terminated successfully",
    "duration_ms": 0.82
  }
]

🏎️ Benchmark

Tool Language Startup + Kill Time Binary Size Runtime Dependency
pnuke Rust 🦀 ~10ms ~1.8 MB None (Zero)
kill-port Node.js ~420ms ~15 MB (node_modules) Node.js runtime
lsof + kill Shell / Bash ~45ms N/A POSIX shell tools

🛡️ License

Dual-licensed under either:

at your option.


Engineered with precision by Almost Ordinary • Curated by @wellparth

Metadata

Release files for pnuke 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pnuke 0.1.1
File Size Uploaded Provenance Actions
pnuke-0.1.1.tar.gz 32.7 kB Without provenance Details for pnuke-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pnuke 0.1.1
File Actions
pnuke-0.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pnuke-0.1.1-py3-none-win_amd64.whl
pnuke-0.1.1-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details for pnuke-0.1.1-py3-none-manylinux_2_39_x86_64.whl
pnuke-0.1.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for pnuke-0.1.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pnuke-0.1.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for pnuke-0.1.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
pnuke-0.1.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pnuke-0.1.1-py3-none-macosx_11_0_arm64.whl
pnuke-0.1.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for pnuke-0.1.1-py3-none-macosx_10_12_x86_64.whl

Total release size: 4.5 MB

Release files / pnuke-0.1.1.tar.gz

Download URL pnuke-0.1.1.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ab3acad68a1979827cad70b606489068b0c5de55c695d9a72e13ef7add161cc5
BLAKE2b-256 checksum
How to use checksums
0cac853b8eec9c3bcaa3101149deaa70eae4b4fd9bf9351e53e081649d9eb457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-win_amd64.whl

Download URL pnuke-0.1.1-py3-none-win_amd64.whl
Size 700.2 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6e1a19113329191332d1fec4d8001ca645d9b65b721493928c5e58ed45b51bdf
BLAKE2b-256 checksum
How to use checksums
79be6e3f5fda14b5b2580144577a81d1b5e17e2787cf2ee38f72b5d292fa5561
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-manylinux_2_39_x86_64.whl

Download URL pnuke-0.1.1-py3-none-manylinux_2_39_x86_64.whl
Size 786.8 kB
Tags Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3de434960267544a81398fa56049903d9a2793b6122ed6f171f5251fb8675c3f
BLAKE2b-256 checksum
How to use checksums
9870026b71b8f6c879d64e91e0396a8c28e3fb1b44bc3df6dd04ec65c4eafc78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pnuke-0.1.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 781.2 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
8208b07da5c3b536f24c278b31434237ae29ea8bb827ec3e5323ccf0756c81d5
BLAKE2b-256 checksum
How to use checksums
8b7286db5369c02ca23dea72a28faa255498dc6c2deeb01631d1583a14691d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL pnuke-0.1.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 736.2 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
daef851b778e2dc97d19a0b867c54ec3d7bcc6e2fb057f757e96f159a0b4749c
BLAKE2b-256 checksum
How to use checksums
7584771f0bef036a2b873a86d9f47a85cc008abf977c5de2a94c296677c2885c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-macosx_11_0_arm64.whl

Download URL pnuke-0.1.1-py3-none-macosx_11_0_arm64.whl
Size 711.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e6fd3b04ee7ecdff313363f059c5cf437973484edda9af4f020cdd552bfbc0e2
BLAKE2b-256 checksum
How to use checksums
9a04e41602c4718ee3256feed7e9757f2228af196a4a4d24e26c8570503f9ec2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / pnuke-0.1.1-py3-none-macosx_10_12_x86_64.whl

Download URL pnuke-0.1.1-py3-none-macosx_10_12_x86_64.whl
Size 734.3 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f61a3e98aebe8e72c7b3216e34837574501b9907a3bc33fdd03cae80549b39f6
BLAKE2b-256 checksum
How to use checksums
e7e1b54c6d7021912b5dcdbde63eb37880de3e5ca26822a87c00403e19e808c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for pnuke 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

7 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page