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

@byteshrink/cli

v1.0.8

Published

CLI to analyze package.json using the ByteShrink AI API

Readme

ByteShrink CLI

A simple command-line tool to analyze your package.json for bundle size and performance improvements using ByteShrink AI.

Usage

npx @byteshrink/cli ./package.json

Or install globally:

npm install -g @byteshrink/cli
byteshrink ./path/to/package.json

Development

npm install
npm run dev

Example Output

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                           │
│   # Bundle Size and Performance Optimization Suggestions                                                                  │
│                                                                                                                           │
│   ## 📦 Dependency Analysis                                                                                               │
│                                                                                                                           │
│   ### **1. Heavy Packages with Lighter Alternatives**                                                                     │
│   - **`boxen` (7.1.1)**                                                                                                   │
│     - **Issue**: Relatively large (~1MB) for terminal box formatting.                                                     │
│     - **Alternative**: Use `cli-boxes` (8kB) or `terminal-kit` for lighter box rendering.                                 │
│                                                                                                                           │
│   - **`chalk` (5.4.1)**                                                                                                   │
│     - **Issue**: Adds ~18kB (minified) for terminal styling.                                                              │
│     - **Alternative**: Switch to `kleur` (3kB) or `picocolor` (1kB) for similar functionality with zero dependencies.     │
│                                                                                                                           │
│   - **`node-fetch` (3.3.2)**                                                                                              │
│     - **Issue**: Unnecessary if using Node.js ≥18.x (native `fetch` is built-in).                                         │
│     - **Action**: Remove `node-fetch` and use native `fetch` if possible.                                                 │
│                                                                                                                           │
│   ### **2. Outdated Packages**                                                                                            │
│   - **`zod` (3.25.51)**                                                                                                   │
│     - **Latest Version**: 3.22.4 (confirm with `npm view zod version`).                                                   │
│     - **Action**: Update to the latest version for performance improvements and smaller bundle size.                      │
│                                                                                                                           │
│   ### **3. DevDependencies**                                                                                              │
│   - **`@types/node` (22.15.29)**                                                                                          │
│     - **Latest Version**: Align with your Node.js version (e.g., `@types/node@20` for Node 20).                           │
│   - **`typescript` (5.8.3)**                                                                                              │
│     - **Latest Version**: 5.4.5 (confirm with `npm view typescript version`). Newer versions include optimizations.       │
│                                                                                                                           │
│   ---                                                                                                                     │
│                                                                                                                           │
│   ## 🛠️ General Recommendations                                                                                           │
│                                                                                                                           │
│   ### **Bundle Size Reduction**                                                                                           │
│   - **Use a Bundler**: Tools like `esbuild` or `swc` can minify and tree-shake unused code.                               │
│   - **Audit Dependencies**: Run `npm ls --prod` to identify unused packages.                                              │
│   - **Prefer ESM over CJS**: Modern ESM imports allow better tree-shaking.                                                │
│                                                                                                                           │
│   ### **Install Footprint**                                                                                               │
│   - **Trim Unused Packages**: Use `depcheck` to find unused dependencies.                                                 │
│   - **Lock Dependency Versions**: Avoid overly broad version ranges (e.g., `^`) to prevent accidental bloat.              │
│                                                                                                                           │
│   ---                                                                                                                     │
│                                                                                                                           │
│   ## 📊 Expected Savings                                                                                                  │
│   | Action                   | Size Reduction |                                                                           │
│   |--------------------------|----------------|                                                                           │
│   | Replace `boxen`          | ~990kB         |                                                                           │
│   | Replace `chalk`          | ~15-17kB       |                                                                           │
│   | Remove `node-fetch`      | ~1.2MB         |                                                                           │
│   | Update `zod`/TypeScript  | Varies (5-10%) |                                                                           │
│                                                                                                                           │
│   ---                                                                                                                     │
│                                                                                                                           │
│   **Next Steps**:                                                                                                         │
│   1. Run `npm outdated` to check for updates.                                                                             │
│   2. Test lighter alternatives in a development environment.                                                              │
│   3. Use `npm audit` to resolve vulnerabilities.                                                                          │
│                                                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