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

@uigraph/lens

v1.0.0

Published

Review GitHub pull requests with UIGraph Lens.

Readme

Lens reviews a GitHub pull request, or the difference between two branches, to help you understand the change. A coding agent you already use (Claude Code, Codex, OpenCode, Pi or Cursor) reads the change and the code around it, and Lens shows the result in the UIGraph viewer.

This repository is the Lens engine and review UI. You run it through the uigraph CLI.

Lens is open source.

Quick start

Install UIGraph:

npm install -g uigraph

Review a pull request:

uigraph lens https://github.com/owner/repo/pull/123
uigraph lens owner/repo#123
uigraph lens 123            # inside a clone whose origin is on GitHub

Or two branches in the current repository:

uigraph lens --base main --target feature/login

Lens reviews the commits on --target since it split from --base, the same changes a pull request would show. Uncommitted changes are not included. Branch reviews read your repository with git and do not use GitHub.

The review opens in the viewer. If no viewer is running, the command starts one in this terminal. Reviews are listed under Lens in the sidebar.

Every run is saved in ~/.uigraph/lens/runs. A completed run for the same pull request, base and head commit is reused unless you pass --regenerate.

| Option | Effect | | ------------------- | --------------------------------------------------- | | --base <branch> | Branch or commit to compare against | | --target <branch> | Branch or commit to review | | --regenerate | Run a new review instead of reusing a completed one | | --agent <name> | Agent to use. Without it, UIGraph asks | | --model <name> | Model to use, in the agent's own format | | --port <number> | Viewer port | | --no-open | Do not open a browser |

What a review shows

| Step | Shows | | ------------------ | -------------------------------------------------------------- | | Changed flows | Before and after diagrams of the runtime flow | | What was asked | How the change compares with its issue, description or commits | | Choices to confirm | Values the code picked, such as limits and timeouts | | Impact | Other services the change affects | | Test coverage | Which new behavior has a test | | Rollout | A safe order to ship and checks before you deploy |

Each step can be turned off. See Customize.

Agents

Lens uses your own login for the agent you pick:

  • Claude Code: your Claude login or ANTHROPIC_API_KEY.
  • Codex: codex login or CODEX_API_KEY.
  • OpenCode: provider keys such as ANTHROPIC_API_KEY or OPENAI_API_KEY.
  • Pi: ~/.pi/agent/auth.json or provider keys such as ANTHROPIC_API_KEY.
  • Cursor: CURSOR_API_KEY. Without --model, Cursor picks the model.

A review sends the change and the code it reads to the model provider of the agent you pick.

GitHub access

Pull request reviews need a GitHub token. Branch reviews do not. Lens looks for one in this order:

  1. GITHUB_TOKEN
  2. GH_TOKEN
  3. The token from gh auth token

The viewer process reads the token. It is not sent to the browser.

Customize

Select Customize in a review to set a focus, for example "look for double charges", to turn review steps on or off, to pick how many flow diagrams Lens draws (1 to 10), and to choose the agent and model for reviews started from the viewer. Lens saves these settings in ~/.uigraph/lens/settings.json.

A repository can set the same options for everyone who reviews it, in a .uigraph.lens.yml file at its root:

focus: |
  Payments code. Look for double charges and wrong refund amounts.
steps:
  impact: false
diagrams: 2

Lens reads this file from the base branch, so a pull request cannot change how it is reviewed. The repository focus is used together with your own focus. Steps and diagrams in the file replace your settings.

License

UIGraph Lens is licensed under the Apache License 2.0.