#npm-package #deno #npm #jsr

app pkg-latest

Resolve latest versions of npm and jsr packages

3 releases (stable)

Uses new Rust 2024

1.2.0 Oct 20, 2025
1.1.0 Oct 20, 2025
1.0.0 Oct 8, 2025
0.1.0 Oct 8, 2025

#93 in Development tools

Download history 192/week @ 2025-10-02 149/week @ 2025-10-09 196/week @ 2025-10-16 37/week @ 2025-10-23

574 downloads per month

MIT license

9KB
149 lines

pkg-latest

A simple CLI tool to resolve the latest version of npm and jsr packages. Useful for Deno commands where you want to always use the latest version without manually checking.

Installation

cargo install pkg-latest

Or build from source:

cargo build --release

Usage

pkg-latest takes a package specifier (with npm: or jsr: prefix) and outputs the same specifier with the latest version appended.

latest npm:@google/gemini-cli
# Output: npm:@google/gemini-cli@1.2.3

latest jsr:@sigma/bisect
# Output: jsr:@sigma/bisect@0.5.0

Use with Deno

The primary use case is with Deno command substitution:

# Fish shell
deno run -A (latest jsr:@sigma/bisect)
deno run --no-config -A (latest npm:@google/gemini-cli) $argv

# Bash/Zsh
deno run -A $(latest jsr:@sigma/bisect)
deno run --no-config -A $(latest npm:@google/gemini-cli) "$@"

This ensures you always run the latest version without having to manually update version numbers.

How it works

  • For npm packages: queries the npm registry at https://registry.npmjs.org/
  • For jsr packages: queries the JSR registry at https://jsr.io/
  • Fetches the latest dist-tag/version and appends it to the package specifier

Dependencies

Minimal dependencies for fast compilation and small binary size:

  • ureq - lightweight HTTP client
  • serde - JSON parsing

License

MIT

Dependencies

~14–26MB
~431K SLoC