⚡ A lightweight CLI tool to list all node_modules
folders and display their disk usage with a quick summary.
# Add the tap
brew tap smnandre/homebrew-nmsize
# Install nmsize
brew install smnandre/nmsize
git clone https://github.com/smnandre/nmsize.git
cd nmsize
chmod +x nmsize.sh
nmsize [OPTIONS] [DIRECTORY]
If no directory is specified, the current directory .
is used.
Option Description
-d, --depth NUM Maximum search depth (default: 10)
-s, --sort alpha|asc|desc Sort results by name (alpha), ascending size (asc), or descending size (desc). Default is alpha.
-l, --limit NUM Limit the number of displayed results (default: no limit)
-i, --ignore PATTERN Ignore paths matching the given pattern (can be used multiple times)
--ignore-dots true|false Exclude hidden directories (default: true)
-V, --version Display version information
-h, --help Show help message
nmsize ~/projects -d 5 -s desc --ignore-dots true
nmsize
is released by Simon André under the MIT License.