A shepherd for your commits and changelog
Dutchie is a command line utility for Node.js that helps you maintain a simple, standardized format across all of your commit messages. The standard is derived from the excellent Commitizen project.
In addition to providing an easy-to-use CLI for making commits, Dutchie also manages your CHANGELOG.md
file, so you'll never have to worry about creating and maintaining detailed and accurate release notes again.
- Simple, consistent commit message formatting (via Commitizen)
- One command updates your changelog and pushes a new Git tag for every release
- Semantic Version automatically determined based on commit types
- Quick and easy setup, with zero configuration (via NPM scripts)
- Easy-to-use, guided command line interface (via Inquirer)
- Runs on Node.js v8+
Install as a devDependency:
npm install -D dutchie
Add the commit and release scripts to your package.json
file:
{
"name": "my-project",
"version": "0.0.1",
"scripts": {
"commit": "dutchie --commit",
"release": "dutchie --release"
},
}
When you're ready to commit your changes, your workflow will look something like this:
# Stage your changes
git add .
# Run Dutchie's guided commit CLI
npm run commit
# Push your changes
git push
Note: Dutchie doesn't make many assumptions about your Git workflow. Other than handling commit messages and managing your changelog, it tries its best to stay out of your way.
The release
command will automatically create or update your CHANGELOG.md
file, update the version in your package.json
file, create a new Git tag for the version, and push all of the changes upstream.
There are only two requirements for creating a release:
- Have one or more previous commits, ideally using
dutchie --commit
- Have no local changes
Once you're ready to create a release, run:
npm run release
If this is your first release, the CHANGELOG.md
file will be created for you, and the version will be pulled from your package.json
as is.
For subsequent releases, the version will automatically be bumped based on the types of commits since your last release. If any of the commits contain a feature, the release will be a minor bump (e.g. from 1.0.0 to 1.1.0), otherwise, it will be a patch (e.g. from 1.0.0 to 1.0.1).
To force a major release, use the --major
argument:
npm run release -- --major
To add this release to GitHub's "releases" feature, use the --github
argument:
npm run release -- --github
Note: The
--github
argument requires that you have created a GitHub personal access token with access to your repository and configured as an environment variable namedGITHUB_TOKEN
. You must also have a remote origin URL in a similar format togit@github.com:justinsisley/Dutchie.git
. You can check your remote origin URL by runninggit config --get remote.origin.url
.
Dutchie has a few core goals:
- Help software teams maintain a detailed yet simple standard across all of their commit messages
- Help software teams generate a detailed and accurate changelog and release tags for every new version
With these goals in mind, contributions are always welcome.
Run ESLint with npm run lint
.
Run unit tests with npm test
.
The Dutch Shepherd is a relatively uncommon breed of dog that's hard-working, intelligent, and loyal. Often, they're referred to as "Dutchies".
This library aims to do the hard work of intelligently managing your commit messages and changelog without breaking a sweat or complaining. Like the canine, Dutchie aims to be hard-working, intelligent, and loyal.
Absolutely. If Commitizen and its ecosystem of plugins work for you and your team, by all means, use them.
This library aims to strike a balance between simplicity and detail, and to increase the quality of commit messages and changelogs by providing a straightforward CLI that developers can become familiar with very rapidly.