purger 0.2.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.
Files changed (52) hide show
  1. purger-0.2.0/LICENSE +21 -0
  2. purger-0.2.0/PKG-INFO +179 -0
  3. purger-0.2.0/README.md +150 -0
  4. purger-0.2.0/pyproject.toml +199 -0
  5. purger-0.2.0/pyproject.toml.orig +175 -0
  6. purger-0.2.0/src/purger/__init__.py +3 -0
  7. purger-0.2.0/src/purger/clean_flow.py +178 -0
  8. purger-0.2.0/src/purger/cli.py +504 -0
  9. purger-0.2.0/src/purger/concurrency.py +55 -0
  10. purger-0.2.0/src/purger/execution.py +131 -0
  11. purger-0.2.0/src/purger/help_text.py +173 -0
  12. purger-0.2.0/src/purger/measure_display.py +72 -0
  13. purger-0.2.0/src/purger/output.py +221 -0
  14. purger-0.2.0/src/purger/plugin.py +112 -0
  15. purger-0.2.0/src/purger/plugins/__init__.py +1 -0
  16. purger-0.2.0/src/purger/plugins/_shared.py +45 -0
  17. purger-0.2.0/src/purger/plugins/_template.py +113 -0
  18. purger-0.2.0/src/purger/plugins/ansible.py +82 -0
  19. purger-0.2.0/src/purger/plugins/apt.py +29 -0
  20. purger-0.2.0/src/purger/plugins/brew.py +128 -0
  21. purger-0.2.0/src/purger/plugins/bun.py +71 -0
  22. purger-0.2.0/src/purger/plugins/cocoapods.py +33 -0
  23. purger-0.2.0/src/purger/plugins/conda.py +45 -0
  24. purger-0.2.0/src/purger/plugins/corepack.py +34 -0
  25. purger-0.2.0/src/purger/plugins/dnf.py +24 -0
  26. purger-0.2.0/src/purger/plugins/docker.py +113 -0
  27. purger-0.2.0/src/purger/plugins/flatpak.py +37 -0
  28. purger-0.2.0/src/purger/plugins/go.py +34 -0
  29. purger-0.2.0/src/purger/plugins/macports.py +43 -0
  30. purger-0.2.0/src/purger/plugins/maestro.py +63 -0
  31. purger-0.2.0/src/purger/plugins/mise.py +77 -0
  32. purger-0.2.0/src/purger/plugins/npm.py +65 -0
  33. purger-0.2.0/src/purger/plugins/pacman.py +57 -0
  34. purger-0.2.0/src/purger/plugins/pip.py +46 -0
  35. purger-0.2.0/src/purger/plugins/playwright.py +82 -0
  36. purger-0.2.0/src/purger/plugins/pnpm.py +70 -0
  37. purger-0.2.0/src/purger/plugins/podman.py +126 -0
  38. purger-0.2.0/src/purger/plugins/pre_commit.py +49 -0
  39. purger-0.2.0/src/purger/plugins/prek.py +27 -0
  40. purger-0.2.0/src/purger/plugins/rip2.py +45 -0
  41. purger-0.2.0/src/purger/plugins/simulators.py +78 -0
  42. purger-0.2.0/src/purger/plugins/swiftpm.py +37 -0
  43. purger-0.2.0/src/purger/plugins/thumbnails.py +20 -0
  44. purger-0.2.0/src/purger/plugins/trash.py +67 -0
  45. purger-0.2.0/src/purger/plugins/uv.py +35 -0
  46. purger-0.2.0/src/purger/plugins/xcode.py +35 -0
  47. purger-0.2.0/src/purger/plugins/yarn.py +55 -0
  48. purger-0.2.0/src/purger/registry.py +126 -0
  49. purger-0.2.0/src/purger/reports.py +70 -0
  50. purger-0.2.0/src/purger/runner.py +142 -0
  51. purger-0.2.0/src/purger/safety.py +176 -0
  52. purger-0.2.0/src/purger/sizing.py +354 -0
