Configuration

Review prompt

Create a .lgtm or .lgtm.md file in your repo root to customize the review focus. For a global default, use ~/.config/lgtm/prompt.

---
ignore:
  - dist/**
  - "*.generated.ts"
skip:
  - "**/*.snap"
agents:
  - quality
  - architecture
---

Focus on security issues and potential data leaks.
Ignore formatting-only changes.
Flag any use of `eval()` or `dangerouslySetInnerHTML` as errors.

Frontmatter keys

KeyDescription
ignoreGlob patterns for files to exclude from the diff entirely
skipGlob patterns for files to include in the tree but skip from AI review
agentsList of agent IDs to enable (default: all built-in + custom)

The body text is the review focus prompt — it tells the AI what to pay attention to.

Global ignore

Place a plain list of glob patterns (one per line) in ~/.config/lgtm/ignore to ignore files across all repos:

package-lock.json
*.min.js
dist/**

CLI options

lgtm [options]

-b, --base <branch>     Base branch to diff against (default: auto-detected)
-p, --port <port>       Local server port (default: 3456)
--include-uncommitted    Include staged/unstaged changes
--no-open               Don't auto-open browser

The base branch is auto-detected from your remote — it checks for main, master, or the repo’s default branch.