You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A CLI tool to kill processes by port. This tool allows you to terminate processes running on specified ports. It is useful for developers who need to quickly free up ports during development.
3
+
A CLI tool to kill processes by port. It helps quickly free occupied ports during local development.
4
4
5
5
## Install
6
6
7
-
```bash
8
-
npm install kill-port-process-cli
9
-
```
10
-
## Global Install
7
+
### npm
8
+
11
9
```bash
12
10
npm install -g kill-port-process-cli
13
11
```
14
-
## Homebrew Install
15
-
Install from the dedicated tap:
12
+
13
+
### Homebrew
14
+
15
+
Tap repository: [luckfunc/homebrew-tap](https://github.com/luckfunc/homebrew-tap)
16
16
17
17
```bash
18
18
brew tap luckfunc/tap
19
19
brew install kill-port-process-cli
20
20
```
21
-
### Usage
22
-
You can use the tool by running the `k` or `k-p` or `kill-port` command followed by one or more port numbers.
23
-
### Recommended Command
24
-
We recommend using the `k` command for simplicity and ease of use.
25
-
### example
26
-
To kill processes running on ports 3000 and 3001:
21
+
22
+
## Commands
23
+
24
+
Available commands:
25
+
26
+
-`kill-port`
27
+
-`k-p`
28
+
-`k`
29
+
30
+
Recommended command:
31
+
27
32
```bash
28
33
k 3000 3001
29
34
```
30
-
or
35
+
36
+
Equivalent commands:
37
+
31
38
```bash
32
39
k-p 3000 3001
33
-
```
34
-
or
35
-
```bash
36
40
kill-port 3000 3001
37
41
```
38
-
### Compatibility
42
+
43
+
## Compatibility
44
+
39
45
This tool is compatible with Windows, macOS, and Linux.
40
-
### How It Works
46
+
47
+
## How It Works
48
+
41
49
1. The tool identifies the process ID (PID) using the specified port.
42
-
2. It then terminates the process associated with that PID.
43
-
### Finding the PID
44
-
- On Unix-based systems, it uses the `lsof` command.
45
-
- On Windows, it uses the `netstat` command.
46
-
### Contributing
47
-
Contributions are welcome! Please open an issue or submit a pull request.
50
+
2. It terminates the process associated with that PID.
51
+
52
+
### PID Lookup
53
+
54
+
- On Unix-based systems, it uses `lsof`.
55
+
- On Windows, it uses `netstat`.
56
+
57
+
## Contributing
58
+
59
+
Contributions are welcome. Please open an issue or submit a pull request.
0 commit comments