Skip to main content

Install via Cargo

Install git-cliff from crates.io using Cargo, Rust’s package manager.

Prerequisites

Minimum supported Rust version: 1.85.1
Ensure you have Rust and Cargo installed:
rustc --version
cargo --version
If not installed, get Rust from rustup.rs.

Installation

1

Install from crates.io

Install the latest stable version:
cargo install git-cliff
This will download, compile, and install git-cliff with all default features enabled.
2

Verify installation

Check that git-cliff is installed correctly:
git-cliff --version
Expected output:
git-cliff 2.7.0
3

Test the installation

Run git-cliff in a git repository:
cd /path/to/your/git/repo
git-cliff --help

Advanced Installation

Install the bleeding-edge version from the main branch:
cargo install --git https://github.com/orhun/git-cliff
The git version may contain unreleased features and potential bugs.

Updating

Update to the latest version:
cargo install git-cliff --force
Or use cargo-update:
cargo install cargo-update
cargo install-update git-cliff

Uninstalling

Remove git-cliff:
cargo uninstall git-cliff

Troubleshooting

Ensure you have the necessary build tools:Linux (Debian/Ubuntu):
sudo apt-get install build-essential pkg-config libssl-dev
Linux (Fedora):
sudo dnf install gcc pkg-config openssl-devel
macOS:
xcode-select --install
Cargo installs binaries to ~/.cargo/bin/. Ensure this is in your PATH:Bash/Zsh:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Fish:
set -U fish_user_paths $HOME/.cargo/bin $fish_user_paths
Update Rust to the minimum supported version:
rustup update stable
Check your Rust version:
rustc --version
Speed up compilation by using more CPU cores:
cargo install git-cliff -j $(nproc)
Or use a pre-compiled binary from the binary installation method.

Next Steps

Configuration

Learn how to configure git-cliff

Usage Examples

See practical examples

Build docs developers (and LLMs) love