optforge 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 (47) hide show
  1. optforge-0.2.0/.gitignore +12 -0
  2. optforge-0.2.0/LICENSE +21 -0
  3. optforge-0.2.0/Makefile +37 -0
  4. optforge-0.2.0/PKG-INFO +322 -0
  5. optforge-0.2.0/README.md +268 -0
  6. optforge-0.2.0/pyproject.toml +105 -0
  7. optforge-0.2.0/src/optforge/__init__.py +17 -0
  8. optforge-0.2.0/src/optforge/__main__.py +6 -0
  9. optforge-0.2.0/src/optforge/cli.py +56 -0
  10. optforge-0.2.0/src/optforge/core/__init__.py +24 -0
  11. optforge-0.2.0/src/optforge/core/cli.py +56 -0
  12. optforge-0.2.0/src/optforge/core/console.py +83 -0
  13. optforge-0.2.0/src/optforge/core/errors.py +28 -0
  14. optforge-0.2.0/src/optforge/core/formatting.py +26 -0
  15. optforge-0.2.0/src/optforge/core/net.py +87 -0
  16. optforge-0.2.0/src/optforge/core/processes.py +38 -0
  17. optforge-0.2.0/src/optforge/core/redaction.py +41 -0
  18. optforge-0.2.0/src/optforge/core/version.py +15 -0
  19. optforge-0.2.0/src/optforge/diskcheck/__init__.py +6 -0
  20. optforge-0.2.0/src/optforge/diskcheck/cli.py +113 -0
  21. optforge-0.2.0/src/optforge/diskcheck/models.py +31 -0
  22. optforge-0.2.0/src/optforge/diskcheck/service.py +56 -0
  23. optforge-0.2.0/src/optforge/envcheck/__init__.py +6 -0
  24. optforge-0.2.0/src/optforge/envcheck/cli.py +102 -0
  25. optforge-0.2.0/src/optforge/envcheck/models.py +33 -0
  26. optforge-0.2.0/src/optforge/envcheck/service.py +66 -0
  27. optforge-0.2.0/src/optforge/killNotif/cli.py +110 -0
  28. optforge-0.2.0/src/optforge/killNotif/core.py +24 -0
  29. optforge-0.2.0/src/optforge/killNotif/job.ps1 +52 -0
  30. optforge-0.2.0/src/optforge/portcheck/__init__.py +14 -0
  31. optforge-0.2.0/src/optforge/portcheck/binder.py +72 -0
  32. optforge-0.2.0/src/optforge/portcheck/cli.py +248 -0
  33. optforge-0.2.0/src/optforge/portcheck/connector.py +60 -0
  34. optforge-0.2.0/src/optforge/portcheck/models.py +117 -0
  35. optforge-0.2.0/src/optforge/portcheck/scanner.py +76 -0
  36. optforge-0.2.0/src/optforge/portcheck/service.py +109 -0
  37. optforge-0.2.0/src/optforge/portcheck/waiter.py +54 -0
  38. optforge-0.2.0/src/optforge/pycacheClean/__init__.py +6 -0
  39. optforge-0.2.0/src/optforge/pycacheClean/cleaner.py +43 -0
  40. optforge-0.2.0/src/optforge/pycacheClean/cli.py +127 -0
  41. optforge-0.2.0/src/optforge/pycacheClean/models.py +55 -0
  42. optforge-0.2.0/src/optforge/pycacheClean/scanner.py +122 -0
  43. optforge-0.2.0/src/optforge/pycacheClean/service.py +79 -0
  44. optforge-0.2.0/src/optforge/volume/__init__.py +7 -0
  45. optforge-0.2.0/src/optforge/volume/cli.py +224 -0
  46. optforge-0.2.0/src/optforge/volume/core.py +280 -0
  47. optforge-0.2.0/tests/test_volume.py +108 -0
