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.

CI Docker Coverage

Release PyPI Python License

CodeQL OpenSSF Scorecard OpenSSF Best Practices SBOM SBOM Status

๐Ÿš€ 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: 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

ToolLanguageAuto-fixInstall
Linters
Actionlint โš™๏ธ GitHub Actions - GitHub Releases
Clippy ๐Ÿฆ€ Rust โœ… rustup component add clippy
Hadolint ๐Ÿณ Dockerfile - GitHub Releases
Markdownlint ๐Ÿ“ Markdown - bun add -g markdownlint-cli2
npm install -g markdownlint-cli2
Oxlint ๐ŸŸจ JS/TS โœ… bun add -g oxlint
npm install -g oxlint
pydoclint ๐Ÿ Python - ๐Ÿ“ฆ
ShellCheck ๐Ÿš Shell Scripts - brew install shellcheck
GitHub Releases
Yamllint ๐Ÿงพ YAML - ๐Ÿ“ฆ
Formatters
Black ๐Ÿ Python โœ… ๐Ÿ“ฆ
Oxfmt ๐ŸŸจ JS/TS โœ… bun add -g oxfmt
npm install -g oxfmt
Prettier ๐ŸŸจ JS/TS ยท ๐Ÿงพ JSON โœ… bun add -g prettier
npm install -g prettier
shfmt ๐Ÿš Shell Scripts โœ… brew install shfmt
GitHub Releases
rustfmt ๐Ÿฆ€ Rust โœ… rustup component add rustfmt
Lint + Format
Ruff ๐Ÿ Python โœ… ๐Ÿ“ฆ
SQLFluff ๐Ÿ—ƒ๏ธ SQL โœ… pipx install sqlfluff
Taplo ๐Ÿงพ TOML โœ… brew install taplo
GitHub Releases
Type Checkers
Astro ๐Ÿš€ Astro - bun add astro
npm install astro
Mypy ๐Ÿ Python - ๐Ÿ“ฆ
svelte-check ๐Ÿ”ฅ Svelte - bun add -D svelte-check
npm install -D svelte-check
TypeScript ๐ŸŸจ JS/TS - bun add -g typescript
npm install -g typescript
brew install typescript
vue-tsc ๐Ÿ’š Vue - bun add -D vue-tsc
npm install -D vue-tsc
Security
Bandit ๐Ÿ Python - ๐Ÿ“ฆ
Gitleaks ๐Ÿ” Secret Detection - brew install gitleaks
GitHub Releases
cargo-audit ๐Ÿฆ€ Rust - cargo install cargo-audit
cargo-deny ๐Ÿฆ€ Rust - cargo install cargo-deny
OSV-Scanner ๐Ÿ”’ Multi-ecosystem - GitHub Releases
Semgrep ๐Ÿ”’ Multi-language - pipx install semgrep
pip install semgrep
brew install semgrep

๐Ÿ“ฆ = bundled with lintro โ€” no separate install needed
โšก Node.js tools support --auto-install to 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:latest 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; 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
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.63.2.tar.gz (2.1 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.63.2-py3-none-any.whl (658.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lintro-0.63.2.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

Hashes for lintro-0.63.2.tar.gz
Algorithm Hash digest
SHA256 0d6fcd706aab55b7028b523736d2db76ffef8711d8eb2a36b7e6df6202de636f
MD5 de1cbcbf107db7b37005656d01da75bc
BLAKE2b-256 6c99972d0bf04470c3d36164ec323b34e09c6f0f72c9db1e8dfb5e75f275145f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lintro-0.63.2.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.63.2-py3-none-any.whl.

File metadata

  • Download URL: lintro-0.63.2-py3-none-any.whl
  • Upload date:
  • Size: 658.0 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.63.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eeda8f90300f58f9be727689f514e24baa9b456932f32134392d5ea2939b40f9
MD5 0a4d1bab6bdf59276c90aba47bd2cd35
BLAKE2b-256 7d67a5cbc2374871df993a1da77b872be284890731dc9f7e0dd8a764b714882a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lintro-0.63.2-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