Build and install a binary crate from a repository.

Section: Install binary crates

Install directly from git

bash
bash
cargo install --git https://github.com/sharkdp/bat
Explanation

Useful for unreleased versions or internal tools.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Install binary crates
Install a binary from crates.io
Install a published executable crate.
OpenIn sheetbashsame section
Install a specific version
Pin the crate version during install.
OpenIn sheetbashsame section
Honor the package lockfile
Use the package's lockfile when installing.
OpenIn sheetbashsame section
Install from a local path
Build and install the current local crate.
OpenIn sheetbashsame section
Remove an installed binary crate
Delete binaries installed by `cargo install`.
OpenIn sheetbashsame section
Create a package tarball
Build the package as it would be published.
OpenIn sheetbash1 tag match