@@ -0,0 +1,12 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .ruff_cache
9
+ .mypy_cache
10
+ # Virtual environments
11
+ .venv
12
+ .vscode/
optforge-0.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OptForge contributors
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,37 @@
1
+ .PHONY: help install lint format typecheck test check build clean
2
+
3
+ UV ?= uv
4
+
5
+ help:
6
+ @echo "OptForge targets"
7
+ @echo " install Sync the virtual environment (uv sync --all-extras)"
8
+ @echo " lint Run ruff"
9
+ @echo " format Format with ruff"
10
+ @echo " typecheck Run mypy"
11
+ @echo " test Run pytest"
12
+ @echo " check lint + typecheck + test"
13
+ @echo " build Build sdist and wheel"
14
+ @echo " clean Remove caches and build artifacts"
15
+
16
+ install:
17
+ $(UV) sync --all-extras
18
+
19
+ lint:
20
+ $(UV) run ruff check .
21
+
22
+ format:
23
+ $(UV) run ruff format .
24
+
25
+ typecheck:
26
+ $(UV) run mypy src
27
+
28
+ test:
29
+ $(UV) run pytest
30
+
31
+ check: lint typecheck test
32
+
33
+ build:
34
+ $(UV) build
35
+
36
+ clean:
37
+ $(UV) run python -c "import pathlib, shutil; [shutil.rmtree(p, ignore_errors=True) for p in pathlib.Path('.').rglob('__pycache__')]; [shutil.rmtree(p, ignore_errors=True) for p in ('.mypy_cache', '.ruff_cache', '.pytest_cache', 'dist', 'build')]"
@@ -0,0 +1,322 @@
1
+ Metadata-Version: 2.5
2
+ Name: optforge
3
+ Version: 0.2.0
4
+ Summary: Cross-platform developer CLI tools for ports, environment variables, disk usage, and Python cache cleanup.
5
+ Project-URL: Homepage, https://github.com/cmd-3324/OptForge
6
+ Project-URL: Repository, https://github.com/cmd-3324/OptForge
7
+ Project-URL: Issues, https://github.com/cmd-3324/OptForge/issues
8
+ Author-email: Max Miller <ali.alipour4576@gmail.com>
9
+ License: MIT License
10
+
11
+ Copyright (c) 2026 OptForge contributors
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+ License-File: LICENSE
31
+ Keywords: cli,developer-tools,disk,environment,ports,pycache
32
+ Classifier: Development Status :: 4 - Beta
33
+ Classifier: Environment :: Console
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Operating System :: OS Independent
37
+ Classifier: Programming Language :: Python :: 3
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Programming Language :: Python :: 3.14
40
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
41
+ Classifier: Topic :: System :: Systems Administration
42
+ Classifier: Typing :: Typed
43
+ Requires-Python: >=3.13
44
+ Requires-Dist: psutil>=6.0.0
45
+ Requires-Dist: pycaw>=20240210; sys_platform == 'win32'
46
+ Requires-Dist: rich>=13.7.0
47
+ Requires-Dist: typer>=0.12.0
48
+ Provides-Extra: dev
49
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
50
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
51
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
52
+ Requires-Dist: ruff>=0.6.0; extra == 'dev'
53
+ Description-Content-Type: text/markdown
54
+
55
+ # OptForge
56
+
57
+ Small developer CLI tools for inspecting listening ports, checking environment variables, monitoring disk usage, cleaning Python cache artifacts, controlling output volume, and clearing Windows toast notifications. Most tools are cross-platform; `killNotif` is Windows-only.
58
+
59
+ Built with Python, Typer, and Rich.
60
+
61
+ ## Overview
62
+
63
+ OptForge is a lightweight command-line toolkit for developers who want fast answers about the local runtime environment.
64
+
65
+ It helps you:
66
+
67
+ - inspect active TCP listeners and identify the owning process
68
+ - check whether a port is free or already in use
69
+ - test a host/port connection from the terminal
70
+ - review environment variables and runtime context
71
+ - monitor disk space and storage pressure
72
+ - remove stale Python cache artifacts from local projects, without scanning `venv` or `.venv`
73
+ - get, set, mute, and adjust the default output volume
74
+ - clear Windows toast notifications, optionally for a single app (Windows 10/11 only)
75
+
76
+ ## Why use OptForge?
77
+
78
+ Whether you're starting a local service, troubleshooting an app crash, checking for port collisions, or cleaning up a messy Python workspace, OptForge gives you quick terminal-based tools without opening a full IDE or browser.
79
+
80
+ Most tools are designed to be simple, fast, and cross-platform; `killNotif` is Windows-only.
81
+
82
+ ## Features
83
+
84
+ ### Port inspection
85
+
86
+ - list all listening TCP ports
87
+ - show the process associated with each port
88
+ - detect whether a port is free or in use
89
+ - test connectivity to a host and port
90
+ - wait until a port reaches the desired state
91
+
92
+ ### Environment checks
93
+
94
+ - inspect environment variables and runtime context
95
+ - useful for debugging app configuration issues
96
+ - helpful for local setup and deployment verification
97
+
98
+ ### Disk monitoring
99
+
100
+ - inspect filesystem usage and storage conditions
101
+ - identify when available disk space is running low
102
+ - support local development diagnostics
103
+
104
+ ### Volume control
105
+
106
+ - read and set the default output volume
107
+ - increase or decrease the volume by a custom step
108
+ - set 100% or 0% instantly
109
+ - mute, unmute, or toggle mute
110
+ - emit JSON or stay quiet for scripting
111
+ - works on Windows, macOS, and Linux
112
+
113
+ ### Python cache cleanup
114
+
115
+ - remove `__pycache__` directories and stale Python bytecode files
116
+ - skip virtual environments (`venv` and `.venv`) instead of scanning them
117
+ - help keep workspaces clean without walking dependency trees
118
+
119
+ ### Windows notification cleanup (Windows only)
120
+
121
+ - clear all toast notifications from the Windows Action Center
122
+ - clear notifications from a single app by AUMID
123
+ - emit JSON or stay quiet for scripting
124
+ - requires Windows 10/11 and Windows PowerShell 5.1+
125
+ - not available on macOS or Linux; the command exits with code `3` there
126
+
127
+ ## Installation
128
+
129
+ ### Install with pipx
130
+
131
+ The recommended installation method is pipx:
132
+
133
+ ```bash
134
+ pipx install git+https://github.com/cmd-3324/OptForge.git
135
+ ```
136
+
137
+ If you are working from a local clone:
138
+
139
+ ```bash
140
+ cd OptForge
141
+ pipx install --editable .
142
+ ```
143
+
144
+ ### Install with pip
145
+
146
+ ```bash
147
+ git clone https://github.com/cmd-3324/OptForge.git
148
+ cd OptForge
149
+ python -m pip install .
150
+ ```
151
+
152
+ ### Download the latest Windows executable
153
+
154
+ You can download the latest Windows `.exe` release directly from GitHub Releases:
155
+
156
+ ```text
157
+ https://github.com/cmd-3324/OptForge/releases/latest
158
+ ```
159
+
160
+ This is useful if you want to run OptForge without installing Python dependencies manually.
161
+
162
+ ## Quick start
163
+
164
+ After installation, the package exposes the following commands:
165
+
166
+ ```bash
167
+ portcheck --help
168
+ envcheck --help
169
+ diskcheck --help
170
+ pycache-clean --help
171
+ vol --help
172
+ killNotif --help # Windows 10/11 only
173
+ ```
174
+
175
+ ## Platform support
176
+
177
+ | Tool | Windows | macOS | Linux |
178
+ | --- | --- | --- | --- |
179
+ | `portcheck`, `envcheck`, `diskcheck`, `pycache-clean` | Yes | Yes | Yes |
180
+ | `vol` | Yes | Yes | Yes |
181
+ | `killNotif` | Windows 10/11 only | No | No |
182
+
183
+ `vol` uses the system mixer: Core Audio on Windows, `osascript` on macOS, and `pactl`/`wpctl`/`amixer` on Linux.
184
+
185
+ `killNotif` relies on the Windows Runtime toast notification APIs and Windows PowerShell 5.1, so it cannot run on macOS or Linux. The CLI reports a clear error and exits with code `3` instead of failing with a traceback.
186
+
187
+ ## Usage examples
188
+
189
+ ### Check ports
190
+
191
+ ```bash
192
+ portcheck list
193
+ portcheck list --sort process
194
+ portcheck check 8000
195
+ portcheck find 5432
196
+ portcheck connect localhost 5432
197
+ portcheck wait 8000 --until free --timeout 60
198
+ ```
199
+
200
+ ### Inspect the environment
201
+
202
+ ```bash
203
+ envcheck
204
+ ```
205
+
206
+ ### Check disk usage
207
+
208
+ ```bash
209
+ diskcheck
210
+ ```
211
+
212
+ ### Control output volume
213
+
214
+ ```bash
215
+ vol get
216
+ vol status
217
+ vol on 50
218
+ vol up 10
219
+ vol down 10
220
+ vol full
221
+ vol none
222
+ vol mute
223
+ vol unmute
224
+ vol toggle
225
+ ```
226
+
227
+ `vol on <PERCENT>` sets an absolute level, while `vol up` and `vol down` change it relative to the current level (default step: `5`). Setting a level above `0` also unmutes the output.
228
+
229
+ Use `--json` for machine-readable output and `--quiet` to suppress output:
230
+
231
+ ```bash
232
+ vol get --json
233
+ vol on 35 --json
234
+ vol toggle --json
235
+ ```
236
+
237
+ ### Clean Python cache files
238
+
239
+ `pycache-clean` searches a project for `__pycache__` directories and deletes them. Folders named `venv` or `.venv` are ignored so virtualenv bytecode is left alone and the scan stays fast. The legacy `pycacheClean` alias is also installed.
240
+
241
+ ```bash
242
+ pycache-clean --dry-run
243
+ pycache-clean --recursive
244
+ pycache-clean --max-depth 2
245
+ ```
246
+
247
+ ### Clear Windows notifications
248
+
249
+ `killNotif` clears toast notifications from the Windows Action Center. It requires Windows 10/11 and Windows PowerShell 5.1+; it does not work on macOS or Linux.
250
+
251
+ ```powershell
252
+ killNotif
253
+ killNotif --aumid "Microsoft.WindowsStore_8wekyb3d8bbwe!App"
254
+ killNotif --json
255
+ killNotif --quiet
256
+ ```
257
+
258
+ Use `--aumid` to target one sender. `--json` prints `{"aumid": ..., "cleared": ...}`, and `--quiet` suppresses output. The command exits `0` on success, including when there was nothing to clear, and `3` when it cannot run.
259
+
260
+ ## Project structure
261
+
262
+ ```text
263
+ OptForge/
264
+ ├── src/
265
+ │ └── optforge/
266
+ │ ├── core/
267
+ │ ├── diskcheck/
268
+ │ ├── envcheck/
269
+ │ ├── killNotif/
270
+ │ ├── portcheck/
271
+ │ ├── pycacheclean/
272
+ │ └── volume/
273
+ ├── Makefile
274
+ ├── README.md
275
+ ├── pyproject.toml
276
+ ├── uv.lock
277
+ ├── .gitignore
278
+ └── .python-version
279
+ ```
280
+
281
+ ## Development
282
+
283
+ The repository uses Python packaging and a modern CLI setup.
284
+
285
+ Common commands:
286
+
287
+ ```bash
288
+ make install
289
+ make lint
290
+ make format
291
+ make test
292
+ ```
293
+
294
+ ## Requirements
295
+
296
+ - Python 3.13+
297
+ - Typer
298
+ - Rich
299
+ - psutil
300
+ - pycaw for `vol` on Windows (installed automatically)
301
+ - `pactl`, `wpctl`, or `amixer` for `vol` on Linux
302
+ - Windows 10/11 and Windows PowerShell 5.1+ for `killNotif`
303
+
304
+ All other commands work on Windows, macOS, and Linux.
305
+
306
+ ## Contributing
307
+
308
+ Contributions are welcome.
309
+
310
+ 1. fork the repository
311
+ 2. create a feature branch
312
+ 3. make your changes
313
+ 4. run the relevant checks
314
+ 5. open a pull request
315
+
316
+ ## License
317
+
318
+ MIT. See [LICENSE](LICENSE).
319
+
320
+ ## Summary
321
+
322
+ OptForge is a practical toolkit for developers working on local environments, especially when they need fast answers about ports, runtime configuration, storage health, output volume, Python project clutter, and Windows notification noise.
@@ -0,0 +1,268 @@
1
+ # OptForge
2
+
3
+ Small developer CLI tools for inspecting listening ports, checking environment variables, monitoring disk usage, cleaning Python cache artifacts, controlling output volume, and clearing Windows toast notifications. Most tools are cross-platform; `killNotif` is Windows-only.
4
+
5
+ Built with Python, Typer, and Rich.
6
+
7
+ ## Overview
8
+
9
+ OptForge is a lightweight command-line toolkit for developers who want fast answers about the local runtime environment.
10
+
11
+ It helps you:
12
+
13
+ - inspect active TCP listeners and identify the owning process
14
+ - check whether a port is free or already in use
15
+ - test a host/port connection from the terminal
16
+ - review environment variables and runtime context
17
+ - monitor disk space and storage pressure
18
+ - remove stale Python cache artifacts from local projects, without scanning `venv` or `.venv`
19
+ - get, set, mute, and adjust the default output volume
20
+ - clear Windows toast notifications, optionally for a single app (Windows 10/11 only)
21
+
22
+ ## Why use OptForge?
23
+
24
+ Whether you're starting a local service, troubleshooting an app crash, checking for port collisions, or cleaning up a messy Python workspace, OptForge gives you quick terminal-based tools without opening a full IDE or browser.
25
+
26
+ Most tools are designed to be simple, fast, and cross-platform; `killNotif` is Windows-only.
27
+
28
+ ## Features
29
+
30
+ ### Port inspection
31
+
32
+ - list all listening TCP ports
33
+ - show the process associated with each port
34
+ - detect whether a port is free or in use
35
+ - test connectivity to a host and port
36
+ - wait until a port reaches the desired state
37
+
38
+ ### Environment checks
39
+
40
+ - inspect environment variables and runtime context
41
+ - useful for debugging app configuration issues
42
+ - helpful for local setup and deployment verification
43
+
44
+ ### Disk monitoring
45
+
46
+ - inspect filesystem usage and storage conditions
47
+ - identify when available disk space is running low
48
+ - support local development diagnostics
49
+
50
+ ### Volume control
51
+
52
+ - read and set the default output volume
53
+ - increase or decrease the volume by a custom step
54
+ - set 100% or 0% instantly
55
+ - mute, unmute, or toggle mute
56
+ - emit JSON or stay quiet for scripting
57
+ - works on Windows, macOS, and Linux
58
+
59
+ ### Python cache cleanup
60
+
61
+ - remove `__pycache__` directories and stale Python bytecode files
62
+ - skip virtual environments (`venv` and `.venv`) instead of scanning them
63
+ - help keep workspaces clean without walking dependency trees
64
+
65
+ ### Windows notification cleanup (Windows only)
66
+
67
+ - clear all toast notifications from the Windows Action Center
68
+ - clear notifications from a single app by AUMID
69
+ - emit JSON or stay quiet for scripting
70
+ - requires Windows 10/11 and Windows PowerShell 5.1+
71
+ - not available on macOS or Linux; the command exits with code `3` there
72
+
73
+ ## Installation
74
+
75
+ ### Install with pipx
76
+
77
+ The recommended installation method is pipx:
78
+
79
+ ```bash
80
+ pipx install git+https://github.com/cmd-3324/OptForge.git
81
+ ```
82
+
83
+ If you are working from a local clone:
84
+
85
+ ```bash
86
+ cd OptForge
87
+ pipx install --editable .
88
+ ```
89
+
90
+ ### Install with pip
91
+
92
+ ```bash
93
+ git clone https://github.com/cmd-3324/OptForge.git
94
+ cd OptForge
95
+ python -m pip install .
96
+ ```
97
+
98
+ ### Download the latest Windows executable
99
+
100
+ You can download the latest Windows `.exe` release directly from GitHub Releases:
101
+
102
+ ```text
103
+ https://github.com/cmd-3324/OptForge/releases/latest
104
+ ```
105
+
106
+ This is useful if you want to run OptForge without installing Python dependencies manually.
107
+
108
+ ## Quick start
109
+
110
+ After installation, the package exposes the following commands:
111
+
112
+ ```bash
113
+ portcheck --help
114
+ envcheck --help
115
+ diskcheck --help
116
+ pycache-clean --help
117
+ vol --help
118
+ killNotif --help # Windows 10/11 only
119
+ ```
120
+
121
+ ## Platform support
122
+
123
+ | Tool | Windows | macOS | Linux |
124
+ | --- | --- | --- | --- |
125
+ | `portcheck`, `envcheck`, `diskcheck`, `pycache-clean` | Yes | Yes | Yes |
126
+ | `vol` | Yes | Yes | Yes |
127
+ | `killNotif` | Windows 10/11 only | No | No |
128
+
129
+ `vol` uses the system mixer: Core Audio on Windows, `osascript` on macOS, and `pactl`/`wpctl`/`amixer` on Linux.
130
+
131
+ `killNotif` relies on the Windows Runtime toast notification APIs and Windows PowerShell 5.1, so it cannot run on macOS or Linux. The CLI reports a clear error and exits with code `3` instead of failing with a traceback.
132
+
133
+ ## Usage examples
134
+
135
+ ### Check ports
136
+
137
+ ```bash
138
+ portcheck list
139
+ portcheck list --sort process
140
+ portcheck check 8000
141
+ portcheck find 5432
142
+ portcheck connect localhost 5432
143
+ portcheck wait 8000 --until free --timeout 60
144
+ ```
145
+
146
+ ### Inspect the environment
147
+
148
+ ```bash
149
+ envcheck
150
+ ```
151
+
152
+ ### Check disk usage
153
+
154
+ ```bash
155
+ diskcheck
156
+ ```
157
+
158
+ ### Control output volume
159
+
160
+ ```bash
161
+ vol get
162
+ vol status
163
+ vol on 50
164
+ vol up 10
165
+ vol down 10
166
+ vol full
167
+ vol none
168
+ vol mute
169
+ vol unmute
170
+ vol toggle
171
+ ```
172
+
173
+ `vol on <PERCENT>` sets an absolute level, while `vol up` and `vol down` change it relative to the current level (default step: `5`). Setting a level above `0` also unmutes the output.
174
+
175
+ Use `--json` for machine-readable output and `--quiet` to suppress output:
176
+
177
+ ```bash
178
+ vol get --json
179
+ vol on 35 --json
180
+ vol toggle --json
181
+ ```
182
+
183
+ ### Clean Python cache files
184
+
185
+ `pycache-clean` searches a project for `__pycache__` directories and deletes them. Folders named `venv` or `.venv` are ignored so virtualenv bytecode is left alone and the scan stays fast. The legacy `pycacheClean` alias is also installed.
186
+
187
+ ```bash
188
+ pycache-clean --dry-run
189
+ pycache-clean --recursive
190
+ pycache-clean --max-depth 2
191
+ ```
192
+
193
+ ### Clear Windows notifications
194
+
195
+ `killNotif` clears toast notifications from the Windows Action Center. It requires Windows 10/11 and Windows PowerShell 5.1+; it does not work on macOS or Linux.
196
+
197
+ ```powershell
198
+ killNotif
199
+ killNotif --aumid "Microsoft.WindowsStore_8wekyb3d8bbwe!App"
200
+ killNotif --json
201
+ killNotif --quiet
202
+ ```
203
+
204
+ Use `--aumid` to target one sender. `--json` prints `{"aumid": ..., "cleared": ...}`, and `--quiet` suppresses output. The command exits `0` on success, including when there was nothing to clear, and `3` when it cannot run.
205
+
206
+ ## Project structure
207
+
208
+ ```text
209
+ OptForge/
210
+ ├── src/
211
+ │ └── optforge/
212
+ │ ├── core/
213
+ │ ├── diskcheck/
214
+ │ ├── envcheck/
215
+ │ ├── killNotif/
216
+ │ ├── portcheck/
217
+ │ ├── pycacheclean/
218
+ │ └── volume/
219
+ ├── Makefile
220
+ ├── README.md
221
+ ├── pyproject.toml
222
+ ├── uv.lock
223
+ ├── .gitignore
224
+ └── .python-version
225
+ ```
226
+
227
+ ## Development
228
+
229
+ The repository uses Python packaging and a modern CLI setup.
230
+
231
+ Common commands:
232
+
233
+ ```bash
234
+ make install
235
+ make lint
236
+ make format
237
+ make test
238
+ ```
239
+
240
+ ## Requirements
241
+
242
+ - Python 3.13+
243
+ - Typer
244
+ - Rich
245
+ - psutil
246
+ - pycaw for `vol` on Windows (installed automatically)
247
+ - `pactl`, `wpctl`, or `amixer` for `vol` on Linux
248
+ - Windows 10/11 and Windows PowerShell 5.1+ for `killNotif`
249
+
250
+ All other commands work on Windows, macOS, and Linux.
251
+
252
+ ## Contributing
253
+
254
+ Contributions are welcome.
255
+
256
+ 1. fork the repository
257
+ 2. create a feature branch
258
+ 3. make your changes
259
+ 4. run the relevant checks
260
+ 5. open a pull request
261
+
262
+ ## License
263
+
264
+ MIT. See [LICENSE](LICENSE).
265
+
266
+ ## Summary
267
+
268
+ OptForge is a practical toolkit for developers working on local environments, especially when they need fast answers about ports, runtime configuration, storage health, output volume, Python project clutter, and Windows notification noise.