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

@arjanj/loupe

v0.1.6

Published

Zoomable, Apple-style architecture maps for codebases and multi-repo systems. One self-contained HTML file.

Readme

Loupe

Loupe turns a codebase into a zoomable architecture map: a single HTML file you can open offline.

Live demo

The Immich repo in Loupe

Quickstart

cd your-app
npx @arjanj/loupe

Loupe scans the repo, groups files into modules, describes them, maps how they connect, and writes loupe.html, which it then opens in your browser.

Requirements

  • Node 18+ and a git repository with at least one commit.
  • One model backend: Claude Code (claude on your PATH), ANTHROPIC_API_KEY, or OPENAI_API_KEY.

Loupe sends source excerpts and file paths to the backend you pick. Answers are cached in .loupe/cache/, so a rerun only pays for files that changed.

Reading a map

  • Scroll or pinch to zoom, drag to pan, double-click a card to zoom into it.
  • Hover a card to highlight its connections. Click it to see each connection with file:line evidence.
  • Press Esc or use the breadcrumbs to zoom back out.
  • Flows plays a guided tour of the main paths through the code.

Options

npx @arjanj/loupe [repoDir] [options]
  --out <file>        output path (default: <repoDir>/loupe.html)
  --no-open           don't open the browser
  --backend <name>    claude | anthropic | openai
  --model <name>      model alias (sonnet, opus, haiku) or API model id
  --verbose           log every model call

If you don't pass --backend, Loupe asks which one to use and remembers your choice in .loupe/config.json. In CI it uses the first one it finds.

Useful environment variables:

| Variable | Default | Meaning | | --- | --- | --- | | LOUPE_IGNORE | none | regex of paths to skip, e.g. ^(examples\|docs)/ | | LOUPE_CONCURRENCY | 6 | parallel model calls | | LOUPE_PLAN_UNITS | 60 | most folders or files shown to the model when it groups a package into modules; bigger packages are folded into folders first | | LOUPE_EFFORT | backend default | low, medium, high, xhigh, or max | | ANTHROPIC_BASE_URL / OPENAI_BASE_URL | official APIs | point at a proxy or compatible server (https, or http on localhost) | | LOUPE_ALLOW_HTTP | off | 1 allows a plain http:// base URL on a network you trust | | LOUPE_CLAUDE_BIN | claude | path to the Claude Code CLI |

Multi-repo systems

To map a system that spans several repos, describe it in a YAML manifest and render it. No model is needed for this.

npx @arjanj/loupe manifest examples/bramble/manifest.yaml
npx @arjanj/loupe render examples/bramble/manifest.tree.json

See examples/bramble/manifest.yaml for a full example.

Privacy

  • Code only goes to the model backend you choose. The rendered map makes no network requests.
  • Loupe skips untracked files and common secret files (.env*, *.pem, and so on), and redacts tokens it finds in code snippets.
  • A map includes file paths and short code snippets, so treat a map of a private repo as private.

Report security issues via SECURITY.md.

Contributing

See CONTRIBUTING.md. Run the tests with npm test.

License

MIT. See THIRD_PARTY_NOTICES.md for bundled fonts and the Immich demo.