Skip to content
Browse files
docs(readme): add npx use examples (#532)
closes #502
  • Loading branch information
giocodes authored and jimthedev committed Jun 18, 2018
1 parent d103b10 commit d5b8bc5
Showing 1 changed file with 18 additions and 1 deletion.
@@ -14,6 +14,18 @@ npm install -g commitizen
#### Using the command line tool
Now, simply use `git cz` instead of `git commit` when committing.

_Alternatively_, if you are using **NPM 5.2+** you can [use `npx`]( instead of installing globally:
npx git-cz
or as an npm script:
"scripts": {
"commit": "npx git-cz"

When you're working in a Commitizen friendly repository, you'll be prompted to fill in any required fields and your commit messages will be formatted according to the standards defined by project maintainers.

[![Add and commit with Commitizen](](
@@ -101,7 +113,12 @@ Installing and running Commitizen locally allows you to make sure that developer

Install Commitizen with `npm install --save-dev commitizen`.

Once you have Commitizen installed as a local dev dependency you can execute `./node_modules/.bin/commitizen` or `./node_modules/.bin/git-cz` in order to actually use the commands.
On **NPM 5.2+** you can [use `npx`]( to initialize the conventional changelog adapter:
npx commitizen init cz-conventional-changelog --save-dev --save-exact

For **previous versions of NPM (< 5.2) ** you can execute `./node_modules/.bin/commitizen` or `./node_modules/.bin/git-cz` in order to actually use the commands.

You can then initialize the conventional changelog adapter using: `./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact`

0 comments on commit d5b8bc5

Please sign in to comment.