killpy 0.17.0__tar.gz → 0.18.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.
- {killpy-0.17.0 → killpy-0.18.0}/PKG-INFO +181 -98
- {killpy-0.17.0 → killpy-0.18.0}/README.md +176 -96
- killpy-0.18.0/killpy/__main__.py +115 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/cli.py +277 -19
- {killpy-0.17.0 → killpy-0.18.0}/killpy/commands/list.py +18 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/models.py +2 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/scanner.py +47 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/PKG-INFO +181 -98
- {killpy-0.17.0 → killpy-0.18.0}/pyproject.toml +9 -3
- killpy-0.17.0/killpy/__main__.py +0 -33
- {killpy-0.17.0 → killpy-0.18.0}/killpy/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/cleaner.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/cleaners/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/commands/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/commands/clean.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/commands/delete.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/commands/stats.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/artifacts.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/base.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/cache.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/conda.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/hatch.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/pipenv.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/pipx.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/poetry.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/pyenv.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/tox.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/uv.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/detectors/venv.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy/files/__init__.py +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/SOURCES.txt +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/dependency_links.txt +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/entry_points.txt +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/requires.txt +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/killpy.egg-info/top_level.txt +0 -0
- {killpy-0.17.0 → killpy-0.18.0}/setup.cfg +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: killpy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.0
|
|
4
4
|
Summary: List all .venv directories and Conda environments 🐍 on your system and check how much space they are using. You can then choose which ones to delete in order to free up space 🧹.
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
7
9
|
Classifier: Programming Language :: Python :: 3.12
|
|
8
|
-
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Requires-Python: >=3.10
|
|
9
12
|
Description-Content-Type: text/markdown
|
|
10
13
|
Requires-Dist: click>=8.1.8
|
|
11
14
|
Requires-Dist: rich>=13.9.4
|
|
@@ -13,14 +16,16 @@ Requires-Dist: textual>=1.0.0
|
|
|
13
16
|
|
|
14
17
|
<div align="center">
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+

