Skip to main content

A unified CLI tool for code formatting, linting, and quality assurance

Project description

Lintro

Lintro Logo

A comprehensive CLI tool that unifies various code formatting, linting, and quality assurance tools under a single command-line interface.

Tests CI Docker Coverage

Release PyPI Python License

CodeQL OpenSSF Scorecard OpenSSF Best Practices SBOM SBOM Status

๐Ÿš€ Quick Start

pip install lintro          # Install
lintro check .              # Find issues
lintro format .             # Fix issues
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, .eslintrc, etc. work as-is
  • Enforce settings override consistently - Set line_length: 88 once, 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
Actionlint โš™๏ธ GitHub Actions -
Bandit ๐Ÿ Python -
Black ๐Ÿ Python โœ…
Clippy ๐Ÿฆ€ Rust โœ…
Gitleaks ๐Ÿ” Secret Detection -
Hadolint ๐Ÿณ Dockerfile -
Markdownlint ๐Ÿ“ Markdown -
Mypy ๐Ÿ Python -
Oxfmt ๐ŸŸจ JS/TS โœ…
Oxlint ๐ŸŸจ JS/TS โœ…
Prettier ๐ŸŸจ JS/TS ยท ๐Ÿงพ JSON โœ…
pydoclint ๐Ÿ Python -
Ruff ๐Ÿ Python โœ…
Semgrep ๐Ÿ”’ Multi-language -
ShellCheck ๐Ÿš Shell Scripts -
shfmt ๐Ÿš Shell Scripts โœ…
SQLFluff ๐Ÿ—ƒ๏ธ SQL โœ…
Taplo ๐Ÿงพ TOML โœ…
TypeScript ๐ŸŸจ JS/TS -
Yamllint ๐Ÿงพ YAML -

๐Ÿ“‹ Requirements

Python Version

Python 3.11+ is required. Lintro uses modern Python features not available in older versions.

Bundled Tools

These Python tools are automatically installed with Lintro:

  • Ruff - Fast Python linter and formatter
  • Black - Python code formatter
  • Bandit - Python security linter
  • Mypy - Python static type checker
  • Yamllint - YAML linter
  • pydoclint - Python docstring linter

Optional External Tools

For full functionality, install these additional tools:

  • Prettier - npm install -g prettier
  • Markdownlint-cli2 - npm install -g markdownlint-cli2
  • Oxlint - bun add -g oxlint or npm install -g oxlint
  • Oxfmt - bun add -g oxfmt or npm install -g oxfmt
  • Hadolint - GitHub Releases
  • Actionlint - GitHub Releases
  • Semgrep - pipx install semgrep, pip install semgrep, or brew install semgrep
  • Gitleaks - brew install gitleaks or GitHub Releases
  • ShellCheck - brew install shellcheck or GitHub Releases
  • shfmt - brew install shfmt or GitHub Releases
  • SQLFluff - pip install sqlfluff
  • Taplo - brew install taplo or GitHub Releases
  • TypeScript - brew install typescript, bun add -g typescript, or npm install -g typescript

Check all tool versions with: lintro list-tools

๐Ÿ“ฆ Installation

# PyPI (recommended)
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
lintro check .

# Auto-fix issues
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 (useful for TypeScript projects)
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
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

๐Ÿ“„ 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

lintro-0.43.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lintro-0.43.0-py3-none-any.whl (417.4 kB view details)

Uploaded Python 3

File details

Details for the file lintro-0.43.0.tar.gz.

File metadata

  • Download URL: lintro-0.43.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lintro-0.43.0.tar.gz
Algorithm Hash digest
SHA256 da05232b7458958cfff92893887a8d214857bbc070b9fef1411d2f7412bae34b
MD5 f899a92a86ca44c974450d12d5f257ab
BLAKE2b-256 bc6fa4b97e1158059b3582231e82d2d643d6905cfa30289bc1a9adaca098788c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lintro-0.43.0.tar.gz:

Publisher: publish-pypi-on-tag.yml on lgtm-hq/py-lintro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lintro-0.43.0-py3-none-any.whl.

File metadata

  • Download URL: lintro-0.43.0-py3-none-any.whl
  • Upload date:
  • Size: 417.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lintro-0.43.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78a0c3a1d20d2870bff57df7b3c48e2bb857f544df76f46fae381b402618c3a7
MD5 ceefbf019fa5e0fb5ee286a89f85cab3
BLAKE2b-256 328686bc182477fd08e0a2bfbb7eb1f75331e3aa623eaee2c7f5d566a15f243e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lintro-0.43.0-py3-none-any.whl:

Publisher: publish-pypi-on-tag.yml on lgtm-hq/py-lintro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page