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
# npm ships no Intel Mac binary; Intel Macs install via Homebrew or PyPI
lintro check . # Find issues (alias: chk)
lintro format . # Fix issues (alias: fmt)
lintro badge # shields.io issue-count badge
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 |
|
| 🔧 C/C++ | - | brew install cppcheckapt-get install cppcheck |
|
| 🐹 Go | ✅ | brew install golangci-lintInstall docs |
|
| 🐳 Dockerfile | - | GitHub Releases | |
| 🌐 HTML | - | bun add -D html-validatenpm install -D html-validate |
|
| 🐍 Python | - | 📦 | |
| 📝 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 | - | 📦 | |
| 🐍 Python | - | 📦 | |
| 🐚 Shell Scripts | - | brew install shellcheckGitHub Releases |
|
| 📘 OpenAPI/AsyncAPI/JSON Schema | - | bun add -D @stoplight/spectral-clinpm install -D @stoplight/spectral-cli |
|
| 🧾 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 | |||
| 🧩 Protobuf | ✅ | brew install bufbuild/buf/bufGitHub Releases |
|
| 🐍 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 |
|
| 🔤 Spelling | ✅ | brew install typos-clicargo install typos-cli |
|
| 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 | - | 📦 | |
| 🏗️ Terraform (IaC) | - | uv tool install checkov |
|
| 🔐 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 | - | ./scripts/utils/install-semgrep.shuv tool 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
# Homebrew ships a prebuilt binary on Apple silicon; Intel Macs install from PyPI
# Full (bundled Python tools: ruff, black, mypy, bandit, import-linter,
# pydoclint, pylint, 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.
Release files for lintro 0.156.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lintro-0.156.2.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lintro-0.156.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.6 MB
Release files / lintro-0.156.2.tar.gz
| Download URL | lintro-0.156.2.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
effd5decb14aaca3bff3856ac86ef4c5c13891a718a1c2600f0b7c59872603b5
|
|
BLAKE2b-256 checksum How to use checksums |
fb7674cfe8a2ae53bfeff511ed9eda882c24ed5d34ab13634a5935f3a84af638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / lintro-0.156.2-py3-none-any.whl
| Download URL | lintro-0.156.2-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a51aafb816eb171b5a416840c4d350d2317b94c313d44f4d4d2737345cc20c36
|
|
BLAKE2b-256 checksum How to use checksums |
1e03bcabd0ed83909dabfefcc8886a441377418f5ab6832ce0b602aac7c0ce6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency log