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

artie-lens

v1.13.0

Published

AST-based design metrics for TypeScript: CK class metrics (WMC, DIT, NOC, CBO, RFC, LCOM) plus module coupling and circular-dependency detection

Readme

Artie-Lens

npm version CI License: MIT

Measure design quality in a TypeScript codebase, and fail CI when it gets worse.

Artie-Lens reads your code from the AST (via ts-morph) and answers three different questions:

  • What is bad? Eight metrics, per class and per module.
  • Where do I start? Hotspots: the metrics crossed with git churn.
  • What is forbidden? Architecture rules you declare and that always fail the build.

Install

npm install -g artie-lens

Requires Node.js 20+ and a TypeScript project.

Quick start

artie init      # creates .artierc.json
artie run       # analyze the current directory
📊 WMC Metrics:
- Total: 22   Average: 2.44   Maximum: 11

Files:
[WARNING] OrderService → 11
   💡 Complexity is increasing → consider extracting helper methods or simplifying logic.

What it measures

| | Metrics | Scope | | --- | --- | --- | | Class (CK suite) | WMC, DIT, NOC, CBO, RFC, LCOM | Complexity, inheritance, coupling, cohesion | | Module | CE (efferent coupling), CYCLIC (circular deps) | Works on functional code with no classes |

Faithful to A Metrics Suite for Object Oriented Design (Chidamber & Kemerer, 1994). Definitions, and the limitations of each one, are in docs/metrics.md.

Commands

| Command | Description | | --- | --- | | artie init | Create a .artierc.json with default settings. | | artie run [dir] | Analyze and report. | | artie watch [dir] | Re-run on every file change (development loop). | | artie suggest [dir] | Concrete refactoring advice: which cycle to break, which methods to split. | | artie hotspots [dir] | Rank files that are unhealthy and frequently changed. Needs git. | | artie seams [dir] | Detect module communities and propose extraction boundaries. | | artie comment [dir] | Post regressions and violations as a sticky PR comment (CI). | | artie help | List commands and options. |

Gate your CI on regressions, not on old debt

Failing on every preexisting issue is noise, and noisy tools get silenced. Save a baseline once, then fail the build only when a change makes the design worse:

- uses: ariusxi/artie-lens@v1
  with:
    baseline: 'true'
    fail-on: warning

Details, including the absolute gate and --json output, in docs/ci.md.

Documentation

Contributing

Releases are automated with semantic-release, so commit messages must follow Conventional Commits. See CONTRIBUTING.md.

License

MIT