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

gh-cdn

v1.0.0

Published

A simple cli tool to upload images to github and use github as a mini cdn.

Readme

gh-cdn

gh-cdn is a command-line tool that simplifies uploading images to your GitHub repositories. I use GitHub as a mini cdn for my personal blog.

Features

  • Uploads local image files directly to a specified GitHub repository.
  • Provides both the jsDelivr CDN URL and the raw GitHub URL for the uploaded image.

Prerequisites

Before using gh-cdn, you need to have the following installed and configured:

  • Node.js: Make sure you have Node.js installed on your system.
  • GitHub CLI (gh): Install the GitHub CLI and authenticate it by running gh auth login. gh-cdn relies on the GitHub CLI to get your authentication token.

Installation

You can install gh-cdn globally via npm:

npm install -g gh-cdn

Usage

To upload an image, run the gh-cdn command followed by the repository path and the local path to your image file:

gh-cdn <repo_path> <image_path>

Arguments

  • <repo_path> (Required): The name of your GitHub repository in the format username/reponame.
    • Example: my-username/my-repo
  • <image_path> (Required): The local path to the image file you want to upload.
    • Example: ./docs/images/picture.png or ~/Pictures/screenshot.png

Examples

Upload an image to your my-blog repository:

gh-cdn your-username/my-blog ./content/images/my-awesome-image.jpg

Upload a screenshot from your home directory:

gh-cdn another-user/project-docs ~/Screenshots/dashboard-screenshot.png

Output

Upon successful upload, gh-cdn will print a JSON object containing various URLs and SHAs related to the uploaded image:

{
    "url": "https://github.com/your-username/your-repo/blob/main/path/to/your/image.jpg",
    "raw_github_url": "https://raw.githubusercontent.com/your-username/your-repo/main/path/to/your/image.jpg",
    "download_url": "https://raw.githubusercontent.com/your-username/your-repo/main/path/to/your/image.jpg",
    "jsdelivr_url": "https://cdn.jsdelivr.net/gh/your-username/your-repo@main/path/to/your/image.jpg",
    "sha": "a1b2c3d4e5f6...",
    "commit_sha": "x1y2z3a4b5c6..."
}

You can then use the jsdelivr_url for a fast CDN-backed image, or raw_github_url for direct access to the file on GitHub.