Skip to main content

Smart cleanup tool for developers - removes unused venv, node_modules, Docker images, scans Git repos, and more

Project description

🧹 jhadoo - Universal Cleanup Tool

Smart cleanup for developers. Automatically cleans venv, node_modules, unused Docker images, detects stale Git branches, and more. Includes Undo/Restore functionality.

PyPI version License: MIT

Quick Start

# Install
pip install jhadoo

# Preview (safe)
jhadoo --dry-run

# Run standard cleanup (folders)
jhadoo

# Run with Docker cleanup
jhadoo --docker

# Analyze Git Repositories
jhadoo --git-check

# Restore archived items
jhadoo --restore

# Schedule daily cleanup
jhadoo --schedule daily --archive

Privacy & Telemetry (New in v1.2.0)

Jhadoo collects anonymous usage statistics to global storage savings.

  • What we collect: Randomly generated User ID, bytes saved, OS type, and Jhadoo version.
  • What we DO NOT collect: IP addresses, file names, paths, or any personal data.
  • Opt-out: Run jhadoo --telemetry-off at any time.

Dashboard

View your personal savings and trends:

jhadoo --dashboard

Features

  • Universal: Works with ANY file/folder name (venv, node_modules, build, dist, target, or custom)
  • New! Git Analysis: Detects stale branches and large files in your git repositories
  • New! Docker Cleanup: Automatically cleans up unused Docker images (>60 days old)
  • New! Undo/Restore: Instantly restore archived items to their original location
  • Safe: Dry-run mode, size caps, confirmations, archive mode
  • Scheduled: Built-in cron/Task Scheduler integration
  • Cross-platform: macOS, Windows, Linux
  • Smart: Dashboard with trends, progress bars, notifications

Configuration

# Generate config
jhadoo --generate-config

# Edit and use
jhadoo --config jhadoo_config.json

Example config:

{
  "targets": [
    {"name": "venv", "days_threshold": 7, "enabled": true},
    {"name": "node_modules", "days_threshold": 14, "enabled": true},
    {"name": "build", "days_threshold": 14, "enabled": true},
    {"name": "YOUR_CUSTOM_FOLDER", "days_threshold": 7, "enabled": true}
  ],
  "exclusions": ["~/important-project"],
  "safety": {
    "size_threshold_mb": 5000,
    "require_confirmation_above_mb": 500
  }
}

Scheduling

# Daily at 2 AM
jhadoo --schedule daily

# Weekly (Sunday 2 AM)
jhadoo --schedule weekly

# Custom cron
jhadoo --cron "0 3 * * 1"  # Monday 3 AM

# Manage
jhadoo --list-schedules
jhadoo --remove-schedule

Examples

See examples/ for detailed code examples:

  • 01_basic_usage.py - Dry-run, archive, actual cleanup
  • 02_custom_config.py - Custom configuration
  • 03_scheduling.py - Automated scheduling

Universal Support

Works with all languages and build systems:

Language Folders
Python venv, __pycache__, .pytest_cache, .tox
Node.js node_modules, .next, .nuxt
Rust target
Go vendor, bin
Java target, build, .gradle
C/C++ build, *.o
.NET bin, obj
Custom Any folder you specify!

Python API

from jhadoo import Config, CleanupEngine, Scheduler

# Run cleanup
config = Config()
engine = CleanupEngine(config, dry_run=True)
result = engine.run()

# Schedule
scheduler = Scheduler()
scheduler.schedule('daily', archive=True)

Command Reference

jhadoo [OPTIONS]

Options:
  -c, --config FILE     Custom config file
  -n, --dry-run        Preview without deleting
  -a, --archive        Move to archive instead of delete
  -d, --dashboard      Show statistics
  
  --schedule FREQ     Schedule cleanup (daily/weekly/monthly/hourly)
  --cron EXPR         Custom cron expression
  --list-schedules    List scheduled tasks
  --remove-schedule   Remove scheduled tasks
  
  --generate-config   Create sample config
  -v, --version       Show version

Safety

  • Size warnings: Alerts if deletion exceeds 5GB
  • Confirmations: Asks before deleting >500MB
  • Exclusions: Protect critical folders
  • System protection: Never touches OS directories
  • Deletion manifest: JSON log for recovery

File Locations

  • Logs: ~/.jhadoo/cleanup_log.csv
  • Manifest: ~/.jhadoo/deletion_manifest.json
  • Archive: ~/.jhadoo_archive/

License

MIT License - see LICENSE


ExamplesPublishing GuideTechnical Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jhadoo-1.2.1.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jhadoo-1.2.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file jhadoo-1.2.1.tar.gz.

File metadata

  • Download URL: jhadoo-1.2.1.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for jhadoo-1.2.1.tar.gz
Algorithm Hash digest
SHA256 755b1887de6cb98a005288ed7b34fc8bf1e1f809f7d7a00f926cbba3317b91b2
MD5 d22d78c15e2c08502ce904a7efdb4c2e
BLAKE2b-256 b66bce0f97e5efad691b1a11d4353026072b895593e424e77b12094560434179

See more details on using hashes here.

File details

Details for the file jhadoo-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: jhadoo-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for jhadoo-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d0b420aaa162c7b3e38021533501a8e4b73930b12c2ebed4394ed4ec82b7223
MD5 191644c6852a0c8ae43b48ac2bcf37dc
BLAKE2b-256 4e02adad3b256015667dd3f8e15fd4b923226b94b87452f4e4c454c2fc508301

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page