Skip to main content

Universal cleanup executor - Automated deletion of unwanted files and directories

Project description

Junk - Universal Cleanup Executor

A zero-friction Python CLI tool for automated cleanup of unwanted files and directories.

Problem Statement

Development repositories often accumulate unwanted files and directories:

  • /target/ build directories
  • *.log files
  • __pycache__/ Python cache directories
  • /temp/ temporary directories
  • Build artifacts and cache files

Manual deletion of these files is time-consuming and error-prone. Organizations need an automated solution that works universally across different project types and environments.

Solution Overview

Junk is a PyPI-distributed command-line tool that provides automated cleanup with zero user intervention required.

Execute with a single command:

junk

The tool operates by:

  1. Locating a junk.fat configuration file in the current directory
  2. Reading the specified list of files and directories for removal
  3. Executing deletions as specified
  4. Self-removing the configuration file upon successful completion

Installation

Install from the Python Package Index:

pip install junk-remover-cli

The tool is immediately available system-wide:

junk

Usage Instructions

Step 1: Create Configuration File

Create a junk.fat file in your project root directory. List files and directories to be removed, one per line:

/target/
/Server/plotter/output/main.png
/Server/temp/arch.json
__pycache__/
*.log
node_modules/
.DS_Store

Step 2: Execute Cleanup

Run the cleanup command:

junk

Step 3: Verification

All specified items are removed, and the junk.fat configuration file is automatically deleted upon successful completion.

Key Features

  • Zero User Interaction: No confirmation prompts or manual intervention required
  • Universal Compatibility: Functions in any directory containing a junk.fat configuration file
  • Self-Managing: Automatically removes configuration file after successful execution
  • Error Handling: Preserves configuration file when deletions fail for retry capability
  • Cross-Platform: Compatible with Windows, macOS, and Linux environments
  • Encoding Support: Handles multiple file encodings automatically

Operational Behavior

Success Case

When all specified items are successfully deleted, the junk.fat configuration file is automatically removed.

Partial Failure Case

When some items cannot be deleted, the junk.fat configuration file is preserved to allow for retry operations.

Missing Configuration Case

When no junk.fat file is present, the tool exits gracefully with an informative status message.

Integration with Development Workflows

This tool is designed for integration with automated development workflows:

  • Configuration Generation: AI code assistants or scripts generate project-specific junk.fat files
  • Execution: The junk tool executes cleanup operations without human intervention
  • Universal Application: Consistent workflow across different programming languages and project types

Configuration Examples

Web Development Projects

node_modules/
dist/
.cache/
*.log
.DS_Store

Python Projects

__pycache__/
*.pyc
.pytest_cache/
build/
*.egg-info/

Java Projects

target/
*.class
*.jar
*.war

Safety and Security

  • Operations are limited to explicitly listed items in the configuration file
  • No wildcard expansion or pattern matching beyond exact path specification
  • Non-existent files and directories are gracefully ignored
  • Comprehensive logging provides clear feedback on all operations performed

License

This project is distributed under the MIT License. See the LICENSE file for complete terms and conditions.

Contributing

Contributions are welcome through standard open-source channels. This tool maintains a focused scope centered on the core principle of zero-friction cleanup execution. Please ensure any proposed changes align with this fundamental design philosophy.

Support

For issues, feature requests, or technical support, please utilize the project's issue tracking system on the source code repository.


Junk CLI: Making cleanup operations universal, automated, and reliable.

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

junk_remover_cli-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

junk_remover_cli-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file junk_remover_cli-0.1.2.tar.gz.

File metadata

  • Download URL: junk_remover_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.0

File hashes

Hashes for junk_remover_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bb4d1923dc0b0fdc9f1c12cb20b87d48e787dc2a619cca31b3058eab9d2ef5ad
MD5 13ac34ca56da122715c1c096ce9c17d5
BLAKE2b-256 470e3a6b23ab09fc5ffaabb13b6d6c022106dcf6db0c176133fd90f4df351e62

See more details on using hashes here.

File details

Details for the file junk_remover_cli-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for junk_remover_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89a379889ac725ccb54eeb4c112b8f990f572912be3abdb047897620bada9001
MD5 164b70c1592e562e648f75e709aba386
BLAKE2b-256 ddd4fe50f0797f57fabc1681f73febd138de8e3c7e5b0a28e5f6d5ade910ad30

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