Skip to main content

Install via Homebrew

Install git-cliff on macOS or Linux using Homebrew.

Quick Install

brew install git-cliff

Prerequisites

1

Install Homebrew

If you don’t have Homebrew installed, install it first:macOS/Linux:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Verify installation:
brew --version
2

Update Homebrew

Ensure Homebrew is up to date:
brew update

Installation Steps

1

Install git-cliff

brew install git-cliff
This will:
  • Download the latest version from Homebrew
  • Install git-cliff to /opt/homebrew/bin/ (Apple Silicon) or /usr/local/bin/ (Intel)
  • Set up necessary symlinks
2

Verify installation

git-cliff --version
Expected output:
git-cliff 2.7.0
3

Test in a repository

cd /path/to/your/git/repo
git-cliff --help

Formula Information

View formula information:
brew info git-cliff
This shows:
  • Current version
  • Installation path
  • Dependencies
  • Homepage and description

Managing Homebrew Installation

# Update Homebrew and upgrade git-cliff
brew update && brew upgrade git-cliff

# Upgrade all packages
brew upgrade

Platform-Specific Notes

Apple Silicon (M1/M2/M3)

Homebrew installs to /opt/homebrew/ on Apple Silicon:
which git-cliff
# /opt/homebrew/bin/git-cliff
Ensure /opt/homebrew/bin is in your PATH:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Intel Macs

Homebrew installs to /usr/local/ on Intel Macs:
which git-cliff
# /usr/local/bin/git-cliff
This path is typically in PATH by default.
If you’re on Apple Silicon and see “Bad CPU type in executable”, you may be running the Intel version. Reinstall:
brew reinstall git-cliff

Alternative: Homebrew Tap

If the official formula is outdated, you can use a tap (custom formula):
# Add a custom tap (example)
brew tap orhun/git-cliff
brew install orhun/git-cliff/git-cliff
This is only needed if there’s a custom tap available. The official formula is usually sufficient.

Troubleshooting

Add Homebrew to your PATH:Apple Silicon:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc
Intel Mac:
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc
Linux:
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
source ~/.bashrc
Update Homebrew’s formula list:
brew update
If still not found, search for it:
brew search git-cliff
Fix Homebrew permissions:
sudo chown -R $(whoami) /opt/homebrew/*  # Apple Silicon
# or
sudo chown -R $(whoami) /usr/local/*     # Intel Mac
Or reinstall Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Check if git-cliff is installed:
brew list git-cliff
Find where it’s installed:
brew --prefix git-cliff
Add to PATH manually:
export PATH="$(brew --prefix)/bin:$PATH"
If you have multiple installations:
# Check all git-cliff locations
which -a git-cliff

# Use Homebrew version explicitly
$(brew --prefix)/bin/git-cliff --version

# Remove other installations if needed
# (cargo, npm, etc.)
Speed up Homebrew updates:
# Disable auto-update
export HOMEBREW_NO_AUTO_UPDATE=1

# Add to shell config for permanent effect
echo 'export HOMEBREW_NO_AUTO_UPDATE=1' >> ~/.zshrc
Update manually when needed:
brew update

Keeping Updated

Homebrew makes updates easy:
# Update Homebrew and check for outdated packages
brew update
brew outdated

# Upgrade git-cliff specifically
brew upgrade git-cliff

# Or upgrade all packages
brew upgrade
Automate updates with a script:
#!/bin/bash
# save as ~/bin/brew-update.sh
brew update
brew upgrade
brew cleanup

Next Steps

Configuration

Configure git-cliff for your project

Usage Examples

Learn how to use git-cliff

Build docs developers (and LLMs) love