Monitor Python files and auto-run ruff, ty, and formatting checks on change. Fast, colorful, and easy CLI for code quality automation.
Project description
ruffit
A Python CLI tool for monitoring .py files and automatically running code quality checks and formatting.
Features
- Watches for changes to Python files in any folder you specify
- Debounces rapid file events to avoid duplicate triggers
- On modification, automatically runs:
ruff formatto auto-format coderuff checkto lint and check for code issuesty checkto check type annotations
- Rich terminal output for clear, colorful feedback
- Flexible CLI: monitor any folder by name, or the whole project
Installation
pip install ruffit
Or, for local development:
pip install -e .
Usage
Monitor all Python files in the project:
ruffit all
Monitor only a specific folder (e.g., tests):
ruffit tests
If the folder does not exist, ruffit will print an error.
Development & Testing
- Tests are in the
tests/folder and usepytest. - To install test dependencies:
pip install .[test]
- To run tests:
pytest
Contributing
Pull requests and issues are welcome!
License
MIT
Troubleshooting: Command Not Found
If you see an error like:
'ruffit' is not recognized as the name of a cmdlet, function, script file, or operable program.
This usually means the Python Scripts directory is not in your PATH, or you are not in the correct virtual environment.
- If you are using a virtual environment, make sure it is activated before installing and running ruffit:
.venv\Scripts\Activate pip install ruffit ruffit
- If you still see the error, you can always run ruffit with:
python -m ruffit
See the Python documentation for more on PATH and script locations.
Project details
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 ruffit-0.1.1.tar.gz.
File metadata
- Download URL: ruffit-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
253fcc1aff40f40f5d7d680e35be8c3708d935f264a825029058c1bed49931ff
|
|
| MD5 |
28acefe34af66dc2037a88f4e16e84b6
|
|
| BLAKE2b-256 |
5e25cd68a2aa0ff82ce65df886854570437dcc929ce32edd9bc007f1f33de370
|
File details
Details for the file ruffit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ruffit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ec27b236b023d6e3dd81be9754155fc774131e22b2fbbe10cb5db8c268bdee9
|
|
| MD5 |
ce837f6a05dd981ab5d2668defdc2d2a
|
|
| BLAKE2b-256 |
69f735f10aa49ad1dce1dadc41ae704580eeed75e89dd1e9698124b8062c456c
|