https://github.com/wyhaya/tinypng
Command line tool for compressing images using the TinyPNG API
https://github.com/wyhaya/tinypng
compress-images images tinypng tinypng-cli
Last synced: 5 months ago
JSON representation
Command line tool for compressing images using the TinyPNG API
- Host: GitHub
- URL: https://github.com/wyhaya/tinypng
- Owner: wyhaya
- License: mit
- Created: 2022-03-06T07:05:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-22T07:08:45.000Z (almost 3 years ago)
- Last Synced: 2025-05-07T00:35:43.547Z (6 months ago)
- Topics: compress-images, images, tinypng, tinypng-cli
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tinypng [](https://crates.io/crates/tinypng)
Command line tool for compressing images using the TinyPNG API
## Install
[Download](https://github.com/wyhaya/tinypng/releases) the binary from the release page
Or use `cargo` to install
```bash
cargo install tinypng
```
## Usage
1. Register a KEY using your email at [link](https://tinypng.com/developers)
2. Set TinyPNG API KEY
```sh
tinypng -k
# Set API KEY successfully
# Your key is stored in ~/.config/tinypng/config.toml
```
3. Compress images
```sh
tinypng ./test.png
# test.png: Origin: 1004.7 KB Compressed: 245.4 KB(75.6%)
# Glob
tinypng ./images/*.png
# images/test.png: Origin: 1.4 MB Compressed: 174.5 KB(87.8%)
```