procclean 1.2.0__py3-none-any.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.
- procclean/__init__.py +11 -0
- procclean/__main__.py +22 -0
- procclean/cli/__init__.py +27 -0
- procclean/cli/commands.py +213 -0
- procclean/cli/docs.py +234 -0
- procclean/cli/parser.py +272 -0
- procclean/core/__init__.py +47 -0
- procclean/core/actions.py +46 -0
- procclean/core/constants.py +48 -0
- procclean/core/filters.py +121 -0
- procclean/core/memory.py +22 -0
- procclean/core/models.py +27 -0
- procclean/core/process.py +160 -0
- procclean/formatters/__init__.py +33 -0
- procclean/formatters/columns.py +128 -0
- procclean/formatters/output.py +158 -0
- procclean/tui/__init__.py +6 -0
- procclean/tui/app.py +401 -0
- procclean/tui/app.tcss +87 -0
- procclean/tui/screens.py +79 -0
- procclean-1.2.0.dist-info/METADATA +164 -0
- procclean-1.2.0.dist-info/RECORD +24 -0
- procclean-1.2.0.dist-info/WHEEL +4 -0
- procclean-1.2.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: procclean
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Interactive TUI for exploring and cleaning up processes - find orphans, memory hogs, and kill them
|
|
5
|
+
Keywords: cleanup,kill,memory,orphan,process,terminal,tui
|
|
6
|
+
Author: Kaj Kowalski
|
|
7
|
+
Author-email: Kaj Kowalski <info@kajkowalski.nl>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Topic :: System :: Systems Administration
|
|
19
|
+
Classifier: Topic :: Utilities
|
|
20
|
+
Requires-Dist: psutil>=7.2.1
|
|
21
|
+
Requires-Dist: tabulate>=0.9.0
|
|
22
|
+
Requires-Dist: textual>=7.0.0
|
|
23
|
+
Requires-Python: >=3.14
|
|
24
|
+
Project-URL: Homepage, https://procclean.kjanat.com
|
|
25
|
+
Project-URL: Repository, https://github.com/kjanat/procclean
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img src="logo/procclean-transparent.svg" alt="procclean" width="500">
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<em>Interactive TUI for exploring and cleaning up processes - find orphans, memory hogs, and kill them.</em>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="https://github.com/kjanat/procclean/blob/master/LICENSE"><img src="https://img.shields.io/github/license/kjanat/procclean" alt="License"></a>
|
|
38
|
+
<a href="https://github.com/kjanat/procclean/releases"><img src="https://img.shields.io/github/v/release/kjanat/procclean" alt="Release"></a>
|
|
39
|
+
<img src="https://img.shields.io/badge/python-3.14%2B-blue" alt="Python 3.14+">
|
|
40
|
+
<img src="https://img.shields.io/badge/platform-linux-lightgrey" alt="Linux">
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- **Memory overview** - Real-time total/used/free/swap display
|
|
46
|
+
- **Multiple views** - All processes, Orphaned, Process Groups, High Memory
|
|
47
|
+
(>500MB)
|
|
48
|
+
- **Orphan detection** - Finds processes whose parent died (PPID=1)
|
|
49
|
+
- **Tmux awareness** - Won't flag tmux processes as orphan candidates
|
|
50
|
+
- **Batch operations** - Select multiple processes and kill them at once
|
|
51
|
+
- **Process grouping** - Find duplicate/similar processes consuming resources
|
|
52
|
+
- **CLI mode** - Scriptable commands with JSON/CSV/Markdown output
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uv tool install git+https://github.com/kjanat/procclean
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or run directly:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uvx git+https://github.com/kjanat/procclean
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
### TUI Mode (default)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
procclean
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### CLI Commands
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
procclean list # List processes (table)
|
|
78
|
+
procclean list -f json|csv|md # Different output formats
|
|
79
|
+
procclean list -s mem|cpu|pid|name|cwd # Sort by field
|
|
80
|
+
procclean list -o # Orphans only
|
|
81
|
+
procclean list -m # High memory only
|
|
82
|
+
procclean list -k # Killable orphans only
|
|
83
|
+
procclean list --cwd # Filter by current directory
|
|
84
|
+
procclean list --cwd /path/to/dir # Filter by specific cwd
|
|
85
|
+
|
|
86
|
+
procclean groups # Show process groups
|
|
87
|
+
|
|
88
|
+
procclean kill <PID> [PID...] # Kill process(es)
|
|
89
|
+
procclean kill -f <PID> # Force kill (SIGKILL)
|
|
90
|
+
procclean kill --cwd /path -y # Kill all in cwd (skip confirm)
|
|
91
|
+
procclean kill -k -y # Kill all killable orphans
|
|
92
|
+
procclean kill -k --preview # Preview what would be killed
|
|
93
|
+
|
|
94
|
+
procclean mem # Show memory summary
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## TUI Keybindings
|
|
98
|
+
|
|
99
|
+
| Key | Action |
|
|
100
|
+
| ------- | ----------------------- |
|
|
101
|
+
| `q` | Quit |
|
|
102
|
+
| `r` | Refresh |
|
|
103
|
+
| `k` | Kill selected (SIGTERM) |
|
|
104
|
+
| `K` | Force kill (SIGKILL) |
|
|
105
|
+
| `o` | Show orphans |
|
|
106
|
+
| `a` | Show all |
|
|
107
|
+
| `g` | Show groups |
|
|
108
|
+
| `w` | Filter by selected cwd |
|
|
109
|
+
| `W` | Clear cwd filter |
|
|
110
|
+
| `Space` | Toggle selection |
|
|
111
|
+
| `s` | Select all visible |
|
|
112
|
+
| `c` | Clear selection |
|
|
113
|
+
| `1` | Sort by memory |
|
|
114
|
+
| `2` | Sort by CPU |
|
|
115
|
+
| `3` | Sort by PID |
|
|
116
|
+
| `4` | Sort by name |
|
|
117
|
+
| `5` | Sort by cwd |
|
|
118
|
+
| `!` | Reverse sort order |
|
|
119
|
+
|
|
120
|
+
## Views
|
|
121
|
+
|
|
122
|
+
- **All Processes** - All user processes sorted by memory usage
|
|
123
|
+
- **Orphaned** - Processes with PPID=1 (parent died)
|
|
124
|
+
- **Process Groups** - Similar processes grouped together
|
|
125
|
+
- **High Memory** - Processes using >500MB RAM
|
|
126
|
+
|
|
127
|
+
## Output Formats
|
|
128
|
+
|
|
129
|
+
CLI supports multiple output formats via `-f`:
|
|
130
|
+
|
|
131
|
+
- `table` - Human-readable table (default)
|
|
132
|
+
- `json` - JSON array for scripting
|
|
133
|
+
- `csv` - CSV for spreadsheets
|
|
134
|
+
- `md` - Markdown table
|
|
135
|
+
|
|
136
|
+
## Requirements
|
|
137
|
+
|
|
138
|
+
- Python 3.14+
|
|
139
|
+
- Linux (uses `/proc` filesystem)
|
|
140
|
+
|
|
141
|
+
## Development
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
git clone https://github.com/kjanat/procclean
|
|
145
|
+
cd procclean
|
|
146
|
+
uv sync
|
|
147
|
+
uv run pre-commit install
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Run tests:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
uv run pytest
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## License
|
|
157
|
+
|
|
158
|
+
[MIT][license]
|
|
159
|
+
|
|
160
|
+
<!--link definitions-->
|
|
161
|
+
|
|
162
|
+
[license]: https://github.com/kjanat/procclean/blob/master/LICENSE "MIT License"
|
|
163
|
+
|
|
164
|
+
<!--markdownlint-disable-file MD033 MD041-->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
procclean/__init__.py,sha256=YyRVnhYdw4MxUN8Udy1pstiFvk4a8Jmhddcqb7G1GEA,285
|
|
2
|
+
procclean/__main__.py,sha256=pdGAWxkFy_Z_nNhidh9byADmjaeG-V9XYnAP4xB3lmY,484
|
|
3
|
+
procclean/cli/__init__.py,sha256=I53tbb-1yS5UYDOYLjoPU7noWLpXQkCmM2lAsEGG7_w,508
|
|
4
|
+
procclean/cli/commands.py,sha256=K39jPVDrbL7nB9DVM_g8XtFjlWtaxiOs9XPkb_uUplM,6273
|
|
5
|
+
procclean/cli/docs.py,sha256=96WREAqXj8H58UTNiC0nhjcE9k-wGX1g1NZPGBWW7CQ,6914
|
|
6
|
+
procclean/cli/parser.py,sha256=WSs1KuUVI1_oX6tQLqR_vk7rDd33i_14IVa3287RVTE,7288
|
|
7
|
+
procclean/core/__init__.py,sha256=W0IRYS8YZ520BbF6ilJLsJAgdh8VuakZYZojVrI5OWA,1101
|
|
8
|
+
procclean/core/actions.py,sha256=Nng-JH7V9siKESKCNHK0ry5FQdnva1Kuk0MLrA-rstQ,1355
|
|
9
|
+
procclean/core/constants.py,sha256=FmK3AclNks7mfiEPc_ZVD5oicjV-4IkenL_QMtCWGUc,1153
|
|
10
|
+
procclean/core/filters.py,sha256=-OdApU9-AImoaE4iSOr7Fvu3xYR7JiCUYniBhfvVCBY,3615
|
|
11
|
+
procclean/core/memory.py,sha256=5gxklhSKuO2Lj8yE3kpLKEwrUI662vtt5upFtMWWICc,612
|
|
12
|
+
procclean/core/models.py,sha256=W-yf8vqQmw9uPmmgeJUKgVEelFEP_vL4-BHHhtv6Pc8,543
|
|
13
|
+
procclean/core/process.py,sha256=_N0NAKAJ-8cFqxtNyU-grOjhTMjB-rds_NTVRMbBy7g,4776
|
|
14
|
+
procclean/formatters/__init__.py,sha256=mM_0CsmGSLRWVEas8em4V7sO-K5_jFh8saAYSSV2Zjc,543
|
|
15
|
+
procclean/formatters/columns.py,sha256=0_31LHuBmAvfBeJhYnROEJWSQB_na1sFc9Y80PTb_Qk,3746
|
|
16
|
+
procclean/formatters/output.py,sha256=S96aBExjaweiM5AZs_xElfNk2mbkI_H6fVevHUb8jOs,4219
|
|
17
|
+
procclean/tui/__init__.py,sha256=42e6Okz0AFJcufor6JU2sdz6HLXe1F0t1vNyYoFzxQI,164
|
|
18
|
+
procclean/tui/app.py,sha256=kB6K4upeHz_1xJbLm_Gk3eUdMAm09qfQ3_S-E8D4aJQ,14373
|
|
19
|
+
procclean/tui/app.tcss,sha256=-NSXg36SElKI13SK1gODEtpCGUUA2VidDHFinM0nsME,1193
|
|
20
|
+
procclean/tui/screens.py,sha256=-9qEnNh0vFBwbCiy-AGc6KHqiCcd4cVeCMwPuGwRyRU,2835
|
|
21
|
+
procclean-1.2.0.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
|
|
22
|
+
procclean-1.2.0.dist-info/entry_points.txt,sha256=DxGPdOkSb5p08m6jwChimklZbBs9ZksG9HRIi50cmzM,46
|
|
23
|
+
procclean-1.2.0.dist-info/METADATA,sha256=07lgCDa7tr6iw6a0w6mvwPotWl4vazQ3MVEN9wK6ivg,5099
|
|
24
|
+
procclean-1.2.0.dist-info/RECORD,,
|