A simple tool to calculate the size of an NPM package. This tool installs the package in a Docker container to ensure that any potentially malicious packages do not affect your system.
You can download the pre-built binaries from the Releases page.
⚠️ package-size-calculator
requires a running Docker daemon.
Follow the official Docker installation guides for your platform:
To calculate the size of an NPM package, run:
package-size-calculator
--short
: Prints a shorter version of the package report, ideal for social media posts.--no-cleanup
: Prevents the removal of the temporary directory after the calculation.--npm-cache <DIRECTORY>
: Specifies a directory to use as the NPM cache. Defaults to a temporary directory if not specified.--npm-cache-read-write
: Mounts the NPM cache directory as read-write. Defaults to true and is only honored if--npm-cache
is specified.
To build the project from source, clone the repository and use the following commands:
go build -o package-size-calculator
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
package-size-calculator
is licensed under the MIT License. See the LICENSE file for the full license text.