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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gh-latest

v1.2.10102

Published

A simple tool to fetch the latest version from GitHub.

Downloads

4

Readme

github-latest

A quick little utility to download the latest release of a given project from GitHub.

This is a very specific tool for my own needs, but is open-source in case it is of use to others, either directly or as example code.

The next version will support unzipping the downloaded file (if you chose zip).

Note: It does not use project versions or tags, it uses the publish date and will download the latest.

Download

Binary executables can be downloaded for Windows, Linux and MacOS X. These are available as assets on the Release page.

Usage

Usage: latest [-avxXh?] owner project [tar|zip|unzip|asset [ outfile]]
 e.g.: latest -x appurist github-latest zip latest.zip
   or: latest appurist github-latest asset   (list assets)
   or: latest appurist github-latest asset latest.exe   (download latest.exe)
Options are:
    -a all: display all release versions/tags (no download)
    -x expand: (unzip) the zip file after download
    -X expand verbose: unzip and show files
    -v version: show version info
    -h or -? help: show this usage syntax

The default is to download the zip file, and the output filename (outfile) is either latest.zip or latest.tar.gz, depending on the format requested.

Choosing unzip is the same as zip (it downloads the .zip from GitHub), however it automatically expands the zip file into a new "latest-unzipped" folder. Alternatively, specifying a -x option before the other arguments also implies a zip format and expands the files. Specifying -X (capitalized) expands the zip in a verbose manner, naming every file expanded.

Note that when unzipping, it replaces the top-level GitHub numbered folder name (e.g. "appurist-github-latest-acdd162") with a fixed "latest-unzipped" folder name for easy scripting and automation. When expanding the zip file, it does not remove the downloaded zip file.

For example, to download the zip for the latest release of this project:

latest appurist github-latest

This will download the latest release as latest.zip. To automatically extract the contents of the zip file:

latest appurist github-latest unzip

This will download the latest release as latest.zip, and extract its contents into a "latest-unzipped" folder.

To download the tarball for the latest release of this project:

latest appurist github-latest tar

This will download the latest release as latest.tar.gz.

It is also possible to specify the download file (or path):

latest appurist github-latest zip outfile.zip

This will download the latest zip release as outfile.zip.

Release 1.2: Support for Downloading Assets

This update provides new support for assets attached to GitHub releases.

This update adds new functionality to list or download assets.:

For example, using this command, to fetch the latest, um, latest executable itself for Windows, you would use:

latest appurist github-latest asset latest.exe

To list available assets, just don't specify one:

latest appurist github-latest asset

To Build

Prerequisites: You must have Node.js installed to build this, as well as yarn (or you can run "npm install" and substitute "npm run" everywhere else you see "yarn").

To build this tool with yarn:

yarn install
yarn build

This will produce an executable named latest (or latest.exe on Windows).