Lintro
A comprehensive CLI tool that unifies various code formatting, linting, and quality assurance tools under a single command-line interface.
🚀 Quick Start
# Install (choose one)
uv pip install lintro # Python / PyPI (or: pip install lintro)
bun add -g @lgtm-hq/lintro # Node / npm — self-contained, no Python
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 5-tier config system.
🛠️ Supported Tools
| Tool | Language | Auto-fix | Install |
|---|---|---|---|
| Linters | |||
| ⚙️ GitHub Actions | - | GitHub Releases | |
| 🦀 Rust | ✅ | rustup component add clippy |
|
| 🔀 Git commits | - | bun add -D @commitlint/cli @commitlint/config-conventionalnpm install -D @commitlint/cli @commitlint/config-conventional |
|
| 🐹 Go | ✅ | brew install golangci-lintInstall docs |
|
| 🐳 Dockerfile | - | GitHub Releases | |
| 🌐 HTML | - | bun add -D html-validatenpm install -D html-validate |
|
| 📝 Markdown | - | bun add -D markdownlint-cli2npm install -D markdownlint-cli2 |
|
| 📝 Prose / Docs | - | brew install valeGitHub Releases |
|
| 🟨 JS/TS | ✅ | bun add -D oxlintnpm install -D oxlint |
|
| 🐍 Python | - | 📦 | |
| 🐚 Shell Scripts | - | brew install shellcheckGitHub Releases |
|
| 🧾 YAML | - | 📦 | |
| Formatters | |||
| 🐍 Python | ✅ | 📦 | |
| 🟨 JS/TS | ✅ | bun add -D oxfmtnpm install -D oxfmt |
|
| 🟨 JS/TS · 🧾 JSON | ✅ | bun add -D prettiernpm install -D prettier |
|
| 🐚 Shell Scripts | ✅ | brew install shfmtGitHub Releases |
|
| 🦀 Rust | ✅ | rustup component add rustfmt |
|
| Lint + Format | |||
| 🐍 Python | ✅ | 📦 | |
| 🗃️ SQL | ✅ | pipx install sqlfluff |
|
| 🧾 TOML | ✅ | brew install taploGitHub Releases |
|
| 🔑 .env Files | ✅ | brew install dotenv-linterGitHub Releases |
|
| 🎨 CSS/SCSS/Sass/Less | ✅ | bun add -D stylelintnpm install -D stylelint |
|
| Type Checkers | |||
| 🚀 Astro | - | bun add astro + bun add -D @astrojs/checknpm install astro + npm install -D @astrojs/check |
|
| 🐍 Python | - | 📦 | |
| 🔥 Svelte | - | bun add -D svelte-checknpm install -D svelte-check |
|
| 🟨 JS/TS | - | bun add -D typescriptnpm install -D 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 | |
| 🐍 Python | - | pip install pip-audituv add pip-auditbrew install pip-audit |
|
| 🔒 Multi-language | - | pipx install semgreppip install semgrepbrew install semgrep |
|
| 🔐 Secret Detection | - | brew install trufflehogGitHub Releases |
|
| AI Tools | |||
| 🤖 AI · Multi-language | - | uv pip install 'lintro[ai]' + API key |
📦 = bundled with lintro — no separate install needed
⚡ Node.js tools support--auto-installto install dependencies automatically
🟨 Every Node.js tool resolves the same way: the checked project'snode_modules/.binfirst, then a binary onPATH, then a version-pinnedbunx/npxfetch. A project devDependency (-D, shown above) is therefore always the best answer — it is lockfile-pinned and needs no network. A global (-g) or Homebrew install still works and is used when no local install exists. See Node.js tool resolution.
🤖 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.
# Lightweight (CLI only — detects tools on PATH)
uv pip install lintro
brew tap lgtm-hq/tap && brew install lintro
# Full (bundled Python tools: ruff, black, mypy, bandit, pydoclint, yamllint)
uv pip install 'lintro[full]'
brew tap lgtm-hq/tap && brew install lintro-full
# Docker (all tools)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro:latest check
# Docker (CLI only)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro-base:latest check
# First run after lightweight install
lintro init
lintro doctor
lintro install --profile recommended
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"
# Only scan files changed vs a git base ref (fast PR-scoped checks)
lintro check --diff # vs the repo default branch (origin/HEAD)
lintro check --diff main # vs an explicit ref
lintro format --diff # format only changed files
# 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; separate GHCR package)
docker run --rm -v $(pwd):/code ghcr.io/lgtm-hq/py-lintro-base:latest 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 |
| Pre-commit Integration | Run lintro as a pre-commit hook |
| 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
📄 License
MIT License - see LICENSE for 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 lintro-0.118.5.tar.gz.
File metadata
- Download URL: lintro-0.118.5.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fd0663c6ffc5fe9a3e61a75898b2471a400920de692c55ba44b8a3364067c3e
|
|
| MD5 |
7172557c053ff947b189a63cffa19235
|
|
| BLAKE2b-256 |
fa1061ed67bf815e94e8a0ef6404b5e1eb87c9a60633caafd9be48911cf342a1
|
Provenance
The following attestation bundles were made for lintro-0.118.5.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.118.5.tar.gz -
Subject digest:
0fd0663c6ffc5fe9a3e61a75898b2471a400920de692c55ba44b8a3364067c3e - Sigstore transparency entry: 2501093824
- Sigstore integration time:
-
Permalink:
lgtm-hq/py-lintro@f6a106e8b7efa226682d8f10731bc105b530e393 -
Branch / Tag:
refs/tags/v0.118.5 - 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@f6a106e8b7efa226682d8f10731bc105b530e393 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lintro-0.118.5-py3-none-any.whl.
File metadata
- Download URL: lintro-0.118.5-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ac681097c4adf679a09eca33de776e206d4110ddb3371bce7b4ea366855a6fe
|
|
| MD5 |
d1c24c0ff083df936421b84b989c40ca
|
|
| BLAKE2b-256 |
ed7329e4e9aa90be495126769293d98d49e6cc3b08264038cb362e7227de8e47
|
Provenance
The following attestation bundles were made for lintro-0.118.5-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.118.5-py3-none-any.whl -
Subject digest:
7ac681097c4adf679a09eca33de776e206d4110ddb3371bce7b4ea366855a6fe - Sigstore transparency entry: 2501093842
- Sigstore integration time:
-
Permalink:
lgtm-hq/py-lintro@f6a106e8b7efa226682d8f10731bc105b530e393 -
Branch / Tag:
refs/tags/v0.118.5 - 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@f6a106e8b7efa226682d8f10731bc105b530e393 -
Trigger Event:
push
-
Statement type: