# simple-tinypng-cli

> A convenient tool to compile imgs via tinypng api. tinypng-cli

Latest version **1.2.0** (published 2018-11-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-tinypng-cli
pnpm add simple-tinypng-cli
yarn add simple-tinypng-cli
bun add simple-tinypng-cli
```

Provides the command `tinypng`.

## 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.2.0 |
| Published | 2018-11-30 |
| First published | 2018-11-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | leoytliu |
| Maintainers | leoeatle |

## Links

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

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [tinify](https://npm.io/package/tinify.md) ^1.5.0
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.2
- [glob-all](https://npm.io/package/glob-all.md) ^3.1.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0

## Recent versions

- 1.2.0 (latest) — 2018-11-30
- 1.1.6 — 2018-11-28
- 1.1.5 — 2018-11-28

## README

# tinypng-cli

A convenient tool to compile imgs via tinypng api.

## Usage

```
tnpm install -g @tencent/tinypng-cli
cd <img-dir>
tinypng
```
By default, it will compress all the image files in your current directory.

<img src="https://tuchuang-1251767583.cos.ap-guangzhou.myqcloud.com/Jietu20181119-215155@2x.jpg" width="360" >

❤️It works like charm.

You can also pass the file path to it like this:

`tinypng <img-path>`

You can also pass multiple file paths to it like this:

`tinypng <img1-path> <img2-path> ...`

## API

### --dir
The output path. If no param, it will replace original images as default behavior. 

`tinypng --dir <dir-name>`

### -key
The key to use tinypng api. The default key is my key. (NOT RECOMMAND)

`tinypng --key <key>`

### -proxy
Proxy. May be useful in company network.

`tinypng --proxy <hostname>`

## Compatibility

Use `async/await` to implement chaining network request. 

No babel used. So it is only supported in Node 8+. 

PR welcomed!

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