Skip to content

mcnaveen/blurhash-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blurhash CLI

🦄 Generate blurhash without leaving your terminal.

Test Downloads this Week Bundle Size Version

Blurhash from URL

📦 Requirements

  • Node.js 16X LTS or Higher 📦

✨ Installation

  • Install the NPM Package with the below command:
#npm
npm install -g blurhash-cli

#yarn
yarn global add blurhash-cli

Please note that you can also use npx to run the package without installing it globally.

Example: npx blurhash-cli

💡 Usage

In your terminal, run the below command:

npx blurhash-cli https://i.imgur.com/NhfEdg2.png

Modify the Size (Size is optional, it defaults to 32):

The size flag controls the quality of the generated blurhash. A higher size value results in better quality but longer generation time.

npx blurhash-cli https://i.imgur.com/NhfEdg2.png --size=64

☑️ Output

✔ 🥳 Blurhash Generated
› Hash: UnR.*,kW.TnPt7WBocozpJV@nMkWadofWCV@
› Width: 600
› Height: 600

🚀 Example with Local Image

npx blurhash-cli ./image.png --local

🔯 Credits

  • This CLI uses the blurhash-from-url library to generate the blurhash for the given URL.

💚 Message

I hope you find this useful. If you have any questions, please create an issue.