DevClean
DevClean is an intelligent, filesystem-first storage auditor and transactional cleanup engine for developer workstations.
It helps you discover gigabytes of forgotten artifacts—like massive Python virtual environments, unreferenced Docker images, or stale node_modules—and offers explainable, safe recommendations on what to clean up.
Architecture
DevClean is built on a unidirectional, hexagonal architecture that explicitly separates discovery, policy, planning, and execution. The presentation layer strictly observes this engine.
graph TD
UI[Presentation / CLI]
UC[Use Cases]
RE[Recommendation Engine]
PL[Cleanup Planner]
EX[Cleanup Executor]
FS[Filesystem]
UI -->|Triggers| UC
UC -->|Provides Facts| RE
RE -->|Applies Policy| PL
PL -->|Creates Immutable Plan| EX
EX -->|Mutates| FS
Safety & Privacy Guarantees
DevClean is designed for environments where a wrong deletion could ruin a developer's day, and where absolute privacy is non-negotiable.
- Zero Telemetry: No analytics, no tracking, and no external API calls during built-in analysis. See our strict PRIVACY.md policy.
- Dry-Run by Default: Scanning (
devclean scan) is strictly read-only and never alters your filesystem. - Transactional Execution: The engine creates an immutable
CleanupPlanthat previews the exact bytes to be freed before making any destructive calls. - Explainable AI/Logic: Every recommendation explicitly tells you why an artifact is considered stale or safe to remove.
- Execution History: The engine maintains a robust, local JSON audit log of every cleanup transaction it performs.
Why DevClean? (Feature Comparison)
| Feature | DevClean | Generic Cleaners |
|---|---|---|
| Filesystem-first | Yes (context-aware logic) | No (regex or path matching) |
| Explainable recommendations | Yes | No |
| Transactional cleanup | Yes | No |
| Plugin architecture | Yes (standard Python entry_points) | Rarely |
| Dry-run by default | Yes | Sometimes |
| Audit history | Yes | No |
| Zero Telemetry Guarantee | Yes | No |
Demo & Screenshots
Release Demo
(To record your own demo: Run
vhs demo.tape using the provided configuration).
Interactive Discovery & Planning
Recommendation Selection
Detailed Explanations
Features
- Filesystem-First: Deterministic, read-only file inspections without relying on third-party CLIs.
- Event-Driven Progress: Zero UI polling; CLI components react asynchronously to backend lifecycle events.
- Plugin System: Analyzers are independently discoverable and load via
importlib.metadata.entry_points. Isolated failures do not crash the engine. - Machine-Readable: Emits schemas natively (
--json,--ndjson) for CI/CD automation anddevclean diffsupport.
Usage Workflows
1. Interactive Assessment & Cleanup
devclean scan
devclean cleanup --preview
devclean cleanup
2. Standalone HTML Reporting
devclean report --html report.html
3. Pipeline Automation
devclean cleanup --preview
if [ $? -eq 3 ]; then
echo "Cleanup actions are available. Triggering automated execution..."
devclean cleanup --policy aggressive
fi
4. Rich Diagnostics
devclean doctor
devclean version --verbose
5. Report Diffing
devclean report --json before.json
# ... days later ...
devclean report --json after.json
devclean diff before.json after.json
Documentation
Development
# Setup
poetry install
# Formatting and Type-checking
ruff check .
ruff format .
mypy src
# Architecture Enforcement
lint-imports
# Testing
pytest tests -vv
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devclean_cli-1.0.0.tar.gz.
File metadata
- Download URL: devclean_cli-1.0.0.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b1670e01fe1fba870f669dadc47ea435098dff47274bf4f1905d2aa5fb5dc66
|
|
| MD5 |
501cbee810f12f11975dd230b5652650
|
|
| BLAKE2b-256 |
d3c11dc1d7f522656aa64869e582a964385d6971879ae247063f1f8fe0e46698
|
File details
Details for the file devclean_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: devclean_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 67.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1916e0bf1b0e06430a473eedb4ddedb03ecf237f20e4d6e58d08a5f034b75632
|
|
| MD5 |
1c0f7d2b32f704c5c7d1fa2e14eaa2f8
|
|
| BLAKE2b-256 |
ae95445883f1799e55608771d18957f7a1c80375bf1f3030dc915b54d6d7fc6f
|