# @gravityci/cli

Keep artifact sizes under control with [Gravity](https://gravity.ci), a
developer tool that helps catch size regressions early before they reach users.

`@gravityci/cli` is Gravity's CLI component that runs in CI servers.

## Usage

Minimal usage:

```bash
npx @gravityci/cli 'dist/'
```

Specifying multiple paths:

```bash
npx @gravityci/cli 'dist/**/*' 'dist2/**/*' 'dist3/**/*' ...
```

Specifying a fingerprint pattern:

```bash
npx @gravityci/cli 'dist/**/*' --fingerprint ".+(-[0-9A-Z]{8})\\..+"
```

## Arguments

```
npx @gravityci/cli <patterns> --fingerprint <fingerprint>
```

| argument        | type             | description                                                                                                                      |
| --------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `<patterns>`    | array of strings | **Required**. File path patterns of the compiled files the user wants to check its bundlesize                                    |
| `<fingerprint>` | string           | **Optional**. A regular expression; if artifacts are fingerprinted, this can be used to remove the fingerprint before comparison |

---

Gravity is developed by and © Mainmatter GmbH.
