portrm 2.0.0__tar.gz

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.
portrm-2.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Portrm Abhishek Verma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ include LICENSE
2
+ include README.md
portrm-2.0.0/PKG-INFO ADDED
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: portrm
3
+ Version: 2.0.0
4
+ Summary: portrm - blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments.
5
+ Author-email: abhishekayu <abhishekayu@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://portrm.dev
8
+ Project-URL: Repository, https://github.com/abhishekayu/portrm
9
+ Project-URL: Issues, https://github.com/abhishekayu/portrm/issues
10
+ Keywords: port,kill-port,port-conflict,developer-tools,cli,devserver,process,debug,port-scanner,dev-environment
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Rust
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Classifier: Topic :: System :: Networking
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Dynamic: license-file
24
+
25
+ # portrm
26
+
27
+ Blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install portrm
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```bash
38
+ # Scan all listening ports
39
+ ptrm scan
40
+
41
+ # Kill process on port 3000
42
+ ptrm kill 3000
43
+
44
+ # Inspect a port
45
+ ptrm info 8080
46
+
47
+ # Interactive TUI
48
+ ptrm interactive
49
+ ```
50
+
51
+ ## More
52
+
53
+ - **Homepage**: [portrm.dev](https://portrm.dev)
54
+ - **GitHub**: [github.com/abhishekayu/portrm](https://github.com/abhishekayu/portrm)
55
+ - **Docs**: Run `ptrm --help`
portrm-2.0.0/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # portrm
2
+
3
+ Blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install portrm
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ # Scan all listening ports
15
+ ptrm scan
16
+
17
+ # Kill process on port 3000
18
+ ptrm kill 3000
19
+
20
+ # Inspect a port
21
+ ptrm info 8080
22
+
23
+ # Interactive TUI
24
+ ptrm interactive
25
+ ```
26
+
27
+ ## More
28
+
29
+ - **Homepage**: [portrm.dev](https://portrm.dev)
30
+ - **GitHub**: [github.com/abhishekayu/portrm](https://github.com/abhishekayu/portrm)
31
+ - **Docs**: Run `ptrm --help`
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "portrm"
7
+ version = "2.0.0"
8
+ description = "portrm - blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments."
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.8"
12
+ authors = [
13
+ {name = "abhishekayu", email = "abhishekayu@users.noreply.github.com"},
14
+ ]
15
+ keywords = [
16
+ "port",
17
+ "kill-port",
18
+ "port-conflict",
19
+ "developer-tools",
20
+ "cli",
21
+ "devserver",
22
+ "process",
23
+ "debug",
24
+ "port-scanner",
25
+ "dev-environment",
26
+ ]
27
+ classifiers = [
28
+ "Development Status :: 5 - Production/Stable",
29
+ "Environment :: Console",
30
+ "Intended Audience :: Developers",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Operating System :: OS Independent",
33
+ "Programming Language :: Rust",
34
+ "Topic :: Software Development :: Build Tools",
35
+ "Topic :: System :: Networking",
36
+ "Topic :: Utilities",
37
+ ]
38
+
39
+ [project.urls]
40
+ Homepage = "https://portrm.dev"
41
+ Repository = "https://github.com/abhishekayu/portrm"
42
+ Issues = "https://github.com/abhishekayu/portrm/issues"
43
+
44
+ [project.scripts]
45
+ ptrm = "portrm:main"
46
+ portrm = "portrm:main"
47
+
48
+ [tool.setuptools.packages.find]
49
+ where = ["src"]
portrm-2.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,84 @@
1
+ """portrm - blazing-fast CLI to inspect ports, kill processes, and fix dev environments."""
2
+
3
+ import io
4
+ import os
5
+ import platform
6
+ import stat
7
+ import subprocess
8
+ import sys
9
+ import tarfile
10
+ import urllib.request
11
+ import zipfile
12
+
13
+ VERSION = "2.0.0"
14
+ REPO = "abhishekayu/portrm"
15
+
16
+
17
+ def _binary_path():
18
+ """Return the path to the installed ptrm binary."""
19
+ pkg_dir = os.path.dirname(os.path.abspath(__file__))
20
+ bin_dir = os.path.join(pkg_dir, "bin")
21
+ exe = "ptrm.exe" if sys.platform == "win32" else "ptrm"
22
+ return os.path.join(bin_dir, exe)
23
+
24
+
25
+ def _ensure_binary():
26
+ """Download the native binary if not already present."""
27
+ binary = _binary_path()
28
+ if os.path.isfile(binary):
29
+ return binary
30
+
31
+ system = platform.system().lower()
32
+ machine = platform.machine().lower()
33
+
34
+ arch_map = {"x86_64": "amd64", "amd64": "amd64", "aarch64": "arm64", "arm64": "arm64"}
35
+ arch = arch_map.get(machine)
36
+ if not arch:
37
+ print(f"Unsupported architecture: {machine}", file=sys.stderr)
38
+ sys.exit(1)
39
+
40
+ if system == "darwin":
41
+ asset, ext = f"portrm-darwin-{arch}", ".tar.gz"
42
+ elif system == "linux":
43
+ asset, ext = f"portrm-linux-{arch}", ".tar.gz"
44
+ elif system == "windows":
45
+ asset, ext = f"portrm-windows-{arch}", ".zip"
46
+ else:
47
+ print(f"Unsupported platform: {system}", file=sys.stderr)
48
+ sys.exit(1)
49
+
50
+ url = f"https://github.com/{REPO}/releases/download/v{VERSION}/{asset}{ext}"
51
+ bin_dir = os.path.dirname(binary)
52
+ os.makedirs(bin_dir, exist_ok=True)
53
+
54
+ print(f"Downloading ptrm v{VERSION} for {platform.system()}-{machine}...")
55
+ try:
56
+ req = urllib.request.Request(url, headers={"User-Agent": "portrm-pip-installer"})
57
+ with urllib.request.urlopen(req, timeout=60) as resp:
58
+ data = resp.read()
59
+ except Exception as e:
60
+ print(f"Failed to download ptrm: {e}", file=sys.stderr)
61
+ sys.exit(1)
62
+
63
+ if ext == ".zip":
64
+ with zipfile.ZipFile(io.BytesIO(data)) as zf:
65
+ zf.extractall(bin_dir)
66
+ else:
67
+ with tarfile.open(fileobj=io.BytesIO(data), mode="r:gz") as tf:
68
+ tf.extractall(bin_dir)
69
+
70
+ if system != "windows":
71
+ st = os.stat(binary)
72
+ os.chmod(binary, st.st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
73
+
74
+ return binary
75
+
76
+
77
+ def main():
78
+ """Entry point that delegates to the native ptrm binary."""
79
+ binary = _ensure_binary()
80
+ try:
81
+ result = subprocess.run([binary] + sys.argv[1:])
82
+ sys.exit(result.returncode)
83
+ except KeyboardInterrupt:
84
+ sys.exit(130)
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: portrm
3
+ Version: 2.0.0
4
+ Summary: portrm - blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments.
5
+ Author-email: abhishekayu <abhishekayu@users.noreply.github.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://portrm.dev
8
+ Project-URL: Repository, https://github.com/abhishekayu/portrm
9
+ Project-URL: Issues, https://github.com/abhishekayu/portrm/issues
10
+ Keywords: port,kill-port,port-conflict,developer-tools,cli,devserver,process,debug,port-scanner,dev-environment
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Rust
17
+ Classifier: Topic :: Software Development :: Build Tools
18
+ Classifier: Topic :: System :: Networking
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Dynamic: license-file
24
+
25
+ # portrm
26
+
27
+ Blazing-fast, cross-platform CLI to inspect ports, kill processes, and recover broken dev environments.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install portrm
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```bash
38
+ # Scan all listening ports
39
+ ptrm scan
40
+
41
+ # Kill process on port 3000
42
+ ptrm kill 3000
43
+
44
+ # Inspect a port
45
+ ptrm info 8080
46
+
47
+ # Interactive TUI
48
+ ptrm interactive
49
+ ```
50
+
51
+ ## More
52
+
53
+ - **Homepage**: [portrm.dev](https://portrm.dev)
54
+ - **GitHub**: [github.com/abhishekayu/portrm](https://github.com/abhishekayu/portrm)
55
+ - **Docs**: Run `ptrm --help`
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ src/portrm/__init__.py
6
+ src/portrm.egg-info/PKG-INFO
7
+ src/portrm.egg-info/SOURCES.txt
8
+ src/portrm.egg-info/dependency_links.txt
9
+ src/portrm.egg-info/entry_points.txt
10
+ src/portrm.egg-info/top_level.txt
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ portrm = portrm:main
3
+ ptrm = portrm:main
@@ -0,0 +1 @@
1
+ portrm