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.

What is Lintro?

Lintro is a unified command-line interface that brings together multiple code quality tools into a single, easy-to-use package. Instead of managing separate tools like Ruff, Prettier, Yamllint, and others individually, Lintro provides a consistent interface for all your code quality needs.

Python Coverage License Tests CI Docker PyPI

CodeQL OpenSSF Scorecard

Why Lintro?

  • 🚀 Unified Interface: One command to run 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 output formats (grid, JSON, HTML, CSV, Markdown)
  • ⚡ Fast: Optimized execution with efficient tool management
  • 🔒 Reliable: Comprehensive test suite with 84% coverage

Features

  • Unified CLI for multiple code quality tools
  • Multi-language support - Python, JavaScript, YAML, Docker, and more
  • Auto-fixing capabilities where possible
  • Beautiful output formatting with table views
  • Docker support for containerized environments
  • CI/CD integration with GitHub Actions

Supported Tools

Tool Language Auto-fix
Actionlint ⚙️ GitHub Workflows -
Bandit 🐍 Python -
Darglint 🐍 Python -
Hadolint 🐳 Dockerfile -
Prettier 🟨 JS/TS · 🧾 JSON
Ruff 🐍 Python
Yamllint 🧾 YAML -

Quick Start

Installation

From PyPI (Recommended)

pip install lintro

Development Installation

# Clone and install in development mode
git clone https://github.com/TurboCoder13/py-lintro.git
cd py-lintro
pip install -e .

Basic Usage

# Check all files for issues
lintro check

# Auto-fix issues where possible
lintro format

# Use grid formatting for better readability
lintro check --output-format grid

# Run specific tools only
lintro check --tools ruff,prettier,actionlint

# List all available tools
lintro list-tools

Docker Usage

Quick Start with Published Image

# Run Lintro directly from GitHub Container Registry
docker run --rm -v $(pwd):/code ghcr.io/turbocoder13/py-lintro:latest check

# With specific formatting
docker run --rm -v $(pwd):/code ghcr.io/turbocoder13/py-lintro:latest check --output-format grid

# Run specific tools only
docker run --rm -v $(pwd):/code ghcr.io/turbocoder13/py-lintro:latest check --tools ruff,prettier

Development Setup

# Clone and setup
git clone https://github.com/TurboCoder13/py-lintro.git
cd py-lintro
chmod +x scripts/**/*.sh

# Run with local Docker build
./scripts/docker/docker-lintro.sh check --output-format grid

See Docker Documentation for detailed usage.

Advanced Usage

Output Formatting

# Grid format (recommended)
lintro check --output-format grid --group-by code

# Export to file
lintro check --output report.txt

# Different grouping options
lintro check --output-format grid --group-by file  # Group by file
lintro check --output-format grid --group-by code  # Group by error type

Tool-Specific Options

# Exclude patterns
lintro check --exclude "migrations,node_modules,dist"

# Tool-specific options use key=value (lists with |)
lintro check --tool-options "ruff:line_length=88,prettier:print_width=80"

# Ruff fix configuration (fmt):
# By default, fmt applies both lint fixes and formatting for Ruff.
# Disable either stage as needed:
lintro format --tool-options ruff:lint_fix=False     # format only
lintro format --tool-options ruff:format=False       # lint fixes only

CI/CD Integration

Lintro includes pre-built GitHub Actions workflows:

  • Automated code quality checks on pull requests
  • Coverage reporting with badges
  • Multi-tool analysis across your entire codebase

See GitHub Integration Guide for setup instructions.

Documentation

For comprehensive documentation, see our Documentation Hub which includes:

Development

# Run tests
./scripts/local/run-tests.sh

# Run Lintro on itself
./scripts/local/local-lintro.sh check --output-format grid

# Docker development
./scripts/docker/docker-test.sh
./scripts/docker/docker-lintro.sh check --output-format grid

For detailed information about all available scripts, see Scripts Documentation.

Dependencies

  • Renovate for automated dependency updates
  • Python 3.13+ with UV package manager
  • Optional: Docker for containerized usage

License

This project is licensed under the MIT License. See the LICENSE file for details.

Troubleshooting

Common Issues

"Command not found: lintro"

Solution: Ensure Lintro is installed correctly:

pip install lintro
# or for development
pip install -e .

"Tool not found" errors

Solution: Install the required tools or use Docker:

# Install tools individually
pip install ruff darglint
npm install -g prettier
pip install yamllint
# or use Docker (recommended)
docker run --rm -v $(pwd):/code ghcr.io/turbocoder13/py-lintro:latest check

Permission errors on Windows

Solution: Run as administrator or use WSL:

# Use WSL for better compatibility
wsl
pip install lintro

Docker permission issues

Solution: Add your user to the docker group:

sudo usermod -aG docker $USER
# Log out and back in

Slow performance

Solution: Use exclude patterns and specific tools:

# Exclude large directories
lintro check --exclude "node_modules,venv,.git"

# Run specific tools only
lintro check --tools ruff,prettier

Getting Help

Contributing

We welcome contributions! See our Contributing Guide for details on:

  • Adding new tools
  • Reporting bugs
  • Submitting features
  • Code style guidelines

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.5.0.tar.gz (1.2 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.5.0-py3-none-any.whl (119.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lintro-0.5.0.tar.gz
Algorithm Hash digest
SHA256 2df7a2476f4a4bf37165ea7d405797e9917189c1a6a0ed1b6f4361b933215ee7
MD5 97cd740b727e1b75d83f1941cb035a2a
BLAKE2b-256 97d1382c848f76fe5429bafd2cc1f0918eb9bfe0f0f0b4ce1a7f9ed35c3c98e3

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi-on-tag.yml on TurboCoder13/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.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for lintro-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbfa96ec37208085d3a126dafee3a180549b72b83005ec0c798cccd7d7bf9fd
MD5 be3e83543d1768428b7b639792fe497f
BLAKE2b-256 f9c88b55c2b591a524e2cb63a39c57c70e04a19063394774c2a282949f9fb9db

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi-on-tag.yml on TurboCoder13/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