Skip to content

Repository files navigation

@tinify_cli/cli

DownloadsVersionGitHub licensePRs Welcome

A compress image resource cli tool througth by tinify.

Why

  • Convert other image type to webp
  • Compress any image files in your local
  • Watch mode, it can listen the assets dir, and auto execute convert or compress action

Install

$ npm install @tinify_cli/cli -g

Set up

First of all, it need get tinify token. Copy it to your env file(like ~/.zshrc in Mac OSX):

# ~/.zshrc
$ export TINIFY_TOKEN=xxxxxxx

Finally, execute the command:

$ source~/.zshrc

Usage

Compress

$ tinify compress --name=[YOUR_IMAGE_PATH]

Generate to Webp

$ tinify generate --name=[YOUR_IMAGE_PATH]

Common options

--all

short:-a

Transform all files in the directory.

--watch

short:-w

Watch mode, the transform action wont't act immediately when the command is executed.

--name

short:-n

The name of the file to transform.

Note: With this option, the --all will be invalid.

--cwd

short:-c

The working directory of where @tinify_cli/cli command will be executed in, all other paths options are relative to this path.

--dir

short:-d

The directory to transform.

--output

short:-o

The directory to store the transformed files.

About

Command tool for compress and convert image

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages