
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
Render PNG and JPEG images beautifully in your terminal using ANSI colors and Unicode blocks.
A Node.js utility that displays images directly in your terminal using ANSI escape codes and Unicode characters.
npm install climg -g
Display an image with default settings (fills terminal width):
climg image.jpg
Set custom width and height using pixels:
climg image.jpg -w 100 -h 30
Set custom width and height using percentages:
climg image.jpg -w 50% -h 80%
Set only width (height will be calculated to maintain aspect ratio):
climg image.jpg -w 120
Set only height (width will be calculated to maintain aspect ratio):
climg image.jpg -h 40
Disable true color and use 256-color mode instead:
climg image.jpg -t
Usage: climg <image.png|jpg> [options]
Options:
-w <size> Set width in pixels or percentage (e.g., 80 or 50%)
-h <size> Set height in pixels or percentage (e.g., 40 or 80%)
-t Disable true color, use 256 colors instead
Display a photo at 75% of terminal width:
climg photo.jpg -w 75%
Display a logo at exact dimensions:
climg logo.png -w 60 -h 20
Display using 256 colors for compatibility:
climg image.jpg -w 100 -t
pngjs and jpeg-js librariesWorks best with terminals that support true color (24-bit):
For older terminals, use the -t flag to enable 256-color mode.
You can also use climg as a module in your own Node.js programs:
import { climg, loadImage, renderImage, ClimgOptions, ImageData } from "climg";
(async () => {
// Define rendering options (with full IntelliSense)
const options: ClimgOptions = {
width: 100,
height: 30,
trueColor: true,
};
// Display an image directly in the terminal
await climg("image.jpg", options);
// Load an image and inspect its pixel data
const image: ImageData = await loadImage("image.jpg");
console.log(`Image dimensions: ${image.width}x${image.height}`);
// Render the image to an ANSI string (instead of printing directly)
const output: string = renderImage(image.pixels, {
width: 80,
trueColor: true,
});
// Print the ANSI-rendered image manually
console.log(output);
})();
You can also run it in plain JavaScript (same syntax, just replace import with require).
FAQs
Render PNG and JPEG images beautifully in your terminal using ANSI colors and Unicode blocks.
We found that climg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.