https://github.com/sigoden/projclean
Project dependencies & build artifacts cleanup tool.
https://github.com/sigoden/projclean
cleaner cli command-line rust tui
Last synced: 6 months ago
JSON representation
Project dependencies & build artifacts cleanup tool.
- Host: GitHub
- URL: https://github.com/sigoden/projclean
- Owner: sigoden
- License: apache-2.0
- Created: 2022-03-10T05:12:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-12T04:41:14.000Z (almost 2 years ago)
- Last Synced: 2025-03-30T06:10:10.463Z (7 months ago)
- Topics: cleaner, cli, command-line, rust, tui
- Language: Rust
- Homepage:
- Size: 170 KB
- Stars: 138
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Projclean
[](https://github.com/sigoden/projclean/actions/workflows/ci.yaml)
[](https://crates.io/crates/projclean)Project dependencies & build artifacts cleanup tool.

## Install
### With cargo
```
cargo install projclean
```### Binaries on macOS, Linux, Windows
Download from [Github Releases](https://github.com/sigoden/projclean/releases), unzip and add projclean to your $PATH.
## CLI
```
Usage: projclean [OPTIONS] [RULES]...Arguments:
[RULES]... Search rules, e.g. node_modules target@Cargo.tomlOptions:
-C, --cwd Start searching from [default: .]
-x, --exclude Exclude directories from search, e.g. ignore1,ignore2
-t, --time <[+|-]DAY> Path was last modified less than, more than or exactly days
-s, --size <[+|-]SIZE> Path uses less than, more than or exactly units (K|M|G|T) of space
-D, --delete-all Automatically delete all found targets
-P, --print Print the found targets
-h, --help Print help
-V, --version Print version
```Clean up node_modules.
```sh
projclean node_modules
```Clean up various types of projects.
```sh
projclean node_modules target@Cargo.toml
```Start searching from a specific directory with `-C` or `--cwd`
```sh
projclean -C $HOME node_modules # equal to `cd $HOME && projclean node_modules`
```Find node_modules with the latest updates over 30 days and occupy more than 1G disk space.
```sh
projclean node_modules --time +30 --size +1G
```## Search Rule
Projclean find targets according search rule.
Rule consist of two parts:
```
[@detect[,detect...]]
```| project | rule |
| :------- | :-------------------------------------------- |
| nodejs | `node_modules` |
| cargo | `target@Cargo.toml` |
| maven | `target@pom.xml` |
| gradle | `.gradle,build@build.gradle,build.gradle.kts` |
| cmake | `build@CMakeLists.txt` |
| composer | `vendor@composer.json` |
| dotnet | `bin,obj@*.csproj,*.fsproj` |
| vs | `.vs,Debug,Release@*.sln` |
| vc++ | `Debug,Release@*.vcxproj` |
| swift | `.build,.swiftpm@Package.swift` |
| pod | `Pods@Podfile` |
| pub | `.dart_tool,build@pubspec.yaml` |
| sbt | `target,project/target@build.sbt` |
| jupyter | `.ipynb_checkpoints@*.ipynb` |
| zig | `zig-cache,zig-out@build.zig` |
| rebar | `_build@rebar.config` |
| dune | `_build@dune-project` |
| mix | `_build@mix.exs` |
| stack | `.stack-work@stack.yaml` |
| godot | `.godot@project.godot` |## License
Copyright (c) 2022-2024 projclean-developers.
argc is made available under the terms of either the MIT License or the Apache License 2.0, at your option.
See the LICENSE-APACHE and LICENSE-MIT files for license details.