purger-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nate Landau
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.
purger-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.4
2
+ Name: purger
3
+ Version: 0.2.0
4
+ Summary: Find and clean rebuildable developer caches to free disk space.
5
+ Keywords: cache,cleanup,cli,disk-space,docker,homebrew,uv,xcode
6
+ Author: Nate Landau
7
+ Author-email: Nate Landau <github@natenate.org>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
+ Classifier: Topic :: System :: Filesystems
18
+ Classifier: Topic :: Utilities
19
+ Requires-Dist: cyclopts>=5.4.0,<6
20
+ Requires-Dist: nclutils>=4.0.0,<5.0.0
21
+ Requires-Dist: psutil>=7.0.0,<8
22
+ Requires-Dist: rich>=15.0.0,<16
23
+ Requires-Python: >=3.13
24
+ Project-URL: Changelog, https://github.com/natelandau/purger/releases
25
+ Project-URL: Homepage, https://github.com/natelandau/purger
26
+ Project-URL: Issues, https://github.com/natelandau/purger/issues
27
+ Project-URL: Repository, https://github.com/natelandau/purger
28
+ Description-Content-Type: text/markdown
29
+
30
+ # purger
31
+
32
+ purger finds the caches that developer tools leave on your disk, shows how much space each cache uses, and removes the caches that you approve. It uses the cleanup command of each tool when the tool has one. It deletes a cache directory by hand only when no command exists, and only inside your home directory.
33
+
34
+ Without `--dangerous` and your explicit confirmation, purger never deletes your files, your projects, or data that cannot be rebuilt.
35
+
36
+ ## What purger cleans
37
+
38
+ purger runs on macOS and Linux. Each supported tool is a plugin, and each plugin has one or more cleanup actions.
39
+
40
+ - `ansible` (macOS, Linux): temp folders left by interrupted runs and the Galaxy cache, in `~/.ansible` and `$ANSIBLE_HOME`. Skipped while an ansible command runs.
41
+ - `apt` (Linux): downloaded package files. Both actions run with sudo.
42
+ - `brew` (macOS, Linux): old formula versions, the download cache, and dependencies that nothing needs anymore.
43
+ - `bun` (macOS, Linux): packages unused for 30 days, or the entire cache with `--dangerous`.
44
+ - `cocoapods` (macOS): the pod download cache.
45
+ - `conda` (macOS, Linux): downloaded package tarballs, packages that no environment uses, the index cache, and logs.
46
+ - `corepack` (macOS, Linux): downloaded yarn, pnpm, and npm versions.
47
+ - `dnf` (Linux): downloaded package files. Runs with sudo.
48
+ - `docker` (macOS, Linux): the build cache, unused images, stopped containers, unused networks, and unused volumes.
49
+ - `flatpak` (Linux): runtimes and extensions that no app uses, in your user installation and, with sudo, the system installation.
50
+ - `go` (macOS, Linux): the build cache and the module download cache.
51
+ - `macports` (macOS): build files, source archives, and inactive ports. Both actions run with sudo.
52
+ - `maestro` (macOS, Linux): logs, screenshots, and local recordings of past `maestro test` runs. Skipped while Maestro runs.
53
+ - `mise` (macOS, Linux): stale cache files and unused tool versions, or the entire cache with `--dangerous`.
54
+ - `npm` (macOS, Linux): unneeded cache data and the npx cache, or the entire cache with `--dangerous`.
55
+ - `pacman` (Linux): cached package versions beyond the newest 3, and every cached version of uninstalled packages. Needs `paccache` from pacman-contrib, and runs with sudo.
56
+ - `pip` (macOS, Linux): the download and wheel cache, even when pip is no longer installed.
57
+ - `playwright` (macOS, Linux): browser builds older than the newest of each browser.
58
+ - `pnpm` (macOS, Linux): store packages that no project uses, and registry metadata in formats the installed pnpm can no longer read.
59
+ - `podman` (macOS, Linux): unused images, stopped containers, pods, networks, and build cache, and unused volumes with `--dangerous`.
60
+ - `pre-commit` (macOS, Linux): unused hook repos, or the entire cache with `--dangerous`.
61
+ - `prek` (macOS, Linux): unused hook environments, or the entire cache with `--dangerous`.
62
+ - `rip2` (macOS, Linux): the rip2 graveyard of deleted files. Runs only when `rip` on PATH is rip2.
63
+ - `simulators` (macOS): simulator devices the installed Xcode cannot run.
64
+ - `swiftpm` (macOS, Linux): cached package clones, manifests, and binary frameworks.
65
+ - `thumbnails` (Linux): the desktop file thumbnail cache.
66
+ - `trash` (macOS, Linux): everything in the Trash in your home folder. On macOS, the terminal needs Full Disk Access.
67
+ - `uv` (macOS, Linux): unused cache entries, or the entire cache with `--dangerous`.
68
+ - `xcode` (macOS): build products, device debug symbols, and app archives.
69
+ - `yarn` (macOS, Linux): the global package cache, even when yarn is no longer installed.
70
+
71
+ purger skips a plugin when its tool is not installed, is not running, or does not apply to your platform. Run `purger clean --dry-run` to see the actions that would run, with their risk tiers.
72
+
73
+ ## Install
74
+
75
+ purger needs Python 3.13 or later.
76
+
77
+ To install purger with uv, run this command:
78
+
79
+ ```bash
80
+ uv tool install purger
81
+ ```
82
+
83
+ To install purger with pip, run this command:
84
+
85
+ ```bash
86
+ pip install purger
87
+ ```
88
+
89
+ Run purger as your normal user. purger refuses to run as root. It asks for sudo only for the actions that need it, such as the `apt` and `macports` actions.
90
+
91
+ ## Quick start
92
+
93
+ Start with `purger info`. It measures each cache and prints a table with one row for each tool: the size of its cache and a short description. A check in the `Partial purge` column means that a clean removes only part of that size. `purger info` deletes nothing.
94
+
95
+ ```bash
96
+ purger info
97
+ ```
98
+
99
+ Then run `purger clean`. It prints the same table, asks for confirmation, and runs the cleanups that you approve. At the end, it prints a table with the size of each cache before and after the clean, and the space that was freed.
100
+
101
+ ```bash
102
+ purger clean
103
+ ```
104
+
105
+ ## Commands
106
+
107
+ Both commands accept plugin names as arguments. Without names, a command uses every plugin.
108
+
109
+ ```bash
110
+ purger info uv brew # measure only the uv and Homebrew caches
111
+ purger clean xcode --dry-run # show what would be cleaned, change nothing
112
+ purger clean docker --dangerous # also offer to remove unused Docker volumes
113
+ ```
114
+
115
+ These options apply to both commands:
116
+
117
+ | Option | Effect |
118
+ | ------------- | ------------------------------------------------------------------------- |
119
+ | `--dangerous` | Include `dangerous` actions. Without it, purger hides them. |
120
+ | `--json` | Print exactly one JSON document on stdout instead of tables and messages. |
121
+ | `-v`, `-vv` | Show more detail, such as the output of the tool commands. |
122
+
123
+ These options apply to `purger clean` only:
124
+
125
+ | Option | Effect |
126
+ | ------------- | ------------------------------------------------------------------------------------ |
127
+ | `--dry-run` | List the commands and paths that would run. purger asks nothing and changes nothing. |
128
+ | `--yes`, `-y` | Skip the single prompt for `safe` actions. |
129
+
130
+ ## Risk tiers
131
+
132
+ Each cleanup action has one tier. The tier controls how purger asks for confirmation.
133
+
134
+ | Tier | Meaning | Confirmation |
135
+ | ----------- | ------------------------------------------------------------------------------------- | ----------------------------------------------- |
136
+ | `safe` | The tool rebuilds the cache cheaply and automatically. | One prompt for all `safe` actions. |
137
+ | `caution` | The cache can be rebuilt, but the rebuild is slow or a large download. | One prompt for each action. |
138
+ | `dangerous` | The action can destroy data that cannot be recreated, or it removes a complete cache. | Shown only with `--dangerous`. One prompt each. |
139
+
140
+ The `--yes` flag skips only the prompt for `safe` actions. A `caution` or `dangerous` action never runs unless a person answers its prompt.
141
+
142
+ > **Warning:** Docker `volumes` is a `dangerous` action. It deletes every volume that no container uses, which includes the data of local databases.
143
+
144
+ ## Use purger in scripts and agents
145
+
146
+ Add `--json` to a command to get exactly one JSON document on stdout. Every document has `"schema_version": 1`, and every size is an integer number of bytes.
147
+
148
+ ```bash
149
+ purger info --json
150
+ purger clean --json --yes
151
+ ```
152
+
153
+ `purger clean --json` never prompts. With `--yes`, it runs the `safe` actions only. It reports each `caution` and `dangerous` action as `declined`. Without a terminal, purger applies the same rules.
154
+
155
+ The help pages give the full document shape and the status values:
156
+
157
+ ```bash
158
+ purger info --help
159
+ purger clean --help
160
+ ```
161
+
162
+ ## Exit codes
163
+
164
+ Both commands use these exit codes:
165
+
166
+ | Code | Meaning |
167
+ | ----- | ----------------------------------------------------------------------- |
168
+ | `0` | Success. This includes a run where you declined every action. |
169
+ | `1` | An action that you approved failed. Only `purger clean` uses this code. |
170
+ | `2` | A usage error, such as an unknown plugin name or a run as root. |
171
+ | `130` | You pressed Ctrl-C. |
172
+
173
+ ## Contributing
174
+
175
+ To build purger, run the tests, or add a plugin, read [CONTRIBUTING.md](CONTRIBUTING.md).
176
+
177
+ ## License
178
+
179
+ purger is available under the [MIT License](LICENSE).
purger-0.2.0/README.md ADDED
@@ -0,0 +1,150 @@
1
+ # purger
2
+
3
+ purger finds the caches that developer tools leave on your disk, shows how much space each cache uses, and removes the caches that you approve. It uses the cleanup command of each tool when the tool has one. It deletes a cache directory by hand only when no command exists, and only inside your home directory.
4
+
5
+ Without `--dangerous` and your explicit confirmation, purger never deletes your files, your projects, or data that cannot be rebuilt.
6
+
7
+ ## What purger cleans
8
+
9
+ purger runs on macOS and Linux. Each supported tool is a plugin, and each plugin has one or more cleanup actions.
10
+
11
+ - `ansible` (macOS, Linux): temp folders left by interrupted runs and the Galaxy cache, in `~/.ansible` and `$ANSIBLE_HOME`. Skipped while an ansible command runs.
12
+ - `apt` (Linux): downloaded package files. Both actions run with sudo.
13
+ - `brew` (macOS, Linux): old formula versions, the download cache, and dependencies that nothing needs anymore.
14
+ - `bun` (macOS, Linux): packages unused for 30 days, or the entire cache with `--dangerous`.
15
+ - `cocoapods` (macOS): the pod download cache.
16
+ - `conda` (macOS, Linux): downloaded package tarballs, packages that no environment uses, the index cache, and logs.
17
+ - `corepack` (macOS, Linux): downloaded yarn, pnpm, and npm versions.
18
+ - `dnf` (Linux): downloaded package files. Runs with sudo.
19
+ - `docker` (macOS, Linux): the build cache, unused images, stopped containers, unused networks, and unused volumes.
20
+ - `flatpak` (Linux): runtimes and extensions that no app uses, in your user installation and, with sudo, the system installation.
21
+ - `go` (macOS, Linux): the build cache and the module download cache.
22
+ - `macports` (macOS): build files, source archives, and inactive ports. Both actions run with sudo.
23
+ - `maestro` (macOS, Linux): logs, screenshots, and local recordings of past `maestro test` runs. Skipped while Maestro runs.
24
+ - `mise` (macOS, Linux): stale cache files and unused tool versions, or the entire cache with `--dangerous`.
25
+ - `npm` (macOS, Linux): unneeded cache data and the npx cache, or the entire cache with `--dangerous`.
26
+ - `pacman` (Linux): cached package versions beyond the newest 3, and every cached version of uninstalled packages. Needs `paccache` from pacman-contrib, and runs with sudo.
27
+ - `pip` (macOS, Linux): the download and wheel cache, even when pip is no longer installed.
28
+ - `playwright` (macOS, Linux): browser builds older than the newest of each browser.
29
+ - `pnpm` (macOS, Linux): store packages that no project uses, and registry metadata in formats the installed pnpm can no longer read.
30
+ - `podman` (macOS, Linux): unused images, stopped containers, pods, networks, and build cache, and unused volumes with `--dangerous`.
31
+ - `pre-commit` (macOS, Linux): unused hook repos, or the entire cache with `--dangerous`.
32
+ - `prek` (macOS, Linux): unused hook environments, or the entire cache with `--dangerous`.
33
+ - `rip2` (macOS, Linux): the rip2 graveyard of deleted files. Runs only when `rip` on PATH is rip2.
34
+ - `simulators` (macOS): simulator devices the installed Xcode cannot run.
35
+ - `swiftpm` (macOS, Linux): cached package clones, manifests, and binary frameworks.
36
+ - `thumbnails` (Linux): the desktop file thumbnail cache.
37
+ - `trash` (macOS, Linux): everything in the Trash in your home folder. On macOS, the terminal needs Full Disk Access.
38
+ - `uv` (macOS, Linux): unused cache entries, or the entire cache with `--dangerous`.
39
+ - `xcode` (macOS): build products, device debug symbols, and app archives.
40
+ - `yarn` (macOS, Linux): the global package cache, even when yarn is no longer installed.
41
+
42
+ purger skips a plugin when its tool is not installed, is not running, or does not apply to your platform. Run `purger clean --dry-run` to see the actions that would run, with their risk tiers.
43
+
44
+ ## Install
45
+
46
+ purger needs Python 3.13 or later.
47
+
48
+ To install purger with uv, run this command:
49
+
50
+ ```bash
51
+ uv tool install purger
52
+ ```
53
+
54
+ To install purger with pip, run this command:
55
+
56
+ ```bash
57
+ pip install purger
58
+ ```
59
+
60
+ Run purger as your normal user. purger refuses to run as root. It asks for sudo only for the actions that need it, such as the `apt` and `macports` actions.
61
+
62
+ ## Quick start
63
+
64
+ Start with `purger info`. It measures each cache and prints a table with one row for each tool: the size of its cache and a short description. A check in the `Partial purge` column means that a clean removes only part of that size. `purger info` deletes nothing.
65
+
66
+ ```bash
67
+ purger info
68
+ ```
69
+
70
+ Then run `purger clean`. It prints the same table, asks for confirmation, and runs the cleanups that you approve. At the end, it prints a table with the size of each cache before and after the clean, and the space that was freed.
71
+
72
+ ```bash
73
+ purger clean
74
+ ```
75
+
76
+ ## Commands
77
+
78
+ Both commands accept plugin names as arguments. Without names, a command uses every plugin.
79
+
80
+ ```bash
81
+ purger info uv brew # measure only the uv and Homebrew caches
82
+ purger clean xcode --dry-run # show what would be cleaned, change nothing
83
+ purger clean docker --dangerous # also offer to remove unused Docker volumes
84
+ ```
85
+
86
+ These options apply to both commands:
87
+
88
+ | Option | Effect |
89
+ | ------------- | ------------------------------------------------------------------------- |
90
+ | `--dangerous` | Include `dangerous` actions. Without it, purger hides them. |
91
+ | `--json` | Print exactly one JSON document on stdout instead of tables and messages. |
92
+ | `-v`, `-vv` | Show more detail, such as the output of the tool commands. |
93
+
94
+ These options apply to `purger clean` only:
95
+
96
+ | Option | Effect |
97
+ | ------------- | ------------------------------------------------------------------------------------ |
98
+ | `--dry-run` | List the commands and paths that would run. purger asks nothing and changes nothing. |
99
+ | `--yes`, `-y` | Skip the single prompt for `safe` actions. |
100
+
101
+ ## Risk tiers
102
+
103
+ Each cleanup action has one tier. The tier controls how purger asks for confirmation.
104
+
105
+ | Tier | Meaning | Confirmation |
106
+ | ----------- | ------------------------------------------------------------------------------------- | ----------------------------------------------- |
107
+ | `safe` | The tool rebuilds the cache cheaply and automatically. | One prompt for all `safe` actions. |
108
+ | `caution` | The cache can be rebuilt, but the rebuild is slow or a large download. | One prompt for each action. |
109
+ | `dangerous` | The action can destroy data that cannot be recreated, or it removes a complete cache. | Shown only with `--dangerous`. One prompt each. |
110
+
111
+ The `--yes` flag skips only the prompt for `safe` actions. A `caution` or `dangerous` action never runs unless a person answers its prompt.
112
+
113
+ > **Warning:** Docker `volumes` is a `dangerous` action. It deletes every volume that no container uses, which includes the data of local databases.
114
+
115
+ ## Use purger in scripts and agents
116
+
117
+ Add `--json` to a command to get exactly one JSON document on stdout. Every document has `"schema_version": 1`, and every size is an integer number of bytes.
118
+
119
+ ```bash
120
+ purger info --json
121
+ purger clean --json --yes
122
+ ```
123
+
124
+ `purger clean --json` never prompts. With `--yes`, it runs the `safe` actions only. It reports each `caution` and `dangerous` action as `declined`. Without a terminal, purger applies the same rules.
125
+
126
+ The help pages give the full document shape and the status values:
127
+
128
+ ```bash
129
+ purger info --help
130
+ purger clean --help
131
+ ```
132
+
133
+ ## Exit codes
134
+
135
+ Both commands use these exit codes:
136
+
137
+ | Code | Meaning |
138
+ | ----- | ----------------------------------------------------------------------- |
139
+ | `0` | Success. This includes a run where you declined every action. |
140
+ | `1` | An action that you approved failed. Only `purger clean` uses this code. |
141
+ | `2` | A usage error, such as an unknown plugin name or a run as root. |
142
+ | `130` | You pressed Ctrl-C. |
143
+
144
+ ## Contributing
145
+
146
+ To build purger, run the tests, or add a plugin, read [CONTRIBUTING.md](CONTRIBUTING.md).
147
+
148
+ ## License
149
+
150
+ purger is available under the [MIT License](LICENSE).
@@ -0,0 +1,199 @@
1
+ [project]
2
+ classifiers = [
3
+ "Environment :: Console",
4
+ "Intended Audience :: Developers",
5
+ "Operating System :: MacOS",
6
+ "Operating System :: POSIX :: Linux",
7
+ "Programming Language :: Python :: 3.13",
8
+ "Programming Language :: Python :: 3.14",
9
+ "Programming Language :: Python :: 3.15",
10
+ "Topic :: System :: Filesystems",
11
+ "Topic :: Utilities",
12
+ ]
13
+ dependencies = [
14
+ "cyclopts>=5.4.0,<6",
15
+ "nclutils>=4.0.0,<5.0.0",
16
+ "psutil>=7.0.0,<8",
17
+ "rich>=15.0.0,<16",
18
+ ]
19
+ description = "Find and clean rebuildable developer caches to free disk space."
20
+ keywords = [
21
+ "cache",
22
+ "cleanup",
23
+ "cli",
24
+ "disk-space",
25
+ "docker",
26
+ "homebrew",
27
+ "uv",
28
+ "xcode",
29
+ ]
30
+ license = "MIT"
31
+ license-files = ["LICENSE"]
32
+ name = "purger"
33
+ readme = "README.md"
34
+ requires-python = ">=3.13"
35
+ version = "0.2.0"
36
+
37
+ [[project.authors]]
38
+ name = "Nate Landau"
39
+ email = "github@natenate.org"
40
+
41
+ [project.urls]
42
+ Changelog = "https://github.com/natelandau/purger/releases"
43
+ Homepage = "https://github.com/natelandau/purger"
44
+ Issues = "https://github.com/natelandau/purger/issues"
45
+ Repository = "https://github.com/natelandau/purger"
46
+
47
+ [project.scripts]
48
+ purger = "purger.cli:main"
49
+
50
+ [build-system]
51
+ build-backend = "uv_build"
52
+ requires = ["uv_build>=0.13.0,<0.14"]
53
+
54
+ [tool.uv.build-backend]
55
+ module-name = "purger"
56
+
57
+ [tool.commitizen]
58
+ bump_message = "bump(release): v$current_version → v$new_version"
59
+ changelog_merge_prerelease = true
60
+ major_version_zero = true
61
+ tag_format = "v$version"
62
+ update_changelog_on_bump = true
63
+ version_files = ["src/purger/__init__.py:__version__"]
64
+ version_provider = "uv"
65
+
66
+ [tool.coverage.report]
67
+ exclude_lines = [
68
+ "def __repr__",
69
+ "if TYPE_CHECKING",
70
+ "pragma: no cover",
71
+ ]
72
+ fail_under = 90
73
+ show_missing = true
74
+ skip_covered = true
75
+ skip_empty = true
76
+
77
+ [tool.coverage.run]
78
+ branch = true
79
+ command_line = "--module pytest"
80
+ data_file = ".cache/coverage"
81
+ omit = ["tests/*"]
82
+ source = ["src"]
83
+
84
+ [tool.coverage.xml]
85
+ output = ".cache/coverage.xml"
86
+
87
+ [tool.pytest.ini_options]
88
+ addopts = "--color=yes --strict-config --strict-markers -n auto --dist loadfile"
89
+ cache_dir = ".cache/pytest"
90
+ filterwarnings = ["error"]
91
+ testpaths = ["tests"]
92
+ xfail_strict = true
93
+
94
+ [tool.ruff]
95
+ exclude = [
96
+ ".cache",
97
+ ".git",
98
+ ".venv",
99
+ "build",
100
+ "dist",
101
+ ]
102
+ fix = true
103
+ line-length = 100
104
+ output-format = "grouped"
105
+ src = [
106
+ "src",
107
+ "tests",
108
+ ]
109
+ target-version = "py313"
110
+
111
+ [tool.ruff.lint]
112
+ ignore = [
113
+ "ANN002",
114
+ "ANN003",
115
+ "ANN204",
116
+ "COM812",
117
+ "CPY001",
118
+ "D107",
119
+ "E501",
120
+ "FIX002",
121
+ "PLC0415",
122
+ "TD001",
123
+ "TD002",
124
+ "TD003",
125
+ ]
126
+ select = ["ALL"]
127
+ unfixable = [
128
+ "ERA001",
129
+ "F401",
130
+ "F841",
131
+ ]
132
+
133
+ [tool.ruff.lint.per-file-ignores]
134
+ "tests/**/*.py" = [
135
+ "A002",
136
+ "A003",
137
+ "ANN001",
138
+ "ANN002",
139
+ "ANN003",
140
+ "ANN201",
141
+ "ARG001",
142
+ "ARG002",
143
+ "ARG005",
144
+ "D102",
145
+ "ERA001",
146
+ "FBT001",
147
+ "PGH003",
148
+ "PLC0415",
149
+ "PLR0913",
150
+ "PLR0917",
151
+ "PLR2004",
152
+ "PLW0108",
153
+ "S101",
154
+ "SLF001",
155
+ ]
156
+ "src/purger/plugins/_template.py" = ["ERA001"]
157
+
158
+ [tool.ruff.lint.mccabe]
159
+ max-complexity = 10
160
+
161
+ [tool.ruff.lint.pydocstyle]
162
+ convention = "google"
163
+
164
+ [tool.ruff.lint.pylint]
165
+ max-args = 7
166
+
167
+ [tool.ruff.lint.flake8-annotations]
168
+ allow-star-arg-any = true
169
+
170
+ [tool.ruff.format]
171
+ indent-style = "space"
172
+ line-ending = "auto"
173
+ quote-style = "double"
174
+ skip-magic-trailing-comma = false
175
+
176
+ [tool.ty.terminal]
177
+ error-on-warning = true
178
+
179
+ [dependency-groups]
180
+ dev = [
181
+ "commitizen>=4.19.3",
182
+ "coverage>=7.17.2",
183
+ "duty>=1.10.1",
184
+ "gate-cache>=0.6.0",
185
+ "prek>=0.5.10",
186
+ "pytest-clarity>=1.0.1",
187
+ "pytest-cov>=7.1.0",
188
+ "pytest-mock>=3.17.0",
189
+ "pytest-repeat>=0.9.4",
190
+ "pytest-sugar>=1.1.1",
191
+ "pytest-xdist>=3.8.0",
192
+ "pytest>=9.2.0",
193
+ "ruff>=0.17.4",
194
+ "shellcheck-py>=0.11.0.1",
195
+ "ty>=0.0.100",
196
+ "types-psutil>=7.2.2.20260906",
197
+ "typos>=1.52.0",
198
+ "yamllint>=1.38.0",
199
+ ]