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

forgelens

v0.2.0

Published

Provider-agnostic local-first CLI that scans repositories and generates clean AI coding context files with evidence and confidence.

Readme

ForgeLens

Why ForgeLens?

AI coding agents often start in the wrong files. That creates slow edits, wasted context, and risky changes.

Common problems:

  • Agents miss auth boundaries and session rules.
  • Agents skip database/schema risk and server action risk.
  • Agents ignore route exposure and env/config risk.
  • Project rules drift over time, while old context is still used.

ForgeLens solves this with a local-first workflow:

  • Scan the repo and generate compact AI-ready context.
  • Highlight risky files and boundaries first.
  • Save a baseline snapshot.
  • Detect drift between baseline and current reports.
  • Compare drift across git refs with main..HEAD.

Quick Start

npx forgelens scan
npx forgelens baseline save --name current
npx forgelens drift --from current
npx forgelens drift --git main..HEAD

What ForgeLens Generates

AI_COMPACT_CONTEXT.md
AI_FOCUS_MAP.md
FORGE_CONTEXT.md
ARCHITECTURE_MAP.md
ROUTES_MAP.md
DATABASE_MAP.md
SERVER_ACTIONS_MAP.md
SECURITY_RULES.md
ENV_REPORT.md
RISK_REPORT.md
DRIFT_REPORT.md
REPO_REPORT.json

Workflow Map

flowchart TD
  A[Scan repo] --> B[Generate AI context]
  B --> C[Risk reports]
  C --> D[Save baseline]
  D --> E[Detect drift]
  E --> F[Git drift]
  F --> G[AI agent reads focused context]
  G --> H[Safer code changes]

Works With

ForgeLens is built for Codex, Claude Code, Cursor, Copilot, Gemini CLI, OpenCode, and other AI coding agents.

Install

Quick run:

npx forgelens scan

Global install:

npm install -g forgelens
forgelens scan

Local development:

pnpm install
pnpm build
pnpm link --global
forgelens scan

CLI Commands

forgelens scan
forgelens doctor
forgelens baseline save
forgelens drift
forgelens clean --yes
forgelens prompt codex

Sample Output

$ forgelens scan --format all
ForgeLens scan complete: /path/to/repo/.forgelens
- FORGE_CONTEXT: /path/to/repo/.forgelens/FORGE_CONTEXT.md
- ROUTES_MAP: /path/to/repo/.forgelens/ROUTES_MAP.md
- DATABASE_MAP: /path/to/repo/.forgelens/DATABASE_MAP.md
- SECURITY_RULES: /path/to/repo/.forgelens/SECURITY_RULES.md
- ENV_REPORT: /path/to/repo/.forgelens/ENV_REPORT.md
- UI_UX_REPORT: /path/to/repo/.forgelens/UI_UX_REPORT.md
- PERFORMANCE_RISK_REPORT: /path/to/repo/.forgelens/PERFORMANCE_RISK_REPORT.md
- REPO_REPORT_JSON: /path/to/repo/.forgelens/REPO_REPORT.json

Developer Shortcuts

make check          Run typecheck, tests, build, and diff check
make scan           Generate ForgeLens reports
make baseline       Save current ForgeLens baseline
make drift          Compare against saved baseline
make release-check  Run all release checks

Docs

Safety Notes

  • Scan and doctor do not modify source files.
  • ForgeLens writes only inside the selected output folder (default .forgelens/).
  • Env report includes file names and key names only, never secret values.
  • Detection is static and deterministic; no runtime code execution.
  • Security and auth findings are heuristic signals, not guarantees.

Limits

  • This is static analysis, not a full semantic or runtime analyzer.
  • It is not a replacement for security review or penetration testing.
  • No warning does not mean safe. False negatives and false positives are possible.
  • Do not use ForgeLens as a security scanner or compliance gate.