npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jardo5/lgtm

v1.0.30

Published

CLI code review tool powered by OpenRouter

Readme

LGTM

Automated code review from your terminal. Point it at a git diff, pick your models, get comments with severity ratings.

██       ██████  ████████ ███    ███
██      ██          ██    ████  ████
██      ██   ███    ██    ██ ████ ██
██      ██    ██    ██    ██  ██  ██
███████  ██████     ██    ██      ██

Install

npm

npm install -g lgtm

From source

git clone <repo-url>
cd lgtm
npm install
npm run build
npm link

Linux dependencies

LGTM stores your API key using your system's secret service. On Linux, you need secret-tool (from libsecret):

# Arch/CachyOS
sudo pacman -S libsecret

# Debian/Ubuntu
sudo apt install libsecret-tools

# Fedora
sudo dnf install libsecret

On macOS, Keychain is used automatically. On Windows, a config file fallback is used.

Usage

lgtm [options]

Run lgtm inside any git repository. On first run, you'll be prompted for an OpenRouter API key.

Flags

| Flag | Description | | -------------- | ------------------ | | --help | Show help | | --version | Show version | | --verbose | Debug logging | | --base <ref> | Set base reference | | --head <ref> | Set head reference | | doctor | Check dependencies |

Examples

# Interactive — pick branches in the TUI
lgtm

# Diff two branches directly
lgtm --base main --head feature/auth

# Check system setup
lgtm doctor

How it works

  1. You select a base and head ref (branches, tags, commits, or staged changes)
  2. LGTM generates the diff and splits it into chunks
  3. Each configured agent sends the diff to its assigned model via OpenRouter
  4. Models stream back comments with file, line number, severity (1-5), and explanation
  5. A dedup agent consolidates overlapping comments across models
  6. Results are grouped by file with severity ratings: Info, Suggestion, Issue, Warning, Critical

Smart filtering

Binary files, lockfiles (package-lock.json, yarn.lock, etc.), and .env files are automatically excluded from the diff before it reaches the models. This reduces token usage and keeps reviews focused on meaningful changes.

Focus modes

Choose a review focus: Normal (default), Security, Performance, Best Practices, or Accessibility. Each mode tailors the AI's system prompt with domain-specific checklists. Set with r on the launch screen.

Framework detection

LGTM auto-detects your project's language and frameworks from manifest files (package.json, requirements.txt, Cargo.toml, go.mod). This context is injected into the review prompt for more relevant feedback.

Confidence scores

Each comment includes an optional confidence score (0-100%) indicating how certain the model is about the issue.

Time tracking

Review duration is tracked per agent and total. Displayed on the results screen and saved to history.

Multi-model review

Configure multiple agents, each with a different model. Run openrouter/auto alongside specific models to get varied perspectives on the same diff. The dedup pass removes duplicates so you don't read the same comment three times.

Cost tracking

Token usage and cost are tracked per session. Free models show $0.00. Cost is displayed on the results screen after review completes.

Keyboard shortcuts

Welcome screen

| Key | Action | | ------- | -------- | | h | Help | | q | Quit | | Any key | Continue |

Launch screen

| Key | Action | | -------- | ----------------------- | | Tab | Cycle sections | | / | Search in branch picker | | s | Start review | | a | Add agent | | f | Fetch remote | | h | History | | r | Cycle focus mode | | m | Open model picker | | x | Remove selected agent | | Esc | Back / close | | Ctrl+Q | Quit |

Results screen

| Key | Action | | --------- | ---------------- | | Up/Down | Navigate files | | Tab | Switch panel | | d | Toggle diff view | | v | Open in VSCode | | q/Esc | Back to launch |

History screen

| Key | Action | | --------- | ----------------- | | Up/Down | Navigate reviews | | Enter | View details | | / | Search/filter | | c | Clear all history | | Esc | Back to launch |

Configuration

API key

Stored securely — macOS Keychain, Linux secret-tool, or an encrypted config file fallback. Never stored in .env or plaintext config.

Models

Any model available on OpenRouter works. The model picker shows all available models with pricing info. Default for new agents: openrouter/auto.

Requirements

  • Node.js 18+
  • Git
  • An OpenRouter API key
  • A terminal with mouse support (most modern terminals)

Development

# Run in dev mode
bun run src/index.tsx

# Build
npm run build

# Type check
npm run typecheck

# Lint
npm run lint

# Format
npm run format

# Run tests
npm run test

# Full validation (typecheck + lint + test + format)
npm run check

Project structure

src/
  components/    UI screens and widgets (OpenTUI/React)
  services/      Business logic (git, review, storage, cost)
  config/        Model configuration
  state/         React context state management
  theme/         Colors and styling (Dracula palette)
  types/         TypeScript type definitions

License

ISC