New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hapticdata/lgtm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapticdata/lgtm

TUI for reviewing documents with line-by-line commenting

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

lgtm

A terminal UI for reviewing documents with line-by-line commenting. Perfect for reviewing AI-generated plans, code proposals, or any text document that needs structured feedback.

Features

  • Line-by-line commenting with 6 comment types (blocker, concern, question, suggestion, praise, acknowledge)
  • Syntax highlighting for code blocks
  • Session persistence (comments saved to JSON files)
  • Export feedback in markdown or JSON format
  • tmux integration for side-by-side review workflows
  • Claude Code integration for AI-assisted development

Installation

Quick Start (No Install)

Run lgtm directly without installing:

bunx @hapticdata/lgtm document.md

Install lgtm as a Claude Code plugin from the marketplace:

# In Claude Code, run these commands:
/plugin marketplace add hapticdata/lgtm
/plugin install lgtm@lgtm

Or locally after cloning the repository:

claude plugin install lgtm --plugin-dir .

Once installed, you can use these skills:

  • /lgtm <file> - Review a file with line-by-line commenting
  • /lgtm-context - Review Claude's last response
  • /lgtm-plan - Review the current plan file

The plugin automatically spawns a tmux pane for side-by-side review. When you quit (press q), your feedback is sent back to Claude for discussion.

Global CLI Installation (Optional)

For standalone command-line usage without Claude Code:

bun install
bun link

Then use the lgtm command directly:

lgtm document.md

Requirements

  • Bun v1.0.0 or later (required)
  • tmux (optional, for side-by-side review with Claude Code)

Why Bun? lgtm uses Bun-specific APIs (Bun.file(), Bun.write(), Bun.stdin) for better performance and simpler code. These APIs are not available in Node.js or other runtimes.

Usage

Basic Usage

Review a file in your terminal:

lgtm document.md

Commands

# Review in current terminal (default)
lgtm <file>

# Explicitly show in current terminal
lgtm show <file>

# Open in tmux split pane
lgtm spawn <file>

# Export comments to stdout
lgtm export <file>

# Show terminal environment info
lgtm env

Options

OptionDescription
--session <name>Named session for separate comment storage
--comments <file>Load comments from a specific file
--readonlyView-only mode (no editing)
--export-on-quit <path>Export comments to file when quitting
--stdinRead content from stdin instead of file
--contextLoad Claude's last response from current session
--tmuxOpen in tmux split pane

Export Options

# Export as markdown (default)
lgtm export document.md

# Export as JSON
lgtm export document.md --format json

# Export specific session
lgtm export document.md --session my-review

Keybindings

Navigation

KeyAction
j / DownScroll down / Next comment
k / UpScroll up / Previous comment
gGo to top
GGo to bottom
TabSwitch between document and comments panel
EnterJump to commented line (in comments panel)

Comments

KeyAction
cAdd comment on current line
eEdit selected comment
dDelete selected comment
rToggle resolved status
1-6Select comment type when adding

Comment Types

KeyTypePurpose
1BlockerCritical issues that must be addressed
2ConcernPotential issues to evaluate
3QuestionNeed clarification
4SuggestionImprovements to consider
5PraiseHighlight good work
6AcknowledgeNoted/acknowledged

Other

KeyAction
fCycle through comment filters
vToggle summary view
yCopy feedback to clipboard
sSave session
?Toggle help
q / EscQuit

Configuration

Environment Variables

VariablePurpose
LGTM_TMUX=1Default to tmux mode (skip --tmux flag)
TMUX_PANETarget pane for tmux splits

Comment Storage

Comments are stored in JSON files alongside the reviewed document:

document.md           # Original file
.lgtm-document.json # Comments file

With sessions:

.lgtm-document-mysession.json

Claude Code Integration

lgtm integrates with Claude Code for AI-assisted review workflows. When used with --export-on-quit, comments are automatically exported when you quit.

# Claude Code can spawn lgtm and wait for your review
lgtm document.md --export-on-quit /tmp/feedback.md

The --context flag loads Claude's last response for review:

lgtm --context

License

MIT

Keywords

cli

FAQs

Package last updated on 06 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts