Skip to content

Repository files navigation

latest

Find the latest version of any command, package, or library. Scans project files automatically.

Installation

macOS (Homebrew)

brew install cv/taps/latest

From source

cargo install --path .

Quick Start

# Scan current projectcd my-rust-project
latest
# Scanning Cargo.toml...# tokio: 1.48.0 ✓# serde: 1.0.228 ✓# Check specific packages
latest node go rust

Features

  • 17 sources: System (path, brew, apt), Python (uv, pip, conda), JavaScript (npm), Rust (cargo), Go (go), Ruby (gem), Elixir (hex), Dart (pub), PHP (composer), JVM (maven), Docker (docker), .NET (nuget), Swift (swift)
  • Project scanning: Auto-detects Cargo.toml, package.json, uv.lock, pyproject.toml, go.mod
  • Ecosystem-aware: Compares versions within the same ecosystem (won't flag npm's go as newer than Go the language)
  • Context-aware install hints: Suggests cargo add in a Cargo project, npm install (not -g) in a Node project
  • Multiple output formats: Human-readable, JSON, quiet mode

Usage

latest # Scan project files in current directory
latest <package> # Check specific package(s)
latest npm:express # Query specific source with prefix
latest --all node # Show all sources
latest -s cargo serde # Query specific source (alternative syntax)
latest --json # JSON output for scripting
latest -q node # Quiet: just version number

Output

OutputMeaning
pip: 0.6.0 (installed)Up to date, shows source
npm: 24.0.0 → 25.2.1 availableOutdated
not installed (available: ...)Not installed, with install hints
not foundPackage doesn't exist in any source
⚠ Also found in: brew, npmPackage exists in multiple ecosystems

Exit Codes

CodeMeaning
0All packages up to date
1Package not found or not installed
2Package outdated

Sources

SourceTypeEcosystemDescription
pathlocalSystemCommands in $PATH
brewregistrySystemHomebrew packages
aptregistrySystemAPT packages (Debian/Ubuntu)
npmregistryNpmnpm registry
uvlocalPythonuv project-local packages
piplocalPythonLocally installed pip packages
condaregistryPythonConda packages
goregistryGoGo module proxy
cargoregistryCargocrates.io
gemregistryRubyRubyGems
hexregistryBeamHex.pm (Elixir/Erlang)
pubregistryDartpub.dev
composerregistryPhpPackagist (PHP)
mavenregistryJvmMaven Central
dockerregistryContainerDocker Hub
nugetregistryDotnetNuGet (.NET)
swiftregistrySwiftSwift Package Index

Project Scanning

When run without arguments, latest scans for project files in this order:

FileSourceLanguage
Cargo.tomlcargoRust
package.jsonnpmNode.js
uv.lockpipPython (uv)
pyproject.tomlpipPython
go.modgoGo

Configuration

Create ~/.config/latest/config.toml to customize source precedence:

precedence = ["path", "brew", "apt", "npm", "uv", "pip", "conda", "go", "cargo", "gem", "hex", "pub", "composer", "maven", "docker", "nuget", "swift"]

Examples

# Check if project dependencies are current
latest
# Check a package (shows source and cross-ecosystem warnings)
latest latest
# pip: 0.6.0 (installed)# ⚠ Also found in: brew, npm, cargo, gem# Query a specific ecosystem with prefix syntax
latest npm:latest
# npm: 0.2.0# JSON output for scripting
latest --json | jq '.[] | select(.status != "up_to_date")'# Check all sources for a package
latest --all node
# path: 25.2.1 (installed)# brew: 25.2.1# npm: 24.12.0# Quiet mode for scripts (version only, no source prefix)
latest -q -s npm express
# 5.2.1

Development

cargo build # Build
cargo test# Run tests
cargo run -- node # Run directly
cargo bench # Run benchmarks

Benchmarks

Benchmarks use Criterion for statistical analysis. Results and HTML reports are saved to target/criterion/.

cargo bench # Run all benchmarks
cargo bench -- version_comparison # Run specific group

Property-Based Testing

Property tests use proptest for randomized input generation (works on stable Rust):

cargo test proptests # Run with default 256 cases
PROPTEST_CASES=10000 cargo test proptests # Run with more cases

License

MIT

About

Find the latest version of any command, package, or library

Resources

Security policy

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages