portzap 0.1.3 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +130 -0
  2. package/package.json +7 -6
package/README.md ADDED
@@ -0,0 +1,130 @@
1
+ # portzap
2
+
3
+ ![portzap hero](./hero.png)
4
+
5
+ A fast, cross-platform port management tool. Kill, list, and watch processes on network ports.
6
+
7
+ ## Features
8
+
9
+ - **Kill processes**: Terminate processes running on specified ports
10
+ - **List ports**: View all listening ports or inspect specific ones
11
+ - **Watch ports**: Automatically kill any process that binds to watched ports
12
+ - **Interactive mode**: Select which processes to kill interactively
13
+ - **Cross-platform**: Works on macOS, Linux, and Windows
14
+ - **Graceful shutdown**: Sends SIGTERM first, escalates to SIGKILL if needed
15
+
16
+ ## Installation
17
+
18
+ ### Using Cargo (Recommended)
19
+
20
+ ```bash
21
+ cargo install portzap
22
+ ```
23
+
24
+ ### Using npm
25
+
26
+ ```bash
27
+ npm install -g portzap
28
+ ```
29
+
30
+ ### From source
31
+
32
+ ```bash
33
+ git clone https://github.com/justinkarso/portzap
34
+ cd portzap
35
+ cargo install --path .
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### Kill processes on ports
41
+
42
+ ```bash
43
+ # Kill process on port 3000
44
+ portzap 3000
45
+
46
+ # Kill processes on multiple ports
47
+ portzap 3000 8080 9090
48
+
49
+ # Kill processes on port range
50
+ portzap 3000-3010
51
+
52
+ # Interactive mode: choose which process to kill
53
+ portzap -i 3000
54
+
55
+ # Dry run: show what would be killed without killing
56
+ portzap --dry-run 3000
57
+ ```
58
+
59
+ ### List processes on ports
60
+
61
+ ```bash
62
+ # List all listening ports
63
+ portzap list
64
+
65
+ # Show what's on port 3000
66
+ portzap list 3000
67
+ ```
68
+
69
+ ### Watch ports
70
+
71
+ ```bash
72
+ # Watch port 3000 and auto-kill anything that binds to it
73
+ portzap watch 3000
74
+
75
+ # Watch multiple ports
76
+ portzap watch 3000 8080
77
+ ```
78
+
79
+ ### Interactive GUI Mode
80
+
81
+ Launch an interactive terminal UI to browse and manage processes:
82
+
83
+ ```bash
84
+ # Open the GUI dashboard
85
+ portzap gui
86
+ ```
87
+
88
+ The GUI provides:
89
+ - **Browse all listening ports** - View all processes using network ports with details (PID, command, protocol)
90
+ - **Search & filter** - Press `/` to filter processes by name
91
+ - **Sort** - Press `s` to cycle through sort options (port, PID, name, protocol)
92
+ - **Select & kill** - Use arrow keys to navigate, `Space`/`Enter` to toggle selection and kill processes
93
+ - **Keyboard shortcuts**:
94
+ - `↑/↓` - Navigate
95
+ - `Space/Enter` - Toggle selection and kill
96
+ - `Tab` - Multi-select
97
+ - `/` - Filter by name
98
+ - `s` - Sort
99
+ - `r` - Refresh
100
+ - `?` - Show help
101
+ - `q/Esc` - Quit
102
+
103
+ ## Options
104
+
105
+ - `-i, --interactive`: Interactive mode to select processes
106
+ - `--dry-run`: Show what would be killed without actually killing
107
+ - `-s, --signal`: Signal to send (term, kill, int, hup)
108
+ - `--no-graceful`: Skip graceful shutdown, send signal immediately
109
+ - `-t, --timeout`: Timeout for graceful shutdown (default: 5 seconds)
110
+ - `--format`: Output format (table, json, plain)
111
+
112
+ ## Examples
113
+
114
+ ```bash
115
+ # Kill development server on port 3000
116
+ portzap 3000
117
+
118
+ # List all ports in JSON format
119
+ portzap list --format json
120
+
121
+ # Watch port 8080 with 2-second poll interval
122
+ portzap watch 8080 --poll 2000
123
+
124
+ # Kill process on port 5000 interactively
125
+ portzap -i 5000
126
+ ```
127
+
128
+ ## License
129
+
130
+ MIT OR Apache-2.0
package/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "portzap",
3
- "version": "0.1.3",
3
+ "version": "0.2.1",
4
4
  "description": "A fast, cross-platform port management tool. Kill, list, and watch processes on network ports.",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "portzap": "bin.js"
8
8
  },
9
9
  "files": [
10
- "bin.js"
10
+ "bin.js",
11
+ "README.md"
11
12
  ],
12
13
  "optionalDependencies": {
13
- "@portzap/darwin-arm64": "0.1.3",
14
- "@portzap/darwin-x64": "0.1.3",
15
- "@portzap/linux-x64": "0.1.3",
16
- "@portzap/linux-arm64": "0.1.3"
14
+ "@portzap/darwin-arm64": "0.2.1",
15
+ "@portzap/darwin-x64": "0.2.1",
16
+ "@portzap/linux-x64": "0.2.1",
17
+ "@portzap/linux-arm64": "0.2.1"
17
18
  },
18
19
  "keywords": [
19
20
  "port",