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

repo-gc-rust

v0.2.8

Published

Rust language support for repo-gc — AI-era repository hygiene analyzer for Rust codebases

Readme

repo-gc-rust

Rust repository hygiene analyzer — finds patterns that waste tokens, confuse AI agents, and break AI-assisted edits.

Crates.io npm License

A standalone native binary that parses Rust code with syn, builds an import graph, and runs 6 heuristics. Fast — uses rayon for parallel parsing. Can run standalone or as a plugin to the main repo-gc runner.

npx repo-gc-rust scan

Quick Start

# Standalone (runs the native binary directly)
npx repo-gc-rust scan

# Via the main runner
npx repo-gc scan --lang rust

# Markdown report
npx repo-gc-rust scan --format md > REPO_HEALTH.md

# JSON for CI
npx repo-gc-rust scan --format json

# Token-optimized output for LLM consumption
npx repo-gc-rust scan --format llm

Install

Prebuilt binary (npm)

npm install -g repo-gc-rust
repo-gc-rust scan

From source (cargo)

cargo install repo-gc-rust
repo-gc-rust scan

Commands

| Command | Description | |---------|-------------| | scan | Scan for AI-context-wasting patterns | | report | Generate an AI Context Efficiency report | | json | Emit findings as JSON (for CI integration) | | explain <file> | Explain why a file degrades AI context efficiency |

Flags

| Flag | Default | Description | |------|---------|-------------| | --path | . | Target directory | | --format | text | Output: text, json, md, llm | | --threshold | normal | Sensitivity: strict, normal, relaxed | | --include-tests | false | Include test files in analysis | | --no-color | — | Plain text output |

Threshold Levels

| Level | Line limit | Fan-in limit | Fan-out limit | Re-export limit | |-------|-----------|-------------|--------------|----------------| | strict | 300 | 5 | 10 | 5 | | normal | 500 | 10 | 15 | 10 | | relaxed | 1000 | 20 | 25 | 20 |

Example Output

═══ AI Context Efficiency Report ═══
Files: 47  Lines: 12400  Est. LLM tokens: ~3100k

Scores
  AI Friction:        ██████░░░░  28/100
  Context Waste:      ░░░░░░░░░░  0/100
  Structural Entropy: ██████░░░░  28/100

Findings (6)

  Coupling Hotspot (1)
    [H] src/types.rs — High coupling: fan-in=13, fan-out=0

  Dead Weight (2)
    [M] src/cli.rs — 85-line file is never imported
    [M] src/old-utils.rs — 120-line file is never imported
  ...

Architecture

Parses Rust source with syn, builds a module-level import graph, then runs 6 heuristics:

| Heuristic | What it detects | |-----------|----------------| | context-bomb | Files exceeding line count thresholds | | dead-weight | Orphaned modules not imported by anything | | reexport-entropy | Files with excessive pub use re-exports | | coupling-hotspot | Modules with high fan-in or fan-out | | code-duplication | Identical function bodies across files | | unused-import | Unused use statements |

Analysis runs in parallel via rayon. Output formats: text (terminal with ASCII score bars), JSON, Markdown, and LLM-optimized TSV.

Requirements

  • Rust toolchain (to build from source) or prebuilt binary via npm
  • No runtime dependencies — single static binary

License

FSL-1.1-MIT — free for individuals, teams, and CI pipelines. See LICENSE.