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

@archlinter/cli

v0.16.0

Published

Fast architecture smell detector for TypeScript/JavaScript

Readme

A powerful CLI tool for detecting 30+ types of architectural smells in TypeScript/JavaScript codebases. Built with Rust and oxc parser for maximum performance.

Why archlint?

Modern codebases grow complex fast. archlint helps you:

  • 🔍 Detect architectural problems early before they become technical debt
  • 🎯 Framework-aware analysis with presets for NestJS, Next.js, React, oclif
  • Blazingly fast - analyzes 200+ files in under 5 seconds
  • 📊 Actionable insights - clear explanations, severity scores, and refactoring recommendations
  • 🔄 Watch mode for real-time feedback during development
  • 🧠 Smart caching for instant re-runs

Features

30+ Architectural Smell Detectors

Dependency & Structure Issues:

  • Cyclic dependencies (file-level and type-level)
  • Hub modules (too many connections)
  • God modules (doing too much)
  • Dead code (unused exports)
  • Orphan types (disconnected from codebase)

Design Quality Issues:

  • Low cohesion (LCOM metric)
  • High coupling
  • Layer violations (domain/application/infrastructure)
  • SDP violations (Stable Dependencies Principle)
  • Feature envy, shotgun surgery

Code Organization Issues:

  • Barrel file abuse
  • Scattered modules/configs
  • Primitive obsession
  • Long parameter lists
  • Deep nesting

Framework-Specific Issues:

  • Test leakage (test code in production)
  • Side-effect imports
  • Vendor coupling
  • Unstable interfaces
  • Shared mutable state

Framework Intelligence

Built-in presets that understand framework patterns:

  • NestJS: Knows controllers are entry points, modules can have high coupling
  • Next.js: Understands pages/API routes, relaxes barrel file rules
  • React: Aware of component patterns, skips irrelevant checks
  • oclif: Recognizes CLI commands and hooks

Output Formats

  • Table (default) - clean terminal output with colors
  • Markdown - detailed reports with Mermaid dependency graphs
  • JSON - machine-readable for CI/CD integration

Developer Experience

  • Watch mode with debouncing for live feedback
  • Smart caching using content hashes
  • Severity filtering (low/medium/high/critical)
  • Selective detector runs (include/exclude specific checks)
  • Git integration for churn analysis
  • CI-friendly quiet mode

Installation

Using npm (Recommended)

npm install -g @archlinter/cli
# or use without installation
npx @archlinter/cli scan

From source

git clone https://github.com/superprotocol/archlint.git
cd archlint
cargo build --release
cargo install --path crates/archlint

Quick Start

Basic scan

archlint scan ./my-project

With configuration

archlint scan ./my-project --config .archlint.yaml

Watch mode for development

archlint watch --debounce 500 --clear

Export report

# Markdown with diagrams
archlint scan ./my-project --format markdown --report architecture-report.md

# JSON for CI/CD
archlint scan ./my-project --format json --report report.json
# Or use the shorter --json flag
archlint scan ./my-project --json --report report.json

Filter by severity

archlint scan --min-severity high

Run specific detectors

archlint scan --detectors cycles,god_module,dead_code

Exclude detectors

archlint scan --exclude-detectors barrel_file,lcom

Configuration

Create .archlint.yaml in your project root:

# Files/directories to ignore
ignore:
  - '**/node_modules/**'
  - '**/dist/**'

# Path aliases (from tsconfig.json)
aliases:
  '@/*': 'src/*'

# Entry points (won't be marked as dead code)
entry_points:
  - 'src/main.ts'

# Rule-specific configuration
rules:
  cycles: high

  god_module:
    severity: high
    fan_in: 15
    fan_out: 15
    churn: 20

  layer_violation:
    severity: high
    layers:
      - name: domain
        path: '**/domain/**'
        allowed_imports: []
      - name: application
        path: '**/application/**'
        allowed_imports: ['domain']

  complexity:
    max_complexity: 15

# Rule overrides for specific paths
overrides:
  - files: ['**/tests/**']
    rules:
      complexity: off
      god_module: off

# Scoring and grading settings
scoring:
  minimum: medium
  weights:
    critical: 100
    high: 50
    medium: 20
    low: 5

# Framework preset
extends: nestjs

Available Detectors

Run archlint detectors list to see all detectors with descriptions.

| ID | Name | Default Enabled | | ----------------- | --------------------- | --------------- | | cycles | Circular Dependencies | ✅ | | god_module | God Module | ✅ | | dead_code | Dead Code | ✅ | | layer_violation | Layer Violation | ⚠️ | | complexity | High Complexity | ✅ | | ... | ... | ... |

→ See full list of detectors

License

MIT License - see LICENSE for details.

Credits