Cleany
Cleany is a CLI tool to clean up your source files.
Install
Install via pip
$ pip install cleany
Invoke
Cleany is a command line tool. Once installed, invoke it from the command line:
$ cleany
> cleany -h for help
Remove emojis:
$ cleany --emoji
Cleany will attempt to remove all emojis from all valid UTF-8 text files it finds.
IF cleany removes at least one emoji from a .py file, it will attempt to refactor the file using Ruff. Since this can significantly change the shape of your source files, you can disable Ruff:
$ cleany --emoji --no-ruff
If cleany does not remove an emoji from a Python file, it will not run Ruff against it.
Change the path.
Cleany will search for files starting in your current directory and moving recursively down. If you would like to specify a directory, use --path:
$ cleany --emoji --path some-directory
Ignore directory
If you want Cleany to skip directory, use --ignore-dir:
$ cleany --emoji --ignore-dir some-directory
You can ignore multiple directories:
$ cleany --emoji --ignore-dir some-directory --ignore-dir another-directory
By default cleany will skip hidden directories (directory names which begin with .) It will also skip the following directories:
- venv
- add more here
Ignore file
If you want Cleany to skip a file, use --ignore-file:
$ cleany --nuke --ignore-file banana.js
You can ignore multiple files:
$ cleany --emoji --ignore-file banana.js --ignore-file palace.js
Do not include the full path to the file; just use the file name. Cleany will find and skip any file with that name.
Remove comments from Python files
If cleany finds .py files, it can remove all # comments from them. Does not remove docstrings.
$ cleany --nuke
IF cleany removes at least one comment from a .py file, it will attempt to refactor the file using Ruff. Since this can significantly change the shape of your source files, you can disable Ruff:
$ cleany --nuke --no-ruff
If cleany does not remove a comment from a Python file, it will not run Ruff against it.
Surpress Cleany's output
By default Cleany will provide output about the files it's cleaning up.
$ cleany --nuke
> ----- scanning comments in /src/main.py -----
> removing comment from line 85 of /src/main.py
> removing comment from line 115 of /src/main.py
> removed 2 comments from /src/main.py
If you want to surpress that output, use --quiet:
$ cleany --nuke --quiet
$
Release files for cleany 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cleany-0.3.4.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cleany-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / cleany-0.3.4.tar.gz
| Download URL | cleany-0.3.4.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54806e21583bfb74d710ff6e98daa32fdc715adb483b9487c3e17626915c7b2c
|
|
BLAKE2b-256 checksum How to use checksums |
ebbc407efcf25157bca57f0c44a95a71f6876b25aff963c20e5dfc8b916ca814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / cleany-0.3.4-py3-none-any.whl
| Download URL | cleany-0.3.4-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a38fca041e84dbd5edd5e3885ca96abfbb7a2665796d6eb60e7aab68e79a305a
|
|
BLAKE2b-256 checksum How to use checksums |
781edd8c64e07a6a5124ad86a2762007bc78f25eea8cf8fd8d45073b11714d44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency log