Metadata-Version: 2.3
Name: CLI_Cleaner
Version: 1.0
Summary: A command-line tool for safely cleaning files and directories using customizable rules and dry-run preview
Author: DasKaroWow
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: platformdirs (>=4.3.8)
Requires-Dist: rich (>=14.1.0)
Requires-Dist: typer (>=0.16.0)
Project-URL: Homepage, https://github.com/DasKaroWow/cli_cleaner
Project-URL: Issues, https://github.com/DasKaroWow/cli_cleaner/issues
Project-URL: Source, https://github.com/DasKaroWow/cli_cleaner
Description-Content-Type: text/markdown

# 🧹 cleaner

**cleaner** is a powerful and safe CLI tool for cleaning up unwanted files and directories in your project, with support for dry-run mode, glob patterns, and rich terminal output.

## ✨ Features

- Dry-run mode (`--delete` optional)
- Match by:
  - folder name (`--dirs`)
  - file name (`--files`)
  - glob patterns (`--globs`)
- Rich output with icons and colors
- Ignore specific files and folders
- Root directory control (`--root`)
- Works well with `pipx` or `uv tool install`

---

## 🚀 Installation

Install via [`pipx`](https://pypa.github.io/pipx/):

```bash
pipx install git+https://github.com/DasKaroWow/cli_cleaner.git
```

Or with [`uv`](https://github.com/astral-sh/uv):

```bash
uv tool install --from git+https://github.com/DasKaroWow/cli_cleaner
```

---

## 🛠 Usage

```bash
cleaner --dirs __pycache__ --globs "*.pyc" "build/**" --delete
```

🔎 Dry-run (default):
```bash
cleaner --files project_dump.txt --globs "*.log"
```

🗑️ Real delete:
```bash
cleaner --dirs dist --delete
```

📁 Specify root directory:
```bash
cleaner --dirs .venv --root ./backend --delete
```

🙈 Ignore certain files/folders:
```bash
cleaner --dirs __pycache__ --ignore-dirs migrations --ignore-files keep.py
```

---

## 💻 Example Output

```
👀 DRY RUN in /home/user/project
👀 Would delete: src/__pycache__/utils.cpython-310.pyc
👀 Would delete: build/output.txt
────────────────────────────────────────────
👀 2 files will be deleted with --delete option
```

Or:

```
🗑️ DELETING in /home/user/project
🗑️ Deleting: dist/
✅ done
────────────────────────────────────────────
🗑️ 1 files successfully deleted; 0 could not be deleted
```

---

## 📦 Project layout

```
src/
└── cleaner/
    ├── cli.py
    ├── __init__.py
    └── __main__.py
```

---

## ✅ Requirements

- Python 3.10+
- [`typer`](https://typer.tiangolo.com/)
- [`rich`](https://rich.readthedocs.io/)

---

## 📄 License

MIT License

