#npm #typescript #audit #dependencies

app stack-opt

A blazing-fast CLI to audit and optimize your JS/TS dependency stack

3 releases

new 0.1.2 Apr 10, 2025
0.1.1 Apr 8, 2025
0.1.0 Apr 8, 2025

#195 in Development tools

Download history 120/week @ 2025-04-03

120 downloads per month

MIT license

20KB
351 lines

πŸ“¦ stack-opt

Crates.io

Audit and optimize your JavaScript/TypeScript dependency stack β€” fast, local, and smart.

stack-opt is a blazing-fast CLI tool written in Rust that scans your package.json and flags:

  • 🐘 Large packages that bloat your bundle
  • πŸ•’ Stale packages that haven’t been updated in ages
  • ⚠️ Deprecated dependencies that you should avoid
  • πŸ‘€ Low-maintenance libraries with a single maintainer

Useful for keeping your stack lean, modern, and production-ready.


πŸš€ Features

  • ⚑ High-performance Rust-powered analysis
  • πŸ“¦ Analyzes both dependencies and devDependencies
  • 🌐 Pulls live data from the NPM registry
  • 🧠 Applies smart heuristics
  • 🌈 Colorful, easy-to-read output
  • πŸ“„ JSON output for automation/CI use
  • πŸ” Zero tracking, 100% local (no uploads)

πŸ“¦ Installation

Install via Cargo:

cargo install stack-opt

Or clone and build locally:

git clone https://github.com/tomc2154/stack-opt.git
cd stack-opt
cargo install --path .

πŸ›  Usage

stack-opt --path ./your-project

πŸ”§ CLI Options:

Flag Description
--path Path to the project directory (default: .)
--no-dev Skip devDependencies
--json Output results in JSON format
--fail-on Exit with code 1 on warnings or criticals

Example:

stack-opt --no-dev
stack-opt --json > audit.json
stack-opt --fail-on crit

πŸ“Š Sample Output

πŸ“¦ Fetching metadata for moment [dependencies]...
- [WARN] moment: 🐘 Large size (~4248.4 KB)

===========================
πŸ“Š Final Summary:
---------------------------
πŸ”΄ Critical: 1
🟠 Warnings: 9
πŸ”΅ Info:     4
βœ… Clean:    6
πŸ“¦ Total:    20
===========================

🀝 Contributing

Pull requests, issues, and suggestions are always welcome!
If you’ve got ideas, open a discussion or issue.


πŸ“„ License

MIT License.
See LICENSE for details.

Dependencies

~15–28MB
~417K SLoC