Tutorials
Step-by-step guides to get you started with Tidy CLI.
Getting Started
1. Installation
Install Tidy CLI using your preferred package manager:
pip install tidy-cli
uv pip install tidy-cli
# or add to project
uv add tidy-cli
2. First Setup
Initialize Tidy CLI in your project:
tidy-cli init
This will prompt you for:
- Pytest folder path: Directory containing your tests (usually tests
or .
)
- Pyproject.toml location: Path to your configuration file
- Default lint path: Directory to lint by default (usually src
)
- Config path: Location of pyproject.toml relative to current directory
3. Your First Lint Run
Run a complete code quality check:
tidy-cli lint run
This executes: - Ruff: Fast Python linter and formatter - MyPy: Static type checking - Pydoclint: Docstring validation
4. Auto-fixing Issues
Let Tidy CLI fix what it can automatically:
tidy-cli lint run --fix
5. Running Tests
Execute your test suite with coverage:
tidy-cli pytest run
Complete Workflow
New Project Setup
mkdir my-project && cd my-project
mkdir src tests
tidy-cli init # Follow prompts
tidy-cli lint run --fix
Existing Project
cd existing-project
tidy-cli init
tidy-cli lint run --interactive # Review each tool
Runtime Configuration Override
# Override settings temporarily without changing saved configuration
tidy-cli lint run --default-dir backend/src
tidy-cli pytest run --default-dir backend/tests --pyproject-path backend/pyproject.toml
Next Steps
- Learn about specific commands
- Explore configuration options
- Understand the concepts behind Tidy CLI