Install via Nix
Install git-cliff using Nix for reproducible, declarative package management.Quick Start
- nix-shell
- nix-env
- nix run
- nix shell
Temporarily use git-cliff:This opens a shell with git-cliff available.
Installation Methods
Traditional Nix Commands
Using nix-shell (Recommended)
Temporarily add git-cliff to your environment:This creates an isolated environment with git-cliff available.To use it:
New Nix CLI (Experimental)
The new Nix CLI requires enabling experimental features. Add to
~/.config/nix/nix.conf:- nix run
- nix shell
- nix profile
Run git-cliff directly without installing:With arguments:
NixOS Configuration
Add git-cliff to your system configuration:- configuration.nix
- home-manager
- Flakes
Add to Rebuild your system:
/etc/nixos/configuration.nix:Development Shell
Create a development environment with git-cliff:- shell.nix
- flake.nix
Create Enter the shell:
shell.nix in your project:Channel Management
Using Stable Channel
git-cliff is available in the stable channel:Using Unstable Channel
For the latest features, use the unstable channel:Managing Installation
Troubleshooting
Command not found after installation
Command not found after installation
Ensure your Nix profile is in your PATH:Add to your shell configuration (Or source the Nix profile:
~/.bashrc, ~/.zshrc, etc.):Experimental features not enabled
Experimental features not enabled
To use the new Nix CLI commands, enable experimental features:Permanently:Create/edit Temporarily:
~/.config/nix/nix.conf:Package not found
Package not found
Update your channels:Or search for the package:Try the unstable channel if not found in stable.
Permission denied errors
Permission denied errors
Nix should not require sudo for most operations. If you get permission errors:
-
Ensure Nix is properly installed:
-
Check Nix daemon is running (multi-user install):
-
Reinstall Nix if needed:
Old version installed
Old version installed
If you’re getting an older version:
-
Update channels:
-
Reinstall:
-
Or use unstable channel:
Why Use Nix?
Reproducibility
Nix ensures exact reproducibility. The same configuration always produces the same result.
Declarative
Define your environment declaratively. Share configurations across machines.
Rollbacks
Easily rollback to previous configurations if something breaks.
Isolation
Packages are isolated. No conflicts between versions or dependencies.
Next Steps
Configuration
Configure git-cliff for your project
Nix Flakes
Learn about Nix Flakes