pnuke 0.1.1__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pnuke
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Topic :: System :: Networking
|
|
6
|
+
Classifier: Topic :: Utilities
|
|
7
|
+
Classifier: Environment :: Console
|
|
8
|
+
Summary: ⥠The sub-millisecond port killer and listener cockpit for developers.
|
|
9
|
+
Keywords: cli,port,kill,tui,network,dev-tools
|
|
10
|
+
Author-email: Almost Ordinary <hello@almostordinary.dev>, Parth Gorde <parth@almostordinary.dev>
|
|
11
|
+
License: MIT OR Apache-2.0
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
14
|
+
Project-URL: Homepage, https://github.com/almostordinary/pnuke
|
|
15
|
+
Project-URL: Issues, https://github.com/almostordinary/pnuke/issues
|
|
16
|
+
Project-URL: Repository, https://github.com/almostordinary/pnuke
|
|
17
|
+
|
|
18
|
+
# ⥠pnuke
|
|
19
|
+
|
|
20
|
+
<div align="center">
|
|
21
|
+
|
|
22
|
+
**The sub-millisecond port killer and listener cockpit for developers.**
|
|
23
|
+
|
|
24
|
+
[](https://github.com/almostordinary/pnuke/actions)
|
|
25
|
+
[](LICENSE-MIT)
|
|
26
|
+
[](https://www.rust-lang.org)
|
|
27
|
+
[](https://crates.io/crates/pnuke)
|
|
28
|
+
|
|
29
|
+
<br />
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
$ pnuke 3000
|
|
33
|
+
â Nuked 'node' (PID: 14205) on port 3000 in 0.82ms
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## đĨ The Problem
|
|
41
|
+
|
|
42
|
+
Every developer has encountered this:
|
|
43
|
+
```
|
|
44
|
+
Error: listen EADDRINUSE: address already in use :::3000
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To fix it, you usually have to remember messy, platform-specific bash runes:
|
|
48
|
+
```bash
|
|
49
|
+
# macOS / Linux
|
|
50
|
+
lsof -ti :3000 | xargs kill -9
|
|
51
|
+
|
|
52
|
+
# Windows
|
|
53
|
+
netstat -ano | findstr :3000
|
|
54
|
+
taskkill /F /PID 12345
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Or you install heavy npm packages that pull in 15 dependencies and take 400ms just to boot Node.js.
|
|
58
|
+
|
|
59
|
+
**`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.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## ⥠Features
|
|
64
|
+
|
|
65
|
+
* **Blazingly Fast:** Executes in sub-milliseconds with a tiny **~1.8MB** static binary.
|
|
66
|
+
* **Framework & Service Aliases:** Nuke by name instead of remembering port numbers: `pnuke vite`, `pnuke next`, `pnuke postgres`, `pnuke redis`.
|
|
67
|
+
* **Port Range Support:** Clear batches of incremented ports in one command: `pnuke 3000..3005`.
|
|
68
|
+
* **Interactive TUI Cockpit:** Run `pnuke` without arguments to launch a real-time, searchable terminal dashboard powered by [Ratatui](https://ratatui.rs).
|
|
69
|
+
* **Safety Shields:** Automatically guards critical system ports (SSH 22, DNS 53) from accidental termination unless `--danger` is specified.
|
|
70
|
+
* **Shell Auto-Completions:** Built-in completion generators for Bash, Zsh, Fish, and PowerShell (`pnuke --generate-completion zsh`).
|
|
71
|
+
* **Multi-Port Support:** Nuke multiple ports simultaneously: `pnuke 3000 8080 5432`.
|
|
72
|
+
* **Graceful & Force Modes:** Sends `SIGTERM` first with a 100ms graceful exit window, or instant `SIGKILL` with `-f` / `--force`.
|
|
73
|
+
* **Agent & Automation Friendly:** `--json` output flag allows seamless integration into CI pipelines, scripts, and AI agents.
|
|
74
|
+
* **Cross-Platform:** Works natively on macOS, Linux, and Windows.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## đšī¸ Interactive TUI Cockpit
|
|
79
|
+
|
|
80
|
+
Run `pnuke` with no arguments to launch the interactive cockpit:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pnuke
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
â Active Listening Ports âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
88
|
+
â PORT PROTO PID PROCESS NAME ADDRESS â
|
|
89
|
+
â âļ 3000 TCP 14205 node 127.0.0.1:3000 â
|
|
90
|
+
â 5037 TCP 32913 adb 127.0.0.1:5037 â
|
|
91
|
+
â 8000 TCP 42280 php8.5 127.0.0.1:8000 â
|
|
92
|
+
â 5432 TCP 9102 postgres 0.0.0.0:5432 â
|
|
93
|
+
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
94
|
+
[â/â] Navigate [Enter/k] Nuke Port [/] Filter [r] Refresh [q] Quit
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
* **Navigate:** Use `â` / `â` or `j` / `k`.
|
|
98
|
+
* **Search / Filter:** Press `/` and type to filter by process name or port number in real time.
|
|
99
|
+
* **Nuke:** Press `Enter` or `x` on any port to terminate it instantly.
|
|
100
|
+
* **Refresh:** Press `r` to rescan listening sockets.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## đ Installation
|
|
105
|
+
|
|
106
|
+
### đĻ Cargo (Rust)
|
|
107
|
+
```bash
|
|
108
|
+
cargo install pnuke
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### đĻ npm / npx (Node.js & Frontend)
|
|
112
|
+
```bash
|
|
113
|
+
# Run instantly with zero install:
|
|
114
|
+
npx pnuke 3000
|
|
115
|
+
|
|
116
|
+
# Or install globally:
|
|
117
|
+
npm install -g pnuke
|
|
118
|
+
pnpm add -g pnuke
|
|
119
|
+
bun add -g pnuke
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### đ uv & pip (Python)
|
|
123
|
+
```bash
|
|
124
|
+
# Run instantly with zero install:
|
|
125
|
+
uvx pnuke 3000
|
|
126
|
+
|
|
127
|
+
# Or install tool:
|
|
128
|
+
uv tool install pnuke
|
|
129
|
+
pip install pnuke
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## đ CLI Usage
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Usage: pnuke [OPTIONS] [TARGETS]...
|
|
138
|
+
|
|
139
|
+
Arguments:
|
|
140
|
+
[TARGETS]... Port(s), aliases (e.g. 'vite', 'next'), or ranges (e.g. '3000..3005')
|
|
141
|
+
|
|
142
|
+
Options:
|
|
143
|
+
-f, --force Force immediate termination (SIGKILL) without grace period
|
|
144
|
+
-c, --check Check and inspect what is running without terminating
|
|
145
|
+
-l, --list Non-interactively list all active listening ports
|
|
146
|
+
-i, --interactive Explicitly launch the interactive terminal UI
|
|
147
|
+
--aliases List all supported framework and service aliases
|
|
148
|
+
--danger Allow terminating protected system ports (e.g. port 22 SSH)
|
|
149
|
+
--generate-completion Generate shell completions (bash, zsh, fish, powershell)
|
|
150
|
+
--json Output results as machine-readable JSON
|
|
151
|
+
-q, --quiet Suppress all informational output except errors
|
|
152
|
+
-h, --help Print help
|
|
153
|
+
-V, --version Print version
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Examples
|
|
157
|
+
|
|
158
|
+
#### 1. Instant Kill (by Port or Alias)
|
|
159
|
+
```bash
|
|
160
|
+
# By port number:
|
|
161
|
+
pnuke 3000
|
|
162
|
+
|
|
163
|
+
# By framework or database alias:
|
|
164
|
+
pnuke vite # targets port 5173
|
|
165
|
+
pnuke next # targets port 3000
|
|
166
|
+
pnuke postgres # targets port 5432
|
|
167
|
+
pnuke redis # targets port 6379
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### 2. Kill a Range of Ports
|
|
171
|
+
```bash
|
|
172
|
+
pnuke 3000..3005
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### 3. Nuke Multiple Ports & Aliases at Once
|
|
176
|
+
```bash
|
|
177
|
+
pnuke vite next 8080 5432
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
#### 4. Inspect / Dry-Run (Check without killing)
|
|
181
|
+
```bash
|
|
182
|
+
pnuke -c vite
|
|
183
|
+
# Output: â Port 5173 is occupied by 'vite' (PID: 14205, Protocol: TCP)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### 5. List All Supported Aliases
|
|
187
|
+
```bash
|
|
188
|
+
pnuke --aliases
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### 6. Generate Shell Completions
|
|
192
|
+
```bash
|
|
193
|
+
# For Zsh:
|
|
194
|
+
pnuke --generate-completion zsh > ~/.zfunc/_pnuke
|
|
195
|
+
|
|
196
|
+
# For Bash:
|
|
197
|
+
pnuke --generate-completion bash > /etc/bash_completion.d/pnuke
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### 4. Non-Interactive List
|
|
201
|
+
```bash
|
|
202
|
+
pnuke -l
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### 5. Machine-Readable JSON Output
|
|
206
|
+
```bash
|
|
207
|
+
pnuke 3000 --json
|
|
208
|
+
```
|
|
209
|
+
```json
|
|
210
|
+
[
|
|
211
|
+
{
|
|
212
|
+
"port": 3000,
|
|
213
|
+
"pid": 14205,
|
|
214
|
+
"process_name": "node",
|
|
215
|
+
"success": true,
|
|
216
|
+
"message": "Terminated successfully",
|
|
217
|
+
"duration_ms": 0.82
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## đī¸ Benchmark
|
|
225
|
+
|
|
226
|
+
| Tool | Language | Startup + Kill Time | Binary Size | Runtime Dependency |
|
|
227
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
228
|
+
| **`pnuke`** | **Rust** đĻ | **~10ms** | **~1.8 MB** | **None (Zero)** |
|
|
229
|
+
| `kill-port` | Node.js | ~420ms | ~15 MB (node_modules) | Node.js runtime |
|
|
230
|
+
| `lsof + kill` | Shell / Bash | ~45ms | N/A | POSIX shell tools |
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## đĄī¸ License
|
|
235
|
+
|
|
236
|
+
Dual-licensed under either:
|
|
237
|
+
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
238
|
+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
239
|
+
|
|
240
|
+
at your option.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
<div align="center">
|
|
245
|
+
<sub>Engineered with precision by <a href="https://github.com/almostordinary">Almost Ordinary</a> âĸ Curated by <a href="https://github.com/wellparth">@wellparth</a></sub>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
pnuke-0.1.1.data/scripts/pnuke.exe,sha256=8GIcXZ8KhtZuuHJ_rN5XHB5l3quhZtrmcIezHcjOBAU,1543168
|
|
2
|
+
pnuke-0.1.1.dist-info/METADATA,sha256=frmTwI1TB7Q9KPIRa42vTlk24f8IhkSuXGZHrwKVDJQ,8138
|
|
3
|
+
pnuke-0.1.1.dist-info/WHEEL,sha256=Uvw7WSmy7Kj2FBk8Va4L_dq4MDW8X5Ynby-pOX3ZNS0,94
|
|
4
|
+
pnuke-0.1.1.dist-info/sboms/pnuke.cyclonedx.json,sha256=wmGX124lrgH3P1YvhKOFtqWZfGxtfs62J4wqsYo60OE,211162
|
|
5
|
+
pnuke-0.1.1.dist-info/RECORD,,
|