DevBroom
An overengineered delete button that nobody asked for, built by someone who got tired of doing it manually.
DevBroom is a small cross-platform utility for reclaiming disk space from development dependencies.
It scans a directory, finds removable folders such as node_modules and Python virtual environments, shows their estimated size, and lets you clean them through either:
- a Tkinter desktop UI
- a headless CLI mode for remote or Linux server workflows
Installation
pip install devbroom
Requires Python 3.10 or newer.
On Linux, Tkinter may need to be installed separately before the GUI will open (see Quick Start → Linux below).
Upgrade
pip install --upgrade devbroom
Run from source
If you prefer to clone the repo instead:
git clone https://github.com/Sandhu93/devBroom.git
cd devBroom
pip install -e .
Interface Preview
Why This Project Matters
Developer machines and shared workstations tend to accumulate large dependency folders that are safe to rebuild but expensive to keep. DevBroom focuses on that narrow but common cleanup problem: identify heavyweight development artifacts quickly, show the likely reclaimable space, and let the user clean them without touching real application code. The result is a small, practical tool that demonstrates filesystem traversal, cross-platform behavior, GUI/CLI dual-mode design, and safety-oriented cleanup logic in one project.
Architecture
flowchart TD
A[main.py] --> B[devbroom.app.main]
B --> C{CLI mode?}
C -- No --> D[DevBroomApp Tkinter UI]
C -- Yes --> E[run_cli]
D --> F[Load settings]
D --> G[User actions]
G --> H[Start scan]
G --> I[Preview or export visible results]
G --> J[Delete selected results]
G --> K[Manage ignored paths and theme]
E --> F
E --> L[scan_targets]
E --> M[Console report]
E --> N[Optional JSON export]
H --> O[iter_scan_targets]
L --> O
O --> P[scanner.py]
P --> Q[Detect node_modules]
P --> R[Validate virtualenv folders]
P --> S[Apply ignored-path pruning]
P --> T[Estimate folder sizes]
D --> U[ui.py]
E --> V[cli.py]
J --> W[cleanup.py]
F --> X[settings.py]
P --> Y[models.py]
V --> Y
U --> Y
What A User Should Know First
- Problem solved: developer machines accumulate large dependency folders that are safe to rebuild but expensive to keep.
- Primary value: quickly find and remove disk-heavy dependency directories without touching application source code.
- Supported targets:
node_modulesand real Python virtual environments. - Supported environments: Windows and Linux.
- Interfaces: GUI for local desktop use, CLI for headless use.
- Safety posture: conservative detection, ignored-path support, confirmation before deletion, symlink protection, and partial-failure reporting.
Quick Start
After pip install devbroom, the devbroom command is available system-wide.
Windows
devbroom # opens the GUI
devbroom --help # show all CLI options
Tkinter is included with the standard Python installer from python.org, so the GUI works out of the box.
Linux
Some Linux distributions do not include Tkinter by default. Install it before using the GUI:
# Debian / Ubuntu
sudo apt install python3-tk
# Fedora
sudo dnf install python3-tkinter
Then:
devbroom # opens the GUI
devbroom --help # show all CLI options
How To Use The Application
GUI Workflow
- Start the app with
devbroom(no flags). - Choose the root directory you want to scan.
- Click
Scan. - Review the discovered cleanup candidates.
- Optionally filter, preview, export, or ignore folders.
- Select the rows you want to delete.
- Click
Delete Selected.
CLI Workflow
Basic scan:
devbroom --cli --path /path/to/projects
Skip saved ignore paths for one run:
devbroom --cli --path /path/to/projects --no-settings-ignores
Export results to JSON:
devbroom --cli --path /path/to/projects --json-out scan-report.json
Preview what would be deleted without removing anything:
devbroom --cli --path /path/to/projects --dry-run
Delete all discovered targets (with confirmation prompt):
devbroom --cli --path /path/to/projects --delete
Delete all discovered targets without a confirmation prompt:
devbroom --cli --path /path/to/projects --delete --yes
Include targets that are not inside a git repository (e.g. when scanning an entire drive):
devbroom --cli --path /path/to/scan --include-non-project
Only show targets with no filesystem changes in the last N days:
devbroom --cli --path /path/to/projects --older-than 90
DevBroom reports the time since the newest file or directory modification anywhere inside each target. This helps find unchanged folders, but it does not track reads or prove that a folder is unused. Review each path before deleting it.
CLI output includes:
- matching folders sorted by size (largest first)
- estimated sizes and time since each target last changed
- live progress indicator while scanning
- total reclaimable size
- optional JSON export
Core Features
- Scan a chosen directory recursively
- Detect
node_modules - Detect Python virtual environments such as
venv,.venv, andvirtualenv - Show estimated folder sizes and time since each target last changed
- Filter results by age with
--older-than N(CLI) or the age spinbox (GUI) - Live scan progress indicator in CLI mode
- Non-blocking deletion with live per-item progress in the GUI
- Selectively delete only the folders you choose
- Remember last scanned path and preferred theme
- Persist ignored scan paths
- Preview current visible scan results
- Export scan results to JSON or text
- Light mode and dark mode UI
Detection Rules
DevBroom scans for these targets:
node_modulesvenv.venvvirtualenv
Virtual environment candidates are only treated as real Python environments if they contain one of:
pyvenv.cfgScripts/activatebin/activate
This prevents deleting unrelated folders that only happen to use a common virtualenv-like name.
By default, devBroom only surfaces targets that live inside a git repository. This prevents folders bundled inside installed applications (VS Code, Arduino IDE, pgAdmin, etc.) from appearing as cleanup candidates. Pass --include-non-project to disable this filter.
The scanner also skips likely nested package locations such as:
site-packagesLiblibnode_modules
That reduces false positives inside installed dependencies.
Preview And Export
From the GUI:
Previewopens a read-only view of the current visible scan resultsExportsaves the current visible scan results as.jsonor.txt
From the CLI:
--json-out scan-report.jsonexports JSON- the console output itself serves as a plain-text preview/report
Safety Notes
- Deletion is permanent. The review dialog and CLI confirmation warn that items are not moved to Trash or Recycle Bin.
- In the CLI, confirm permanent deletion by typing
delete;--yesskips this prompt. - Symlinked directories are skipped during scanning.
- Symlink targets are not deleted.
- Read-only files are handled during deletion where possible.
- Permission errors and locked files are reported without aborting the entire operation.
- Incomplete scans warn that candidates may be missing and size estimates may be undercounts. Targets with unreadable contents show an unknown age and remain visible when an age filter is active.
Project Layout
main.py: thin application launcherdevbroom/app.py: app startup and CLI/GUI mode selectiondevbroom/cli.py: headless CLI scan/report modedevbroom/ui.py: Tkinter UI and theme handlingdevbroom/scanner.py: target discovery and size calculationdevbroom/cleanup.py: delete helpers and filesystem cleanupdevbroom/models.py: shared constants andScanTargetdevbroom/settings.py: saved preferences and ignored pathstests/test_scanner.py: scanner teststests/test_cleanup.py: cleanup teststests/test_settings.py: settings teststests/test_cli.py: CLI teststests/test_ui_smoke.py: GUI startup smoke test
Tests
The project includes unit tests for core logic plus a Tk window startup smoke test.
Run the full suite:
python -m unittest discover -s tests
See TESTING.md for the coverage gate, cross-platform CI matrix, package verification, GUI smoke test, and remaining manual checks.
GitHub Actions also runs the test suite automatically on pushes to main and on pull requests targeting main.
You can also run each file directly:
python tests/test_scanner.py
python tests/test_cleanup.py
python tests/test_settings.py
python tests/test_cli.py
Covered areas:
- target detection
- virtualenv validation
- nested-folder skip behavior
- ignored path handling
- scan cancellation behavior
- safe delete behavior
- read-only file cleanup behavior
- settings persistence
- CLI scan and JSON export behavior
- text report export behavior
The automated suite is strongest around non-UI logic. Tk startup is smoke-tested, while widget interactions and visual layout still need manual review.
Known Limitations
- Scans can be slow on very large directories because folder sizes are calculated recursively.
- Locked files on Windows may still prevent complete deletion.
- Permission-restricted scans may omit targets. DevBroom reports filesystem errors and marks affected sizes as lower bounds, but a scan still cannot guarantee a complete inventory.
- Tkinter styling can vary across platforms and desktop environments.
- GUI export currently exports visible rows only, which is usually the right behavior after filtering.
Good Next Modifications
- Add CSV export for results that are easier to open in spreadsheets.
- Add a GUI toggle to include or exclude non-project targets (currently CLI-only via
--include-non-project). - Add a progress indicator showing scan depth or folders visited for large directory trees.
Contributing
Contributions, fixes, and small usability improvements are welcome.
If you want to contribute:
- open an issue for bugs or feature ideas
- keep pull requests focused and easy to review
- run the test suite before submitting
See CONTRIBUTING.md for details.
What I Would Not Add Yet
- a database
- background worker processes
- plugin architecture
- heavy UI automation for the current Tkinter surface
Engineering Decisions
- Conservative target detection over aggressive cleanup. Virtual environment folders are validated with marker files instead of trusting names alone, which reduces dangerous false positives.
- Shared scanner and reporting logic across GUI and CLI. This keeps behavior consistent and reduces duplication between local desktop use and headless server workflows.
- Lightweight JSON settings instead of a config framework or database. The project only needs a few persisted values, so a simple file is easier to inspect and maintain.
- Focused non-UI tests over brittle GUI automation. The highest-risk logic lives in scanning, deletion, settings, and reporting, so that is where the test investment provides the most value.
- Intentional feature restraint. The project avoids plugins, background services, and packaging complexity until the core cleanup workflow is more mature.
Metadata
Release files for devbroom 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| devbroom-0.1.5.tar.gz | 34.5 kB | With provenance | Details for devbroom-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| devbroom-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for devbroom-0.1.5-py3-none-any.whl |
Total release size: 60.4 kB
Release files / devbroom-0.1.5.tar.gz
| Download URL | devbroom-0.1.5.tar.gz |
|---|---|
| Size | 34.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
066109d99c4c2f6abaddb55edf6d491d0b820c8385416d3089d4c837f3e09d3e
|
|
BLAKE2b-256 checksum How to use checksums |
5483b824e86f48056998de6c3107e66d8679355b57871e071fb913b3b85e5e60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / devbroom-0.1.5-py3-none-any.whl
| Download URL | devbroom-0.1.5-py3-none-any.whl |
|---|---|
| Size | 25.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
816fef16f83513d6009f2fb7b5c7689b37b03a455d1c1d6ed091cbdbf53d16c1
|
|
BLAKE2b-256 checksum How to use checksums |
00afef1ec6588abc0cf8e318daceb4ed174d72475cef39119877ce791f2ebe6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for devbroom 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for devbroom-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.