cantrash
v1.0.5
Published
a package which helps you to improve your code quality and makes the coding experience more comfortable by deleting your unwanted files by not deleting it"
Readme
🗑️ cantrash
cantrash is a simple and lightweight Node.js CLI tool to safely “remove” unwanted code files or folders by moving them to a separate .cantrash directory — without deleting them from your project. This allows you to keep your codebase clean while preserving old files for recovery if needed.
🚀 Features
✅ Move files or folders to .cantrash without permanent deletion
✅ Keep your main project clean and organized
✅ Easily restore files when needed
✅ Simple CLI commands
✅ Works across Windows, macOS, and Linux
📦 Installation
npm install -g cantrash⚙️ Usage
cantrash <file_or_folder_path>Example
cantrash src/oldComponent.jsThis will move oldComponent.js to .cantrash/src/oldComponent.js
♻️ Restore Files
cantrash restore <file_or_folder_path>Example:
cantrash restore src/oldComponent.js🧹 Empty Trashcan
cantrash empty⚠️ This will permanently delete all files in .cantrash.
💡 Why use cantrash?
- Safe removal: No accidental deletions
- Organized projects: Keep unused code out of the main tree
- Version control friendly:
.cantrashcan be added to.gitignore - Fast recovery: Restore files in seconds
📂 Configuration
You can customize the trash directory by creating a .cantrashrc file:
{
"trashDir": ".mytrash"
}👥 Contributing
We welcome contributions! To get started:
- Fork the repo
- Create a new branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
📄 License
MIT License © 2025 [kratikesh18]
⭐️ Support
If you like this project, please give it a ⭐️ on GitHub! It helps a lot 🚀
