shakify
v1.0.1
Published
๐ Smart Tree-shaking Analyzer for npm packages
Maintainers
Readme
๐ชฉ shakify

๐ A CLI tool to shake the truth out of your npm packages
๐ก What is this?
shakify is your bundleโs personal trainer.
It inspects npm packages and tells you:
- ๐ชถ Is it tree-shakeable?
- ๐ Is it ESM or just CommonJS in disguise?
- ๐ฆ How heavy are each of its exports? In other words โ it helps you avoid bloated bundles by letting you pick smarter, leaner dependencies.
Think of it as a lie detector for npm modules that claim to be lightweight.
โจ Features
- โ Detects tree-shaking support
- ๐ Shows ESM vs CommonJS support
- ๐ฆ Analyzes per-export size (raw + gzipped)
- โก Caches results (with manual clearing via
--clear-cache) - ๐ฆ Downloads and inspects real published packages (not guesswork)
- ๐ CLI spinner magic for extra drama
๐ ๏ธ Install
npm install -g shakify๐ Usage
npx shakify-cli <package-name>Example:
npx shakify-cli lodash-esTo clear cached results:
npx shakify-cli react --clear-cache๐ผ Sample Output
=== Package Analysis: [email protected] ===
ESM Support: true
CommonJS Support: false
Side Effects Flag: false
Tree-shakeable: true
Cached Result: false
Export sizes:
. | Size: 6248 bytes | Gzipped: 1931 bytes
/debounce | Size: 882 bytes | Gzipped: 410 bytes
/throttle | Size: 768 bytes | Gzipped: 390 bytes๐ฆ Real Benefits
shakify helps you:
- โ Avoid packages that canโt be tree-shaken
- โ Spot fat exports before they hit your bundle
- โ Replace bloated deps with slimmer alternatives
- โ Make smarter decisions during package selection
- โ Sleep better knowing your JS is lean and mean ๐ค
๐ง Ideal for...
- Frontend devs who care about performance
- Framework authors and lib maintainers
- CI/CD optimization nerds
- You (yes, you reading this ๐)
๐ Caching
Shakify caches results in your systemโs temp directory.
Want to refresh the results?
npx shakify-cli <package-name> --clear-cacheShakify doesnโt judge โ it just snitches ๐ฆโ๏ธ
This is a tool for the devs who check bundle sizes like others check calories.
If thatโs you โ welcome, friend. Let's keep those kilobytes lean and those load times snappy.
If you enjoy it, share it. If it breaks, yell at your terminal (or open an issue, whichever works).
Stay lightweight. Stay skeptical. Stay shakified ๐ชฉ
โ๏ธ Note from the Author
This all started with a simple question:
"Why is my bundle bigger than my app?"
Turns out, not all npm packages are what they seem. Some are lean, modular marvels. Others areโฆ well, more like vending machines that give you the entire aisle.
So I built shakify โ a tool to sniff out the truth behind the node_modules curtain.
Whether you're optimizing your Next.js app, squeezing bytes out of a landing page, or just enjoy yelling at JavaScript in different ways, shakify is here to help.
It won't fix all your problems, but it might make you think twice before importing moment.js ๐
โ cinfinit
๐ฆ Built with curiosity, and you know more curiosity.
