A unified CLI tool for code formatting, linting, and quality assurance
Project description
Lintro
A comprehensive CLI tool that unifies various code formatting, linting, and quality assurance tools under a single command-line interface.
๐ Quick Start
uv pip install lintro # Install (or: pip install lintro)
lintro check . # Find issues (alias: chk)
lintro format . # Fix issues (alias: fmt)
lintro check --output-format grid # Beautiful output
โจ Why Lintro?
- ๐ฏ Unified Interface - One command for all your linting and formatting tools
- ๐ Consistent Output - Beautiful, standardized output formats across all tools
- ๐ง Auto-fixing - Automatically fix issues where possible
- ๐ณ Docker Ready - Run in isolated containers for consistent environments
- ๐ Rich Reporting - Multiple formats: grid, JSON, HTML, CSV, Markdown
- โก Fast - Optimized parallel execution
๐ Works With Your Existing Configs
Lintro respects your native tool configurations. If you have a .prettierrc,
pyproject.toml [tool.ruff], or .yamllint, Lintro uses them automatically - no
migration required.
- Native configs are detected - Your existing
.prettierrc,.oxlintrc.json, etc. work as-is - Enforce settings override consistently - Set
line_length: 88once, applied everywhere - Fallback defaults when needed - Tools without native configs use sensible defaults
See the Configuration Guide for details on the 4-tier config system.
๐ ๏ธ Supported Tools
| Tool | Language | Auto-fix | Install |
|---|---|---|---|
| Linters | |||
| โ๏ธ GitHub Actions | - | GitHub Releases | |
| ๐ฆ Rust | โ | rustup component add clippy |
|
| ๐ณ Dockerfile | - | GitHub Releases | |
| ๐ Markdown | - | bun add -g markdownlint-cli2npm install -g markdownlint-cli2 |
|
| ๐จ JS/TS | โ | bun add -g oxlintnpm install -g oxlint |
|
| ๐ Python | - | ๐ฆ | |
| ๐ Shell Scripts | - | brew install shellcheckGitHub Releases |
|
| ๐งพ YAML | - | ๐ฆ | |
| Formatters | |||
| ๐ Python | โ | ๐ฆ | |
| ๐จ JS/TS | โ | bun add -g oxfmtnpm install -g oxfmt |
|
| ๐จ JS/TS ยท ๐งพ JSON | โ | bun add -g prettiernpm install -g prettier |
|
| ๐ Shell Scripts | โ | brew install shfmtGitHub Releases |
|
| ๐ฆ Rust | โ | rustup component add rustfmt |
|
| Lint + Format | |||
| ๐ Python | โ | ๐ฆ | |
| ๐๏ธ SQL | โ | pipx install sqlfluff |
|
| ๐งพ TOML | โ | brew install taploGitHub Releases |
|
| Type Checkers | |||
| ๐ Astro | - | bun add astronpm install astro |
|
| ๐ Python | - | ๐ฆ | |
| ๐ฅ Svelte | - | bun add -D svelte-checknpm install -D svelte-check |
|
| ๐จ JS/TS | - | bun add -g typescriptnpm install -g typescriptbrew install typescript |
|
| ๐ Vue | - | bun add -D vue-tscnpm install -D vue-tsc |
|
| Security | |||
| ๐ Python | - | ๐ฆ | |
| ๐ Secret Detection | - | brew install gitleaksGitHub Releases |
|
| ๐ฆ Rust | - | cargo install cargo-audit |
|
| ๐ฆ Rust | - | cargo install cargo-deny |
|
| ๐ Multi-ecosystem | - | GitHub Releases | |
| ๐ Multi-language | - | pipx install semgreppip install semgrepbrew install semgrep |
๐ฆ = bundled with lintro โ no separate install needed
โก Node.js tools support--auto-installto install dependencies automatically
๐ค AI-Powered Features (Optional)
Lintro includes optional AI-powered features that provide actionable summaries and interactive fix suggestions. AI features are BYO (Bring Your Own) API key โ not enabled by default.
- Providers: Anthropic Claude, OpenAI GPT
- AI Summary โ high-level assessment with pattern analysis (1 API call per run)
- Interactive Fix Suggestions โ AI-generated code diffs with risk classification
- Post-fix Summary โ contextualizes what was fixed and what remains
# Install with AI support
uv pip install 'lintro[ai]'
export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY
# Enable in config
# .lintro-config.yaml
# ai:
# enabled: true
# provider: anthropic
See the AI Features Guide for full documentation.
๐ฆ Installation
Python 3.11+ is required. Check tool versions with lintro list-tools.
# PyPI (recommended)
uv pip install lintro # or: pip install lintro
# Homebrew (macOS binary)
brew tap lgtm-hq/tap && brew install lintro-bin
# Docker (tools image - includes all external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check
# Docker (base image - minimal, no external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:base check
See Getting Started for detailed installation options.
๐ป Usage
# Check all files (alias: chk)
lintro check .
# Auto-fix issues (alias: fmt)
lintro format .
# Grid output with grouping
lintro check --output-format grid --group-by file
# Run specific tools
lintro check --tools ruff,prettier,mypy
# Auto-install Node.js dependencies
lintro check --tools tsc --auto-install
# Exclude directories
lintro check --exclude "node_modules,dist,venv"
# List available tools
lintro list-tools
๐ณ Docker
# Run from GHCR (tools image - recommended)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check
# With formatting
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check --output-format grid
# Base image (minimal, no external tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:base check
๐ Documentation
| Guide | Description |
|---|---|
| Getting Started | Installation, first steps, requirements |
| Configuration | Tool configuration, options, presets |
| AI Features | AI summaries, fix suggestions, config |
| Docker Usage | Containerized development |
| GitHub Integration | CI/CD setup, workflows |
| Contributing | Development guide, adding tools |
| Troubleshooting | Common issues and solutions |
Advanced: Tool Analysis ยท Architecture ยท Security
๐จ Development
# Clone and install
git clone https://github.com/lgtm-hq/py-lintro.git
cd py-lintro
uv sync --dev
# Run tests
./scripts/local/run-tests.sh
# Run lintro on itself
./scripts/local/local-lintro.sh check --output-format grid
๐ค Community
- ๐ Bug Reports
- ๐ก Feature Requests
- โ Questions
- ๐ Contributing Guide
๐ License
MIT License - see LICENSE for details.
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 lintro-0.60.1.tar.gz.
File metadata
- Download URL: lintro-0.60.1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c0dc7dd4d6cde1b68320a65e3a75a0fa2c8f921a531d305770d9e40f3c53065
|
|
| MD5 |
c5e4302a70cd0c310fd0e7353671670f
|
|
| BLAKE2b-256 |
7a6ff8e6fde980c1c5fa655ecde3c3b8f378a9a0a759cf9ce13d6487bd22e376
|
Provenance
The following attestation bundles were made for lintro-0.60.1.tar.gz:
Publisher:
publish-pypi-on-tag.yml on lgtm-hq/py-lintro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lintro-0.60.1.tar.gz -
Subject digest:
6c0dc7dd4d6cde1b68320a65e3a75a0fa2c8f921a531d305770d9e40f3c53065 - Sigstore transparency entry: 1244043883
- Sigstore integration time:
-
Permalink:
lgtm-hq/py-lintro@a62c2f6c33592af1575a0c8d934c4b818531e0d9 -
Branch / Tag:
refs/tags/v0.60.1 - Owner: https://github.com/lgtm-hq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-on-tag.yml@a62c2f6c33592af1575a0c8d934c4b818531e0d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lintro-0.60.1-py3-none-any.whl.
File metadata
- Download URL: lintro-0.60.1-py3-none-any.whl
- Upload date:
- Size: 645.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb3863307f354f8c9d73e834bb175eed2f0217b59c71412a4d04821c207c3145
|
|
| MD5 |
0f9c1272b361d1bc75942d4bedd3f756
|
|
| BLAKE2b-256 |
8de849a4fbcd6fcf5094ae00aa47da151237c180e3a36d580db3834f3355fd7e
|
Provenance
The following attestation bundles were made for lintro-0.60.1-py3-none-any.whl:
Publisher:
publish-pypi-on-tag.yml on lgtm-hq/py-lintro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lintro-0.60.1-py3-none-any.whl -
Subject digest:
fb3863307f354f8c9d73e834bb175eed2f0217b59c71412a4d04821c207c3145 - Sigstore transparency entry: 1244044160
- Sigstore integration time:
-
Permalink:
lgtm-hq/py-lintro@a62c2f6c33592af1575a0c8d934c4b818531e0d9 -
Branch / Tag:
refs/tags/v0.60.1 - Owner: https://github.com/lgtm-hq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-on-tag.yml@a62c2f6c33592af1575a0c8d934c4b818531e0d9 -
Trigger Event:
push
-
Statement type: