Taidy
A linter/formatter for all file types. Designed for AI agents to be able to easily use, so that you can tell them to use this for every file and it won't fail. Detects what tools are installed and uses them. If it can't find a tool, it passes silently.
Mostly written by AI (Claude Sonnet).
Features
- 🔍 Automatic Tool Detection: Tries multiple linters/formatters in priority order
- 🚀 Zero Configuration: Works out of the box (but respects existing config)
- 🔧 Extensible: Easy to add support for new languages and tools
- 📦 Python Package: Easy to install with pip, or run directly with Python
- 🎯 Smart Fallbacks: Gracefully falls back when preferred tools aren't available
Supported Languages & Tools
| Language | Priority Order |
|---|---|
| Python | ruff → uvx ruff → black → flake8 → pylint → python -m py_compile |
| JavaScript | eslint → prettier → node --check |
| TypeScript | eslint → tsc --noEmit → prettier |
| Go | gofmt |
| Rust | rustfmt |
| Ruby | rubocop |
| PHP | php-cs-fixer |
| JSON/CSS | prettier |
Installation
Option 1: uv tool install (Recommended)
# Install uv if you don't have it:
# curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install taidy
Option 2: pip install
pip install taidy
Option 3: Development Installation
git clone https://github.com/singletoned/taidy.git
cd taidy
pip install -e .
Option 4: Run Directly (No Installation)
git clone https://github.com/singletoned/taidy.git
cd taidy
python -m taidy file.py
Usage
Basic Usage
# Lint/format specific files
taidy main.py utils.js styles.css
# Or with python -m
python -m taidy main.py utils.js styles.css
# Lint/format all files in current directory (with find)
find . -name "*.py" -o -name "*.js" | xargs taidy
# Show help
taidy --help
# Show version
taidy --version
Examples
# Python files - will use ruff if available, fall back to black, etc.
taidy src/main.py tests/test_utils.py
# Mixed file types - each gets the appropriate linter
taidy main.py app.js styles.css README.md
# TypeScript project
taidy src/**/*.ts src/**/*.tsx
How It Works
Taidy examines each file's extension and tries linters/formatters in priority order:
- Check Availability: Uses
shutil.which()to see if each tool is installed - Run First Available: Executes the first available tool with appropriate arguments
- Report Results: Shows what was run and any issues found
For example, with a Python file:
- First tries
ruff check file.py - If ruff isn't installed, tries
uvx ruff check file.py - If uv isn't available, falls back to
black --check --diff file.py - And so on...
Development
Requirements
- Python 3.6+
- just (for build scripts)
- Docker (for integration tests)
Building
# Install in development mode
pip install -e .
# Build distribution packages
python -m build
# Run tests
just test
# Clean build artifacts
just clean
Testing
The project uses Behavior Driven Development (BDD) with Godog and testcontainers.
# Run all tests
just test
# Run specific feature
just test-feature features/python.feature
Contributing
- Fork the repository
- Create a feature branch
- Add tests for your changes
- Ensure all tests pass
- Submit a pull request
License
MIT License - see LICENSE file for details.
Roadmap
- Configuration file support (.taidy.yaml)
- Custom linter definitions
- Parallel execution for multiple files
- Plugin system
- More language support (C++, C#, Kotlin, etc.)
- Integration with popular editors (VS Code, vim, emacs)
Inspiration
Inspired by tools like:
- trunk - Universal linter/formatter
- mega-linter - Comprehensive linting suite
- pre-commit - Git hook framework
Taidy aims to be simpler and more focused: just automatically run the right linter for each file type.
Metadata
Release files for taidy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taidy-0.1.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taidy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / taidy-0.1.0.tar.gz
| Download URL | taidy-0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25e1dd8f912e7994d4d4f37918e758bdbc627e6ba6ea8b23b0d501032af961cd
|
|
BLAKE2b-256 checksum How to use checksums |
06b737a42ded1ca76fde5a7757027709b8a01b23a7c7465a40f6210fdefb6c07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / taidy-0.1.0-py3-none-any.whl
| Download URL | taidy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75c648d592e32fa1fae9ecdcb3f4d911ea45a3b5859cd198c2a0fa1cd83ea299
|
|
BLAKE2b-256 checksum How to use checksums |
1abc71e6f0e61cf7a5ea070caa3bd034e6a693d8b6df21dc715042e9bcf8a065
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|