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

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.2
File Size Uploaded Provenance Actions
pnuke-0.1.2.tar.gz 33.5 kB Without provenance Details for pnuke-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pnuke 0.1.2
File Actions
pnuke-0.1.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pnuke-0.1.2-py3-none-win_amd64.whl
pnuke-0.1.2-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details for pnuke-0.1.2-py3-none-manylinux_2_39_x86_64.whl
pnuke-0.1.2-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.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pnuke-0.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for pnuke-0.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
pnuke-0.1.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pnuke-0.1.2-py3-none-macosx_11_0_arm64.whl
pnuke-0.1.2-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for pnuke-0.1.2-py3-none-macosx_10_12_x86_64.whl

Total release size: 4.5 MB

Release files / pnuke-0.1.2.tar.gz

Download URL pnuke-0.1.2.tar.gz
Size 33.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7c30de7f02cfcb0e585712cbb2d4645aa0ed1e35dfc375fdd1afdf4bab0a7044
BLAKE2b-256 checksum
How to use checksums
fd2224b2923e35918f694232bf30ce32a5dfb329e6c0d1f9d010772228b5f47a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

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

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

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

Download URL pnuke-0.1.2-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
9af5a09bea3c1438ef5b83431cc1b5f7e6021f71bc7c1e84bc1bf76b52dd174b
BLAKE2b-256 checksum
How to use checksums
f24130e3a185cb540530501c515a5a0129782ce644f664f85def6f3e6c7324f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

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

Download URL pnuke-0.1.2-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
dfd1be50b6781a7accc2394c996e968c1ae0010ac991ca197560b2f2749be3b2
BLAKE2b-256 checksum
How to use checksums
3e0374a6566f488ee6e58befe742ac07642a246faf02011173fbc9dd276193ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

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

Download URL pnuke-0.1.2-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
65a4bd3661ed2ab5d2f3a2a2fd5340e6639115b5a31ed478f626ec8be0f289b9
BLAKE2b-256 checksum
How to use checksums
efb0b8891d53777508b6272a4764ceec4e1e4e33c9c076e0c2750f107f80aff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

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

Download URL pnuke-0.1.2-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
b07fe9b7309e1f7be442fc6f63882ce8628bbebc2bc5338568ce69637ceec224
BLAKE2b-256 checksum
How to use checksums
a6cddb284660d81ea2894caf07add4ed4212c40f7af11974b05973e4c93ff84b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

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

Download URL pnuke-0.1.2-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
37ac05fd1ce0c003498692dafcc2b0fbc74a92e27c2361a0cbb52fc337cdb575
BLAKE2b-256 checksum
How to use checksums
d82d20e1b50a6c7f8d9dea1989e74650e8b411b7146f4a22e39c6b42f53dd0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for pnuke 0.1.2

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