cargo-latest-version

Crates.iocargo-latest-version
lib.rscargo-latest-version
version0.1.0
created_at2025-11-13 21:15:22.698155+00
updated_at2025-11-13 21:15:22.698155+00
descriptionA small cli that returns the latest version of a rust crate.
homepage
repositoryhttps://github.com/Rick-Phoenix/cargo-latest
max_upload_size
id1931870
size65,592
Ricky (Rick-Phoenix)

documentation

README

cargo-latest

A small cli that returns the latest version of a rust crate.

How To Use

Usage: cargo latest [OPTIONS] <NAME>

Arguments:
  • <NAME> — The name of the target crate
Options:
  • --minor — Returns only the minor portion of the version (e.g. "1.0.0" => "1.0")
  • --major — Returns only the major portion of the version (e.g. "1.0.0" => "1")
  • --exact — Whether the version should be exact (e.g. "=1.0.0")
  • -p, --pure — Returns the pure crate version, without the crate name. Incompatible with --optional, --features and --no-default
  • -o, --optional — Adds optional = true to the output (e.g. serde = { version = "1.0", optional = true }). Incompatible with --pure
  • -f, --features <FEATURES> — Adds a list of features to the output (e.g. serde = { version = "1.0", features = ["derive"] }). Incompatible with --pure
  • --no-default — Adds default-features = false the output (e.g. serde = { version = "1.0", default-features = false }). Incompatible with --pure

Clipboard Integration

You can combine this command with your os-specific clipboard tools to directly copy the output value to the clipboard.

Example in bash:

cargo latest --major serde | xclip -selection clipboard

You can then create a function to make the command even easier:

cargo-latest() {
  cargo latest "$@" | xclip -selection clipboard
}
cargo-latest --major serde
Commit count: 0

cargo fmt