Skip to main content

NPM

You can install and run git-cliff from NPM with a single command:

npx git-cliff@latest

Also, if you want to add git-cliff to your project:

# with yarn
yarn add -D git-cliff

# with npm
npm install git-cliff --save-dev

Afterwards, you can run git-cliff via npm exec git-cliff or npx git-cliff@latest.

Programmatic API

git-cliff also provides a fully typed programmatic API. You can use it to integrate git-cliff into your own tooling.

import { runGitCliff, type Options } from 'git-cliff';

const options: Options = {
// ...
};

runGitCliff(options);

Under the hood this will parse the options, set up the environment and call the git-cliff binary for you.