npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@driyink/cli-icons

v1.0.1

Published

Render brand icons (GitHub, GitLab, Discord, etc.) directly in your terminal using Sixel, iTerm2/Kitty graphics protocols, or ANSI block fallback.

Readme

cli-icons

Render brand icons (GitHub, GitLab, Discord, npm, Slack, VS Code, X) directly in your terminal — not ASCII art, real SVG → PNG rasterized icons.

Supports four rendering protocols with automatic fallback:

| Priority | Protocol | Terminals | |----------|----------|-----------| | 1 | Sixel | iTerm2, WezTerm, mintty, mlterm, foot, xterm+sixel | | 2 | Kitty graphics | Kitty, WezTerm, Konsole 22.04+ | | 3 | iTerm2 inline image | iTerm2, WezTerm (and compatibles) | | 4 | ANSI block chars | Any terminal with 24-bit color (universal fallback) |

Install

npm install cli-icons
# or locally from the .tgz:
npm install ./cli-icons-1.0.0.tgz

Library API

Named imports (recommended)

import { GitHub, Discord, NPM, VSCode, GitLab, X, Slack } from 'cli-icons';

GitHub();                              // default size 'sm' (24px), auto-detected protocol
GitHub({ size: 'md' });                // 32px
GitHub({ size: 48 });                  // custom pixel size
GitHub({ color: '#FF0000' });          // custom color
GitHub({ protocol: 'ansi' });          // force ANSI block fallback
GitHub({ background: '000000' });      // black background (ANSI only)
GitHub({ noNewline: true });           // suppress trailing newline

Dynamic access

import { icons, renderById, listIcons, getIcon } from 'cli-icons';

icons.github();                        // render via namespace
renderById('discord', { size: 'lg' }); // render by id string

for (const icon of listIcons()) {
  console.log(icon.id, icon.label, icon.color);
}

Get the rendered string instead of writing to stdout

const result = GitHub({ size: 'sm', returnString: true });
// result.output     → string (ANSI/Sixel/iTerm/Kitty bytes)
// result.protocol   → 'sixel' | 'kitty' | 'iterm' | 'ansi'
// result.width      → pixels
// result.height     → pixels

CLI binary

# Install globally (or use npx)
npx cli-icons github

# Available commands
cli-icons --help
cli-icons --list
cli-icons github
cli-icons discord --size=md --color=5865F2
cli-icons npm --size=lg
cli-icons vscode --protocol=ansi --background=1E1E1E
cli-icons --list --json

CLI options

| Flag | Description | |------|-------------| | <icon-id> | Icon to render (github, gitlab, x, discord, slack, npm, vscode) | | --size=<s> | xs (16px), sm (24px, default), md (32px), lg (48px), xl (64px), or a pixel number | | --color=<hex> | Override icon color (FF0000 or #FF0000) | | --background=<hex> | Background color (ANSI mode only). Default: transparent | | --protocol=<p> | Force: sixel | kitty | iterm | ansi. Default: auto-detect | | --list | List all available icons | | --json | Output as JSON (with --list) | | -h, --help | Show help |

How rendering works

  1. SVG source — Each icon is stored as an inline SVG path (24×24 viewBox).
  2. Rasterization@resvg/resvg-js renders the SVG to a PNG buffer at the requested pixel size. The PNG is then parsed via pngjs to obtain raw RGBA pixel data.
  3. Protocol encoding:
    • Sixel: pure-JS encoder that quantizes colors and emits band-by-band sixel sequences with RLE compression.
    • Kitty: PNG bytes are base64-chunked and wrapped in _G APC sequences.
    • iTerm2: PNG is base64-encoded in an OSC 1337 File= sequence.
    • ANSI: 2 vertical pixels per terminal cell using ▀ ▄ █ ' ' half-block characters with 24-bit truecolor SGR escapes.
  4. Output — The encoded string is written to process.stdout.

Available icons

| ID | Label | Default color | |----|-------|---------------| | github | GitHub | #181717 | | gitlab | GitLab | #FC6D26 | | x | X (formerly Twitter) | #000000 | | discord | Discord | #5865F2 | | slack | Slack | #4A154B | | npm | npm | #CB3837 | | vscode | Visual Studio Code | #007ACC |

Adding your own icons

The icon registry lives in src/icons.ts. Each entry is:

{
  id: 'mybrand',
  name: 'MyBrand',
  label: 'My Brand',
  color: 'FF6600',
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor"><path d="..."/></svg>'
}

License

MIT