Skip to main content

Provider-agnostic PR reviewer — six providers, one flag, no keys in secrets for cloud.

Project description

lgtmaybe logo — a shrugging face with curly-brace arms

lgtmaybe

Provider-agnostic PR reviewer. Six providers, one flag, no static keys for cloud providers. Posts inline review comments and a summary.

📖 Full documentation: https://mattjcoles.github.io/lgtmaybe/

What it reviews

lgtmaybe fetches the PR diff from the GitHub API and reviews the lines a pull request changes. It never checks out or runs your code. To judge each change in context it also reads a few surrounding lines from the file, but it only ever comments on what the PR actually changed, not the whole repository.

Reviews surface the kind of thing a careful reviewer would flag, each graded from info up to critical: logic and correctness bugs (edge cases, null dereferences, off-by-one and boundary errors, mismatched ranges, unhandled error paths), missing tests for changed code paths (with a suggested test to drop in), and undocumented public APIs. The model is prompted with an OWASP-aligned security checklist — injection, XSS, hardcoded secrets, broken authn/authz, path traversal, SSRF, insecure deserialization, weak crypto, resource/DoS safety, and secrets or PII (passwords, tokens, SSNs, card data) leaking into logs — so security findings are first-class, not an afterthought. It also flags factually outdated code — deprecated APIs and end-of-life or vulnerable dependencies — when the diff shows them. Generated and non-reviewable files (lockfiles, minified bundles, vendored directories, binaries) are skipped automatically, and secrets are redacted from the diff before it is sent to the model.

Hardened against malicious PRs. lgtmaybe never checks out or runs PR code, treats the diff as untrusted input, defends against prompt injection (including forged delimiter break-out attempts), and redacts a broad set of secret formats (cloud keys, GitHub/Slack/Google/Stripe tokens, private keys, passwords, and credentials in connection strings) before anything leaves your environment. See Data and Privacy.

How the scope is bounded. Every run is capped so a large PR can't blow up latency:

  • max_files (default 50) — reviews the top-N changed files and notes how many were skipped.
  • max_input_tokens (default 100k) — batches the diff to fit the model's budget.
  • categories (default all five) — which review lenses to run; each is a concurrent model call, so narrowing the list means fewer calls.
  • min_severity (default info) plus include_paths / exclude_paths — focus the review on what you care about.

See Configure .lgtmaybe.yml for every knob.

What you get back. Each finding is structured data — file, line, severity, a title, an explanation, and an optional suggested fix — so it renders the same everywhere:

  • On a GitHub PR — an inline comment on the exact changed line for each finding, plus one summary comment naming the model used. Re-running updates the same comments instead of duplicating them, and a clean PR gets a 👍 LGTM!.
  • On the CLIlgtmaybe review reads your local git diff and prints the findings (a readable listing, a JSON array with --json, or --format agent for an AI coding agent to read and apply); nothing is posted to GitHub.

A fuller walkthrough with example output is in What gets reviewed.

Quick start (60 seconds, local, zero cost)

From inside a git repo, on a branch with changes, review your diff against the default branch and print the findings:

pip install lgtmaybe

lgtmaybe review \
  --provider ollama \
  --model qwen3.6:27b \
  --api-base http://localhost:11434

No GitHub token and no pull request needed — lgtmaybe review reads your local git diff and prints the findings. To post reviews on real pull requests, wire up the GitHub Action. See Getting Started for the full walkthrough.

Providers

Provider Auth
openai OPENAI_API_KEY
anthropic ANTHROPIC_API_KEY
openrouter OPENROUTER_API_KEY
bedrock Ambient AWS creds — GitHub OIDC, no static key
vertex Ambient GCP creds — Workload Identity Federation, no key
azure Ambient Azure AD creds — GitHub OIDC, no static key (or AZURE_API_KEY) + endpoint
ollama None — local only, zero cost

Documentation

Browse the rendered docs at https://mattjcoles.github.io/lgtmaybe/, or read the Markdown sources below.

Tutorial — learn by doing

How-to guides — task recipes

Reference — look things up

Explanation — understand the design

Use as a GitHub Action

name: lgtmaybe

on:
  pull_request_target:
  issue_comment:
    types: [created]

permissions:
  contents: read
  pull-requests: write

jobs:
  review:
    if: ${{ github.event_name == 'pull_request_target' || github.event.issue.pull_request }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: lgtmaybe/lgtmaybe@v1
        with:
          provider: openai
          model: gpt-5.5
          api_key: ${{ secrets.OPENAI_API_KEY }}

Copy-paste workflows for every cloud and API-key provider live in examples/workflows/. Cloud providers (Bedrock, Vertex, Azure) are keyless — pass aws_role_arn / gcp_wif_provider / azure_client_id and the action does the OIDC/WIF exchange for you (needs id-token: write). See Use as a GitHub Action. ollama is local only — run it through the CLI instead.

Distribution

  • CLIpip install lgtmaybe
  • GitHub Actionuses: lgtmaybe/lgtmaybe@v1

Contributing

Test-first, green CI, scope is the gate. See CONTRIBUTING.md.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lgtmaybe-0.1.0.tar.gz (310.0 kB view details)

Uploaded Source

Built Distribution

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

lgtmaybe-0.1.0-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file lgtmaybe-0.1.0.tar.gz.

File metadata

  • Download URL: lgtmaybe-0.1.0.tar.gz
  • Upload date:
  • Size: 310.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lgtmaybe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c1e2f1754ef3321afaf6b585bbecb01415bed0a2a5d59d52465e9095625308ac
MD5 0c2c86b3c2cc7af34ffdc7019338f46a
BLAKE2b-256 f070f83fcf57e05f0ef193ac7bb446edb9f920b613a6e7a5f8707f0a43a111bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for lgtmaybe-0.1.0.tar.gz:

Publisher: release-please.yml on MattJColes/lgtmaybe

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

File details

Details for the file lgtmaybe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lgtmaybe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lgtmaybe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 507188c8cd8416ba1d87185068d95738955cda7dbec3c785dad19011bd208bd6
MD5 5a0b0c4a1123281d49e94bebe8d4af05
BLAKE2b-256 25847483f7da440789baf0266c327d6fc727192143f977e028ab05e644f31c91

See more details on using hashes here.

Provenance

The following attestation bundles were made for lgtmaybe-0.1.0-py3-none-any.whl:

Publisher: release-please.yml on MattJColes/lgtmaybe

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