https://github.com/kjbrum/kraken-cli
Optimize images with the Kraken.io API.
https://github.com/kjbrum/kraken-cli
Last synced: 13 days ago
JSON representation
Optimize images with the Kraken.io API.
- Host: GitHub
- URL: https://github.com/kjbrum/kraken-cli
- Owner: kjbrum
- License: mit
- Created: 2016-12-01T15:14:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-30T22:54:35.000Z (over 8 years ago)
- Last Synced: 2025-04-13T03:07:54.429Z (13 days ago)
- Language: Shell
- Size: 28.3 KB
- Stars: 2
- Watchers: 0
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Kraken CLI
> Optimize images with the Kraken.io API.
## Dependencies
- [jq](https://stedolan.github.io/jq) - Used to parse JSON responses.
## Install
```
$ curl https://raw.githubusercontent.com/kjbrum/kraken-cli/master/kraken > ~/bin/kraken
$ chmod +x ~/bin/kraken
```## Usage
```
Kraken CLIOptimize images with the Kraken.io API.
Usage:
$ krakenOptions:
--callback= Callback URL for posting the response to
--convert= Convert your image to a different format
- https://kraken.io/docs/image-type-conversion
--dev Enable developer mode (false)
--file= Path to the file to upload and optimize
--folder= Path to the folder of images to upload and optimize
--help Display the help text
--lossy Enable lossy optimization (false)
--meta= Preserve metadata of the image (profile|date|copyright|geotag|orientation)
--orient Enable lossless rotation of the image (false)
--quality= Quality of the optimized image (1-100)
--resize= Resize or generate multiple sizes of the given image
- https://kraken.io/docs/image-resizing
- https://kraken.io/docs/generating-image-sets
--sampling= Set a custom chroma subsampling for the optimization (4:2:0|4:2:2|4:4:4)
--status Query your account status
--url= URL of the image you want to optimize
--webp Enable returning WebP format (false)Example:
$ kraken --url=http://example.com/image.jpg --lossy --convert='{"format": "jpg", "background": "#ff0000"}'
$ kraken --url=http://example.com/image.jpg --meta='["profile", "date"]'
$ kraken --file=path/to/image.jpg --resize='{"size": 150, "strategy": "square"}'
$ kraken --folder=path/to/folder --lossy --quality=50 --webp
```## Config
[Find/create your API credentials here.](https://kraken.io/account/api-credentials)
##### KRAKEN_KEY
Your Kraken.io API key.
##### KRAKEN_SECRET
Your Kraken.io API secret.
## License
Copyright © [Kyle Brumm](http://kylebrumm.com). Free to use on whatever and may be redistributed under the terms specified in the [license](LICENSE.md).