|
|
17
20
|
|
|
18
21
|
### Reclaim disk space by finding and deleting Python environments you no longer use
|
|
19
22
|
|
|
20
23
|
[](https://pypi.org/project/killpy/)
|
|
24
|
+
[](https://pypi.org/project/killpy/)
|
|
21
25
|
[](https://pepy.tech/project/killpy)
|
|
22
26
|
[](https://github.com/Tlaloc-Es/killpy/stargazers)
|
|
23
27
|
[](https://codecov.io/gh/Tlaloc-Es/killpy)
|
|
28
|
+
[](LICENSE)
|
|
24
29
|
[](<https://twitter.com/intent/tweet?text=%F0%9F%90%8D%20KillPy%20helps%20you%20reclaim%20disk%20space%20by%20detecting%20unused%20Python%20environments%20(.venv,%20poetry%20env,%20conda%20env)%20and%20pipx%20packages.%20Clean,%20organize%20and%20free%20up%20space%20effortlessly!%20%F0%9F%9A%80&url=https://github.com/Tlaloc-Es/KillPy>)
|
|
25
30
|
|
|
26
31
|

|
|
@@ -37,13 +42,14 @@ Every project gets a `.venv`. Every tutorial leaves a Conda environment behind.
|
|
|
37
42
|
|
|
38
43
|
**None of these get cleaned up automatically.**
|
|
39
44
|
|
|
40
|
-
A typical developer machine accumulates **10
|
|
45
|
+
A typical developer machine accumulates **10–40 GB** of Python environments over a few years — most of them abandoned and completely useless.
|
|
41
46
|
|
|
42
|
-
`killpy` scans your filesystem, shows you everything with its size, and lets you delete it — either from
|
|
47
|
+
`killpy` scans your filesystem, shows you everything with its size, and lets you delete it — either from a slick interactive terminal UI or via a single headless command.
|
|
43
48
|
|
|
44
49
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
pipx run killpy --path ~
|
|
51
|
+
# or
|
|
52
|
+
uvx killpy --path ~
|
|
47
53
|
```
|
|
48
54
|
|
|
49
55
|
______________________________________________________________________
|
|
@@ -70,81 +76,159 @@ ______________________________________________________________________
|
|
|
70
76
|
|
|
71
77
|
## Quickstart
|
|
72
78
|
|
|
73
|
-
**
|
|
79
|
+
**Instant run — no install needed:**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pipx run killpy
|
|
83
|
+
# or
|
|
84
|
+
uvx killpy
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Install permanently:**
|
|
74
88
|
|
|
75
89
|
```bash
|
|
76
90
|
pip install killpy
|
|
91
|
+
# or
|
|
92
|
+
pipx install killpy
|
|
93
|
+
# or
|
|
94
|
+
uv tool install killpy
|
|
77
95
|
```
|
|
78
96
|
|
|
79
|
-
**
|
|
97
|
+
**Scan current directory:**
|
|
80
98
|
|
|
81
99
|
```bash
|
|
82
100
|
killpy
|
|
83
101
|
```
|
|
84
102
|
|
|
85
|
-
**Scan your entire home folder
|
|
103
|
+
**Scan your entire home folder:**
|
|
86
104
|
|
|
87
105
|
```bash
|
|
88
106
|
killpy --path ~
|
|
89
107
|
```
|
|
90
108
|
|
|
91
|
-
**
|
|
109
|
+
**Exclude paths matching a pattern:**
|
|
92
110
|
|
|
93
111
|
```bash
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
killpy --path ~ --exclude "backups,archive,work"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Delete everything non-interactively (CI / scripts):**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
killpy --path ~/projects --delete-all --yes
|
|
97
119
|
```
|
|
98
120
|
|
|
99
121
|
______________________________________________________________________
|
|
100
122
|
|
|
101
123
|
## Interactive TUI
|
|
102
124
|
|
|
103
|
-
Launch the terminal UI to browse and delete environments visually:
|
|
104
|
-
|
|
105
125
|
```bash
|
|
106
126
|
killpy
|
|
107
127
|
killpy --path /path/to/scan
|
|
128
|
+
killpy --path ~ --exclude "company-projects"
|
|
108
129
|
```
|
|
109
130
|
|
|
110
|
-
The TUI starts immediately and streams results as
|
|
131
|
+
The TUI starts immediately and streams results as each detector finishes — no waiting for a full scan before you can start browsing. Select items, mark them, and confirm; **nothing is deleted without explicit action**.
|
|
132
|
+
|
|
133
|
+
Environments flagged with `⚠️` are actively in use by the current Python session — killpy will show them but they should not be deleted.
|
|
111
134
|
|
|
112
135
|
### Keyboard shortcuts
|
|
113
136
|
|
|
114
137
|
| Key | Action |
|
|
115
138
|
|-----|--------|
|
|
139
|
+
| `↑` / `↓` or `k` / `j` | Move cursor up / down (vim-style) |
|
|
140
|
+
| `/` | Open live search/filter bar (regex supported) |
|
|
141
|
+
| `Escape` | Close search bar and clear filter |
|
|
142
|
+
| `T` | Toggle multi-select mode on / off |
|
|
143
|
+
| `Space` | *(Multi-select)* Toggle current row selected |
|
|
144
|
+
| `A` | *(Multi-select)* Select all visible / deselect all |
|
|
145
|
+
| `D` | Mark highlighted item for deletion |
|
|
146
|
+
| `Ctrl+D` | Delete all marked items (or all selected in multi-select mode) |
|
|
147
|
+
| `Shift+Delete` | Delete highlighted item immediately, no mark step |
|
|
148
|
+
| `o` | Open the item's parent folder in the OS file manager |
|
|
149
|
+
| `P` | Remove all `__pycache__` folders under the scanned path |
|
|
150
|
+
| `U` | Uninstall the selected `pipx` package |
|
|
116
151
|
| `Ctrl+Q` | Quit |
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
|
|
153
|
+
### Search / filter
|
|
154
|
+
|
|
155
|
+
Press `/` to open the filter bar at the bottom of the screen. Type any string or a Python regex — the venv table updates live as you type. Press `Escape` or submit an empty value to clear the filter and return to the full list.
|
|
156
|
+
|
|
157
|
+
### Multi-select mode
|
|
158
|
+
|
|
159
|
+
Press `T` to enter multi-select mode. A status bar shows the current selection count.
|
|
160
|
+
|
|
161
|
+
- `Space` — toggle the highlighted row
|
|
162
|
+
- `A` — select all visible non-deleted rows (press again to deselect all)
|
|
163
|
+
- `Ctrl+D` — delete every selected row in one operation
|
|
164
|
+
- `T` again — exit multi-select mode (selection is cleared)
|
|
165
|
+
|
|
166
|
+
Multi-select coexists with the existing `D` / `Ctrl+D` mark-and-delete flow — both work independently.
|
|
122
167
|
|
|
123
168
|
______________________________________________________________________
|
|
124
169
|
|
|
125
170
|
## CLI reference
|
|
126
171
|
|
|
172
|
+
### `killpy` — launch TUI or headless delete
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Usage: killpy [OPTIONS] COMMAND [ARGS]...
|
|
176
|
+
|
|
177
|
+
Options:
|
|
178
|
+
--path DIRECTORY Root directory to scan [default: cwd]
|
|
179
|
+
-E, --exclude TEXT Comma-separated path patterns to skip
|
|
180
|
+
e.g. --exclude "backups,legacy"
|
|
181
|
+
-D, --delete-all Scan and delete ALL found environments without
|
|
182
|
+
launching the TUI
|
|
183
|
+
-y, --yes Skip confirmation prompt (use with --delete-all)
|
|
184
|
+
--help Show this message and exit.
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Examples:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
killpy # TUI, scan cwd
|
|
191
|
+
killpy --path ~ # TUI, scan home
|
|
192
|
+
killpy --path ~/projects --exclude "legacy" # TUI, skip paths with "legacy"
|
|
193
|
+
killpy --path ~/projects --delete-all # headless, with confirmation
|
|
194
|
+
killpy --path ~/projects --delete-all --yes # fully automated, no prompt
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
______________________________________________________________________
|
|
198
|
+
|
|
127
199
|
### `killpy list` — inspect environments
|
|
128
200
|
|
|
129
201
|
```bash
|
|
130
|
-
killpy list
|
|
131
|
-
killpy list --path ~/projects
|
|
132
|
-
killpy list --type venv --type conda
|
|
133
|
-
killpy list --older-than 90
|
|
134
|
-
killpy list --json
|
|
202
|
+
killpy list # list all detected environments
|
|
203
|
+
killpy list --path ~/projects # scan a specific path
|
|
204
|
+
killpy list --type venv --type conda # filter by type (repeatable)
|
|
205
|
+
killpy list --older-than 90 # not accessed in the last 90 days
|
|
206
|
+
killpy list --json # output as a JSON array
|
|
207
|
+
killpy list --json-stream # stream as NDJSON — one line per env
|
|
135
208
|
```
|
|
136
209
|
|
|
210
|
+
`--json-stream` is ideal for piping into `jq` or processing in scripts before the full scan completes:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
killpy list --json-stream --path ~ | jq 'select(.type == "conda") | .size_human'
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
______________________________________________________________________
|
|
217
|
+
|
|
137
218
|
### `killpy delete` — remove environments
|
|
138
219
|
|
|
139
220
|
```bash
|
|
140
|
-
killpy delete
|
|
141
|
-
killpy delete --yes
|
|
142
|
-
killpy delete --dry-run
|
|
143
|
-
killpy delete --type venv
|
|
144
|
-
killpy delete --
|
|
221
|
+
killpy delete # interactive confirmation before delete
|
|
222
|
+
killpy delete --yes # skip confirmation
|
|
223
|
+
killpy delete --dry-run # preview — nothing is deleted
|
|
224
|
+
killpy delete --type venv # only a specific type
|
|
225
|
+
killpy delete --type venv --type cache # multiple types
|
|
226
|
+
killpy delete --older-than 180 --yes # delete stale envs, no prompt
|
|
145
227
|
killpy delete --path ~/projects
|
|
146
228
|
```
|
|
147
229
|
|
|
230
|
+
______________________________________________________________________
|
|
231
|
+
|
|
148
232
|
### `killpy stats` — disk usage summary
|
|
149
233
|
|
|
150
234
|
```bash
|
|
@@ -169,6 +253,8 @@ Example output:
|
|
|
169
253
|
Total: 66 environment(s) — 7.9 GB
|
|
170
254
|
```
|
|
171
255
|
|
|
256
|
+
______________________________________________________________________
|
|
257
|
+
|
|
172
258
|
### `killpy clean` — remove cache directories
|
|
173
259
|
|
|
174
260
|
```bash
|
|
@@ -176,19 +262,19 @@ killpy clean
|
|
|
176
262
|
killpy clean --path ~/projects
|
|
177
263
|
```
|
|
178
264
|
|
|
179
|
-
Removes `__pycache__` directories recursively
|
|
265
|
+
Removes `__pycache__` directories recursively under the target path.
|
|
180
266
|
|
|
181
267
|
______________________________________________________________________
|
|
182
268
|
|
|
183
269
|
## killpy vs alternatives
|
|
184
270
|
|
|
185
|
-
| Tool | venv | conda | poetry | pipx | pyenv | caches | artifacts | TUI |
|
|
186
|
-
|
|
187
|
-
| **killpy** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
188
|
-
| `pyclean` | ❌ | ❌ | ❌ | ❌ | ❌ | `__pycache__` only | ❌ | ❌ |
|
|
189
|
-
| `conda clean` | ❌ | partial | ❌ | ❌ | ❌ | conda only | ❌ | ❌ |
|
|
190
|
-
| `pip cache purge` | ❌ | ❌ | ❌ | ❌ | ❌ | pip only | ❌ | ❌ |
|
|
191
|
-
| `find . -name .venv -exec rm` | venv only | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
271
|
+
| Tool | venv | conda | poetry | pipx | pyenv | caches | artifacts | TUI | search | multi-select |
|
|
272
|
+
|------|:----:|:-----:|:------:|:----:|:-----:|:------:|:---------:|:---:|:------:|:------------:|
|
|
273
|
+
| **killpy** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
274
|
+
| `pyclean` | ❌ | ❌ | ❌ | ❌ | ❌ | `__pycache__` only | ❌ | ❌ | ❌ | ❌ |
|
|
275
|
+
| `conda clean` | ❌ | partial | ❌ | ❌ | ❌ | conda only | ❌ | ❌ | ❌ | ❌ |
|
|
276
|
+
| `pip cache purge` | ❌ | ❌ | ❌ | ❌ | ❌ | pip only | ❌ | ❌ | ❌ | ❌ |
|
|
277
|
+
| `find . -name .venv -exec rm` | venv only | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
192
278
|
|
|
193
279
|
No other single tool discovers, sizes, and removes environments across **all** major Python toolchains.
|
|
194
280
|
|
|
@@ -198,15 +284,45 @@ ______________________________________________________________________
|
|
|
198
284
|
|
|
199
285
|
**My Mac/Linux disk is almost full — can killpy help?**
|
|
200
286
|
|
|
201
|
-
Yes. Run `killpy --path ~` to scan your home folder. The `stats` command gives an immediate breakdown of how many GB each env type is
|
|
287
|
+
Yes. Run `killpy --path ~` to scan your home folder. The `stats` command gives an immediate breakdown of how many GB each env type is consuming. Most developers reclaim 5–30 GB.
|
|
202
288
|
|
|
203
|
-
**How do I delete all unused
|
|
289
|
+
**How do I delete all unused virtual environments at once?**
|
|
204
290
|
|
|
205
291
|
```bash
|
|
206
292
|
killpy delete --type venv --older-than 90 --yes
|
|
207
293
|
```
|
|
208
294
|
|
|
209
|
-
|
|
295
|
+
Deletes every `.venv` / `pyvenv.cfg` env not accessed in the last 90 days, without prompting.
|
|
296
|
+
|
|
297
|
+
**How do I use killpy in a CI pipeline or script?**
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# List as machine-readable JSON
|
|
301
|
+
killpy list --json
|
|
302
|
+
|
|
303
|
+
# Stream results as NDJSON in real time
|
|
304
|
+
killpy list --json-stream | jq '.size_bytes'
|
|
305
|
+
|
|
306
|
+
# Delete everything without a TUI
|
|
307
|
+
killpy --path ./build_artifacts --delete-all --yes
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**How do I skip certain directories?**
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
killpy --path ~ --exclude "company,production,do-not-touch"
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Any environment whose path contains one of the comma-separated patterns is silently skipped.
|
|
317
|
+
|
|
318
|
+
**How do I clean up Poetry virtualenvs?**
|
|
319
|
+
|
|
320
|
+
Poetry stores virtualenvs in `~/.cache/pypoetry/virtualenvs`. killpy detects and deletes them automatically — no manual path hunting required.
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
killpy list --type poetry
|
|
324
|
+
killpy delete --type poetry --older-than 60
|
|
325
|
+
```
|
|
210
326
|
|
|
211
327
|
**How do I find all `.venv` folders on my computer?**
|
|
212
328
|
|
|
@@ -229,9 +345,13 @@ killpy delete --type conda # delete selected
|
|
|
229
345
|
|
|
230
346
|
`killpy` runs `conda env list` internally and lets you delete individual environments. Alternatively, `killpy --path ~` will surface them in the TUI.
|
|
231
347
|
|
|
232
|
-
**
|
|
348
|
+
**Can I combine filters?**
|
|
349
|
+
|
|
350
|
+
Yes. For example:
|
|
233
351
|
|
|
234
|
-
|
|
352
|
+
```bash
|
|
353
|
+
killpy delete --type venv --older-than 90 --dry-run
|
|
354
|
+
```
|
|
235
355
|
|
|
236
356
|
**How do I remove all `__pycache__` folders recursively?**
|
|
237
357
|
|
|
@@ -239,35 +359,19 @@ Poetry stores virtualenvs in `~/.cache/pypoetry/virtualenvs`. `killpy` detects a
|
|
|
239
359
|
killpy clean --path /path/to/project
|
|
240
360
|
```
|
|
241
361
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
## Safety
|
|
245
|
-
|
|
246
|
-
`killpy` performs destructive actions (environment/package/cache deletion).
|
|
247
|
-
Always review selected items before confirming removal.
|
|
248
|
-
You are responsible for files deleted on your system.
|
|
362
|
+
Or press `P` in the TUI to clean them for the scanned path.
|
|
249
363
|
|
|
250
|
-
|
|
364
|
+
**What does ⚠️ mean next to an environment?**
|
|
251
365
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
```yml
|
|
255
|
-
- repo: https://github.com/Tlaloc-Es/KillPy
|
|
256
|
-
rev: 0.15.7
|
|
257
|
-
hooks:
|
|
258
|
-
- id: killpy
|
|
259
|
-
pass_filenames: false
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## FAQ
|
|
366
|
+
The environment is currently in use by the Python session running killpy. It should not be deleted. killpy will still show it so you are aware of it, but treat it with care.
|
|
263
367
|
|
|
264
368
|
**Does it fail if Conda, pipx or pyenv are not installed?**
|
|
265
369
|
|
|
266
|
-
Missing tools are handled gracefully — that detector is simply skipped. You get results for everything that is available.
|
|
370
|
+
No. Missing tools are handled gracefully — that detector is simply skipped. You get results for everything that is available on the system.
|
|
267
371
|
|
|
268
|
-
**Does
|
|
372
|
+
**Does killpy auto-delete anything?**
|
|
269
373
|
|
|
270
|
-
Never. Deletion always requires an explicit action: a key press in the TUI, `--yes` on the CLI, or an interactive prompt.
|
|
374
|
+
Never. Deletion always requires an explicit action: a key press in the TUI, `--yes` on the CLI, or an interactive prompt. killpy is fully read-only on startup.
|
|
271
375
|
|
|
272
376
|
**Can I preview what would be deleted without actually deleting?**
|
|
273
377
|
|
|
@@ -277,21 +381,9 @@ killpy delete --dry-run
|
|
|
277
381
|
|
|
278
382
|
Nothing is removed. You see exactly what would happen.
|
|
279
383
|
|
|
280
|
-
**Can I use it in CI or scripts?**
|
|
281
|
-
|
|
282
|
-
Yes. `killpy list --json` is machine-readable. `killpy delete --yes` skips all prompts.
|
|
283
|
-
|
|
284
|
-
**Can I combine filters?**
|
|
285
|
-
|
|
286
|
-
Yes. For example:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
killpy delete --type venv --older-than 90 --dry-run
|
|
290
|
-
```
|
|
291
|
-
|
|
292
384
|
**Why is Python using so much disk space?**
|
|
293
385
|
|
|
294
|
-
Each virtual environment is a full copy (or symlinked tree) of a Python interpreter plus all installed packages. A typical project `.venv` with common dependencies
|
|
386
|
+
Each virtual environment is a full copy (or symlinked tree) of a Python interpreter plus all installed packages. A typical project `.venv` with common dependencies weighs 200 MB–1 GB. Multiply by dozens of projects and you get tens of gigabytes — all orphaned when the project is archived.
|
|
295
387
|
|
|
296
388
|
______________________________________________________________________
|
|
297
389
|
|
|
@@ -301,7 +393,7 @@ Keep your repo free of `__pycache__` on every commit:
|
|
|
301
393
|
|
|
302
394
|
```yaml
|
|
303
395
|
- repo: https://github.com/Tlaloc-Es/KillPy
|
|
304
|
-
rev: 0.
|
|
396
|
+
rev: 0.16.0
|
|
305
397
|
hooks:
|
|
306
398
|
- id: killpy
|
|
307
399
|
pass_filenames: false
|
|
@@ -311,10 +403,9 @@ ______________________________________________________________________
|
|
|
311
403
|
|
|
312
404
|
## Safety
|
|
313
405
|
|
|
314
|
-
`killpy` performs **destructive, irreversible** actions.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
You are responsible for files deleted on your system.
|
|
406
|
+
`killpy` performs **destructive, irreversible** actions. Always review the selection before confirming removal. The `--dry-run` flag lets you preview everything safely. Environments marked `⚠️` are actively in use and should not be deleted.
|
|
407
|
+
|
|
408
|
+
**You are responsible for files deleted on your system.**
|
|
318
409
|
|
|
319
410
|
______________________________________________________________________
|
|
320
411
|
|
|
@@ -324,35 +415,27 @@ ______________________________________________________________________
|
|
|
324
415
|
- [ ] `killpy list --sort size|date|name`
|
|
325
416
|
- [ ] `killpy delete --interactive` — checkbox-style selector in the CLI
|
|
326
417
|
- [ ] Shell completions (bash, zsh, fish)
|
|
327
|
-
- [ ] TUI: filter panel, live progress bar, confirmation dialog with total bytes
|
|
328
418
|
- [ ] Config file (`~/.config/killpy/config.toml`) for default scan path and ignored dirs
|
|
329
419
|
- [ ] `killpy export` — save scan results to JSON/CSV for auditing
|
|
330
420
|
- [ ] Windows support improvements (pyenv-win, conda on Windows PATH)
|
|
421
|
+
- [ ] TUI: filter panel, live progress bar, confirmation dialog with total bytes before delete
|
|
331
422
|
- [ ] Detect unused dependencies inside `pyproject.toml` / `requirements.txt`
|
|
332
423
|
|
|
333
424
|
______________________________________________________________________
|
|
334
425
|
|
|
335
426
|
## Contributing
|
|
336
427
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
1. Fork the repository
|
|
340
|
-
1. Create a branch: `git checkout -b my-feature`
|
|
341
|
-
1. Commit your changes: `git commit -m 'Add my feature'`
|
|
342
|
-
1. Run the tests: `uv run pytest`
|
|
343
|
-
1. Push your branch: `git push origin my-feature`
|
|
344
|
-
1. Open a pull request
|
|
345
|
-
|
|
346
|
-
Project behavior and guardrails are documented in [AGENTS.md](AGENTS.md).
|
|
347
|
-
|
|
348
|
-
Useful local checks:
|
|
428
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide — setup, workflow, how to add a new detector, and GIF recording instructions.
|
|
349
429
|
|
|
350
430
|
```bash
|
|
431
|
+
# Quick local checks
|
|
351
432
|
uv run python -m compileall killpy
|
|
352
433
|
uv run pytest
|
|
353
434
|
pre-commit run --all-files
|
|
354
435
|
```
|
|
355
436
|
|
|
437
|
+
Project architecture and guardrails are documented in [AGENTS.md](AGENTS.md).
|
|
438
|
+
|
|
356
439
|
______________________________________________________________________
|
|
357
440
|
|
|
358
441
|
## For AI assistants
|