Install via NPM
Install git-cliff from NPM for seamless integration with Node.js projects.Quick Start
Run git-cliff without installing:Installation
- npm
- yarn
- pnpm
- bun
Install as a dev dependency:Run after installation:
Detailed Installation Steps
Install Node.js
Ensure you have a supported Node.js version:
- Node.js >= 18.19
- Node.js >= 20.6
- Node.js >= 21
Programmatic API
git-cliff provides a fully typed TypeScript API for integration into your tools.Basic Usage
Advanced Usage
Supported Platforms
NPM packages are distributed for:| Platform | Architecture |
|---|---|
| Linux | x64, arm64 |
| macOS | x64 (Intel), arm64 (Apple Silicon) |
| Windows | x64, arm64 |
Integration Examples
- Release Script
- Pre-commit Hook
- CI/CD Integration
Create a release script in Add to Usage:
scripts/release.js:package.json:Troubleshooting
Node.js version not supported
Node.js version not supported
Ensure you’re using a supported Node.js version:Minimum versions:
-
= 18.19
-
= 20.6
-
= 21
Binary not found or fails to execute
Binary not found or fails to execute
The npm package downloads platform-specific binaries. If the binary fails:
- Check your platform is supported
- Try reinstalling:
- Clear npm cache:
TypeScript types not found
TypeScript types not found
git-cliff includes TypeScript types. Ensure your
tsconfig.json includes:npx runs wrong version
npx runs wrong version
Clear npx cache and specify version:
Next Steps
Configuration
Configure git-cliff for your project
GitHub Actions
Automate changelog generation