Home

Awesome

imgcat NPM version NPM downloads

Display image in iTerm2 version 2.9+

Install

$ npm install --save imgcat

Usage

imgcat can automatically detect iTerm and iTerm version.

Promise mode

imgcat(file[, width])

imgcat('foo.jpg')
	.then(img => {
		console.log(img)
	})
	.catch(e => {
		console.log(e.message)
	})

Sync mode

imgcat.sync(file[, width])

const img = imgcat.sync(file)
console.log(img)

CLI

Install

$ npm install -g imgcat

Usage

$ imgcat a.jpg
$ imgcat -h

License

The shell script is borrowed from https://iterm2.com/imgcat.