# packsize-cli

> package size control on a monorepo

Latest version **0.1.0** (published 2024-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install packsize-cli
pnpm add packsize-cli
yarn add packsize-cli
bun add packsize-cli
```

Provides the command `packsize`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2024-02-13 |
| First published | 2024-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^18 |
| Dependencies | 11 |
| Unpacked size | 12.2 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | rakesh |
| Maintainers | 7h |

## Links

- npm: https://www.npmjs.com/package/packsize-cli
- Repository: https://github.com/rake7h/packsize
- Homepage: https://github.com/rake7h/packsize#readme
- Issues: https://github.com/rake7h/packsize/issues
- npm.io page: https://npm.io/package/packsize-cli

## Dependencies (11)

- [meow](https://npm.io/package/meow.md) ^9.0.0
- [chalk](https://npm.io/package/chalk.md) ^5.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [byte-size](https://npm.io/package/byte-size.md) ^8.1.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.3.2
- [gzip-size](https://npm.io/package/gzip-size.md) ^6.0.0
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^9.0.0
- [object-hash](https://npm.io/package/object-hash.md) ^3.0.0
- [npm-packlist](https://npm.io/package/npm-packlist.md) ^7.0.4
- [jsondiffpatch](https://npm.io/package/jsondiffpatch.md) ^0.6.0
- [@npmcli/arborist](https://npm.io/package/@npmcli/arborist.md) ^5.6.0

## Recent versions

- 0.1.0 (latest) — 2024-02-13

## README

# Packsize: Monorepo Package Size Stats Tool

## Feature

Packsize offers first-class support for monorepos, providing CLI commands to generate size statistics for all packages within the workspace. It also includes a diff checker to compare size changes between snapshots.

This tool is specifically designed for monorepos, allowing easy monitoring of package sizes across the entire workspace before publishing it.

## Usage

### Installation

```bash
yarn add packsize-cli
```


#### Creating Packsize Configuration

Create a `packsize.config.json` file at the root of your project:

```json
{
 "packages":  [
      "packages/*",  
	  "helpers/*",  
	  "other workspaces",  
      "..."  
   ]  
}
```
### CLI

Add the following commands to the `scripts` section of your root `package.json`:
```json
"scripts": { 
 "packsize:init": "packsize init", 
 "packsize:diff": "packsize diff", 
 "packsize:clean": "packsize clean" 
}
```



|Command | Description | 
|--|--| 
| init |Generates the packsize stats snap file for all packages specified in `packsize.config.json`. | 
| diff | Compares the current snapshot with the previous one to identify size differences. |
| clean | Removes all snapshot files from the workspaces. |

---
_Source: https://npm.io/package/packsize-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
