"I know this is trash; I don’t even know why I made this—probably inspired by the Einstein two-door puzzle, but with a cat twist LOL"
junk
A zero-friction Python CLI tool for automated cleanup of unwanted files and directories.
Development repositories often accumulate unwanted files and directories:
/target/build directories*.logfiles__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.
Junk is a PyPI-distributed command-line tool that provides automated cleanup with zero user intervention required.
Execute with a single command:
junkThe tool operates by:
- Locating a
junk.fatconfiguration file in the current directory - Reading the specified list of files and directories for removal
- Executing deletions as specified
- Self-removing the configuration file upon successful completion
Install from the Python Package Index:
pip install junk-remover-cliThe tool is immediately available system-wide:
junkCreate a junk.fat file in your project root directory. List files and directories to be removed, one per line:
Use a AI Agent to create junk.fat
List junk files (that is no longer need for production) and folders as root-prefixed paths, one per line save as junk.fat
images/
__pycache__/
*.log
.DS_Store
.env.example
node_modules/
test_pinecone.py
check_pinecone.py
Run the cleanup command:
junkAll specified items are removed, and the junk.fat configuration file is automatically deleted upon successful completion.
- Zero User Interaction: No confirmation prompts or manual intervention required
- Universal Compatibility: Functions in any directory containing a
junk.fatconfiguration 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
When all specified items are successfully deleted, the junk.fat configuration file is automatically removed.
When some items cannot be deleted, the junk.fat configuration file is preserved to allow for retry operations.
When no junk.fat file is present, the tool exits gracefully with an informative status message.
This tool is designed for integration with automated development workflows:
- Configuration Generation: AI code assistants or scripts generate project-specific
junk.fatfiles - Execution: The junk tool executes cleanup operations without human intervention
- Universal Application: Consistent workflow across different programming languages and project types
node_modules/
dist/
.cache/
*.log
.DS_Store
__pycache__/
*.pyc
.pytest_cache/
build/
*.egg-info/
target/
*.class
*.jar
*.war
- 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
This project is distributed under the MIT License. See the LICENSE file for complete terms and conditions.
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.
For issues, feature requests, or technical support, please utilize the project's issue tracking system on the source code repository.
Made by 🪙