# compact-img-cli

> compress images recursively in the filesystem

Latest version **1.1.3** (published 2022-03-15) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install compact-img-cli
pnpm add compact-img-cli
yarn add compact-img-cli
bun add compact-img-cli
```

Provides the commands `compact-img`, `compact-img-cli`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-03-15 |
| First published | 2021-10-21 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 21.3 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Beeno Tung |
| Maintainers | beenotung |
| Keywords | image compress, image resize, cli tool |

## Links

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

## Dependencies (2)

- [sharp](https://npm.io/package/sharp.md) ^0.29.3
- [@beenotung/tslib](https://npm.io/package/@beenotung/tslib.md) ^18.0.2

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2022-03-15
- 1.1.2 — 2021-10-24
- 1.1.1 — 2021-10-24
- 1.1.0 — 2021-10-24
- 1.0.2 — 2021-10-24
- 1.0.1 — 2021-10-24
- 1.0.0 — 2021-10-24
- 0.0.0 — 2021-10-21

## README

# compact-img-cli

compress images recursively in the filesystem

[![npm Package Version](https://img.shields.io/npm/v/compact-img-cli.svg?maxAge=2592000)](https://www.npmjs.com/package/compact-img-cli)

## Usage

**Usage without install**:

```bash
npx compact-img-cli [options]
```

**Usage after install** (recommended):

```bash
## install
npm i -g compact-img-cli

# usage
compact-img-cli [options]
# or
compact-img [options]
```

## Options

```
-h | --help         Show this help message
-d | --dir          Directory to be scanned   (Default is current working directory)
-s | --max-size     Compact the images if it excesses this size  (Default 300KB)
-m | --mode         'once' or 'daemon'  (Default is 'once')
-b | --backup-dir   Directory to backup original image, otherwise will be overwritten   (Default is none)
-i | --interval     Interval between each scan in 'daemon' mode   (Default in 1 day)
                    Format: 1d -> 1 day
                            1h -> 1 hour
                            1m -> 1 minute
                            1s -> 1 second
                            1  -> 1 ms
```

## License

This project is licensed with [BSD-2-Clause](./LICENSE)

This is free, libre, and open-source software. It comes down to four essential freedoms [[ref]](https://seirdy.one/2021/01/27/whatsapp-and-the-domestication-of-users.html#fnref:2):

- The freedom to run the program as you wish, for any purpose
- The freedom to study how the program works, and change it so it does your computing as you wish
- The freedom to redistribute copies so you can help others
- The freedom to distribute copies of your modified versions to others

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