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

@daimaozid/bloat

v1.0.1

Published

A CLI tool for checking bloat for websites

Readme

Bloat (Blt) 🥪

Simple Node.js CLI tool to test and display ram usage of websites.

License: GPL v2

Getting Started

Prerequisites

  • Node.js v20+
  • npm
  • Playwright

Installation Options

1. Use npm (Easiest)

Install the tool globally via npm:

npm install -g @daimaozid/bloat

Then install the Playwright browser using:

npx playwright install chromium

Note: If it fails to launch, you may need to install system dependencies with:
npx playwright install-deps chromium

2. Direct installation via git

Install the tool by grabbing the code directly:

git clone https://github.com/daimaozid/Bloat.git
cd bloat
npm install
npm link
npx playwright install chromium --with-deps

Usage

You can run the tool with: bloat or blt

The structure is as follows:

bloat [options] [URLs (https://example.com)]

Note: You must include the protocol for it to work.

Example Usage

Ex. format, sorted, headless, output to file,
    batching URLs in groups of 10 to avoid fork bombing

bloat -fsh -o output.txt --batch 10 https://google.com https://en.wikipedia.org... 

Sample output:
Logged on: Mon Jan 05 2026 16:28:15 GMT-0800 (Pacific Standard Time)
Avg Mem/Word: ~577 KiB/Word
URL List                        Mem/Word        Bloated?
en.wikipedia.org                ~4 KiB/Word     No      
google.com                      ~210 KiB/Word   No      
youtube.com                     ~1 MiB/Word     Yes     
# of bloated sites: 1
# of good sites: 2

Commands

For a full list of options, type:

bloat --help

Common Options

--version
    Show Bloat version
--license
    Displays the license for Bloat
--batch
    Sets the max number of tabs that can be concurrently opened
    Default is 5
    WARNING: Setting this too high will fork bomb yourself
    If the last line is confusing, it's a good sign that you
    shouldn't change this.
-h --headless
    Run Bloat in headless mode (no browser window)
-v --verbose
    Logs more information and error messages
    Useful for debugging how Bloat is running
-o --output
    Logs output to a specified file
    Ex. bloat --output output.txt
    Bloat will write to output.txt, which includes
    both the final result and error messages
-f --format
    Logs output in human readable format
    Also sets default decimal place to 0
    Use --decimal to set decimal place explicitly in this mode
-p --pretty
    Logs output with colored lines
    Only works if stdout and stderr supports colors
    Green: Non-bloated sites
    Red: Bloated sites / Error
    Cyan: Info
    DOES NOT corrupt file generated by --output with color codes
-w --wait
    Set the max amount of time in ms
    Bloat waits for a page to load before measuring memory usage
-s --sort
    Sorts the result in ascending order of RAM usage

Uninstallation

To remove the tool and the browser binary it installed:

  1. Remove the browser binary:
    npx playwright uninstall chromium

If installed with npm:

  1. Uninstall the tool globally:
    npm uninstall -g @daimaozid/bloat

If installed manually with git:

  1. Unlink Bloat
    npm unlink
  2. Delete Bloat folder
    cd .. && rm -rf Bloat/

FAQ

Q: Your code SUCKS!!!

A: Not a question. But you have hurt my feelings *sniffle*

Q: Why did you make this?

A: The funny answer is because blt is a funny acronym. The serious answer is that I just find it interesting to see RAM usage of websites and figure out which ones run best on my potato.

Q: It's not accurate for [insert site with foreign language]!

A: It's likely because the word counter regex used only considers characters seperated by space as "words." Which unfortunately means it will not parse languages like Chinese or Japanese with no spaces between characters correctly. I may or may not fix this in the future and add an option to address this.

Q: Why a metric like memory usage / word?

A: A few reasons why I picked such a metric:

  1. It's stupid simple to implement the logic.
  2. I think it's an intuitive metric. If you page uses 10GiB / word, it's probably not that efficient with memory usage.
  3. It requires the least amount of "opinion" from the tool. Most people can agree on what a "word" is in English instinctively. It's a lot harder to design a consistent tool that needs to decide if it should include <img> or <iframe> as something it should consider depending on the site.

Q: What is a KiB, MiB, GiB, etc?

A: It's the units for memory that is actually based in binary. 1 KiB = 1024 bytes. Units like KB and MB and GB technically only refer to base 10. 1 KB = 1000 bytes exactly. Incredibly pedantic, I know.

Q: Will this ever be updated?

A: Probably not. If something breaks, you can

  1. Use bloat --blame to vent.
  2. Fork the repo and fix it yourself, but you have to share the src with me per GPLv2.
  3. Open an issue.
  4. Shoot me an angry email that I may or may not see.

Q: Why do I have to install Chromium separately?

A: Bloat does not come with browser to keep the package small (in other words, non-bloated).

Q: Is my data safe?

A: Yes. Everything runs locally on your machine in an isolated browser instance. And you don't have to trust my word. Read through the src.

Q: OK, I read your code. Why is your code littered with global variables?

A: It's makes coding easier and in a short script like this that will likely never be updated, it actually helps with readability. Writing everything with something like config.isVerbose would just boilerplate for my functions. IMHO.

Q: It's running slow, what gives?

A: Many confounding factors. Internet connection speed is the obvious culprit. But it could also be due to:

  1. Bad code from my part. Sorry.
  2. Your setting for --batch is too low. Try setting it higher if your machine can handle more tabs concurrently opening.
  3. The website is simply heavy and takes a long time to load. Try adjusting --wait to set a timeout that works for you. Use --verbose for extra logs in debugging.

Q: Your grammar is bad.

A: Yesn't.

Contributors

License

This project is licensed under the GNU General Public License v2.0 or later - see the LICENSE file for details.

Acknowledgments

  • README.md template by PurpleBooth
  • Playwright for the browser automation engine