Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarim/devshedder
DevShedder: Automatically and intelligently free up disk space by removing node_modules, vendor, and var/log directories from Node.js, PHP, and Symfony projects.
https://github.com/sarim/devshedder
cli developer-tools nodejs php symfony
Last synced: about 1 month ago
JSON representation
DevShedder: Automatically and intelligently free up disk space by removing node_modules, vendor, and var/log directories from Node.js, PHP, and Symfony projects.
- Host: GitHub
- URL: https://github.com/sarim/devshedder
- Owner: sarim
- License: mit
- Created: 2024-05-30T17:34:40.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-05-30T18:19:37.000Z (6 months ago)
- Last Synced: 2024-09-30T17:21:28.463Z (about 2 months ago)
- Topics: cli, developer-tools, nodejs, php, symfony
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DevShedder
DevShedder is a specialized tool designed to help developers maintain a clean and efficient workspace by automatically detecting and removing unnecessary directories such as `node_modules`, `vendor`, and various log directories from their projects.
## Goal
The primary goal of DevShedder is to free up disk space and reduce clutter in development environments by safely removing directories that are often large and regenerated easily, such as dependencies from Node.js or PHP Composer and log files from Symfony projects.
## Features
- **Selective Cleaning**: Targets specific directories (`node_modules`, `vendor`, `var/log`) based on the project type.
- **Project Detection**: Automatically detects the type of project by looking for key files (`package.json`, `composer.json`, `symfony.lock`).
- **Safe Deletion**: Offers a dry run mode to preview deletions without performing them.
- **User Confirmation**: Requires user confirmation before deletion if not in dry run mode, to prevent accidental data loss.
- **Error Handling**: Gracefully handles errors like permission denials and continues operation, logging issues to the stderr in red color for visibility.## Usage
### Installation
DevShedder can be installed either by downloading a pre-compiled binary from [github releases](https://github.com/sarim/devshedder/releases) or by building it from the source.
Clone the repository and build the binary using Go:
```bash
git clone https://github.com/sarim/devshedder.git
cd devshedder
go build
```### Running DevShedder
To clean up your workspace directory:
```bash
./devshedder /path/to/your/workspace/directory
```To perform a dry run and see what would be deleted without actual deletion:
```bash
./devshedder -dry-run /path/to/your/workspace/directory
```### Confirmation
If you run without the dry-run option, DevShedder will ask for confirmation before proceeding with deletions:
```bash
Are you sure you want to proceed with deletions? (y/n):
```Type `y` to proceed or `n` to cancel.
## Contributing
Contributions are welcome! Please fork the repository and submit pull requests with your enhancements, or open issues for bugs and feature requests.
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Author
DevShedder is developed and maintained by [Sarim Khan](https://github.com/sarim).