Minimal, safe, pyproject.toml-driven cleaning tool for Python projects.
Project description
doclean — Minimal Project Cleaner for Python Projects
doclean is a tiny command-line tool that removes build artifacts, cache folders, and other temporary files based on patterns you define in your project’s pyproject.toml.
It is designed to be simple, safe, and predictable, following familar configuration style used by common tools.
Why Another Clean Tool?
doclean aims to be:
- Minimal — no frameworks, no plugins
- Safe — prevents destructive deletions
- Config-driven — controlled entirely via pyproject.toml
- Predictable — does exactly what you configure, no more
⭐ Features
- Reads cleanup patterns from
[tool.doclean]inpyproject.toml - Supports:
- Wildcards (
*) - Recursive globs (
**/pattern) - Directories and files
- Wildcards (
- Safety checks:
- Prevents deleting project root
- Refuses paths outside the project directory
- Rejects symlinks
- Skips missing paths
- Searches upward to find the nearest
pyproject.toml - Optional
--drymode to preview deletions - Zero dependencies
📦 Installation
pip install git+https://github.com/thaerious/doclean.git
📦 Installation (development)
git clone git@github.com:Thaerious/doclean.git
python3 -m venv venv
source venv/bin/activate
pip install -e .[dev]
Details
Safety Rules
Before deleting anything, doclean validates each expanded path:
- Never deletes the project root
- Rejects paths outside the project directory
- Skips missing paths
- Only validated, safe paths are removed.
Example pyproject.toml
[tool.doclean]
paths = [
"build",
"dist",
"**/__pycache__",
".pytest_cache"
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file doclean-0.1.2.tar.gz.
File metadata
- Download URL: doclean-0.1.2.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36870ec8b3ed9fbcee5ac4a34d2b0bb51c5148003810fe5ecd6ce2b7c6f0b079
|
|
| MD5 |
1e3514c4f61bbd6423410154534b18d4
|
|
| BLAKE2b-256 |
5f8ca29690f06586de00bb8c9cdc8415d509b2302f6346ff1379ceb88d99d156
|
File details
Details for the file doclean-0.1.2-py3-none-any.whl.
File metadata
- Download URL: doclean-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0ef35a78db8110cba54d5c5706d3fd87d4cc9e9132872cdf4718411aa7dde5e
|
|
| MD5 |
0ce71ec1e8f6d3c66111f93e5c3df7d7
|
|
| BLAKE2b-256 |
d116a2d1e6cca44541ebd95cc5a47e4f66f63d4f0ddc79789b52d52d37e6b45d
|