gitzyπͺ
Interactive conventional commitsconventional-commits cli, inspired by git-czgit-cz with the ability to leverage commitlint configuration, configuration validation, versatile configuration and more.
!actionsactions-badge !versionversion-badgepackage !downloadsdownloads-badgenpmtrends !Licenselicense-badgelicense !semantic-releasesemantic-release-badgesemantic-release !code style: prettierprettier-badgeprettier !Code Coveragecoverage-badgecoverage
Table of Contents
Usage
The current version of gitzy
is fully supported on active LTS versions of nodenode-lts-versions, and requires at least node v18.
Quick start
```sh-session $ npx gitzy## Getting Started
<!-- usage -->
```sh-session
$ npm install -g gitzy
$ gitzy
$ gitzy -p -a
$ gitzy -m "added cool new feature" -t "feat" -s "amazing"
$ gitzy -lD --no-emoji
Configuration
By default gitzy
comes ready to run out of the box but provides various configuration methods and optionsYou can use a
gitzy
object in your package.json
, or the following files: .gitzyrc
, .gitzyrc.json
, .gitzyrc.yaml
, .gitzyrc.yml
, .gitzyrc.js
, .gitzyrc.cjs
, gitzy.config.js
, gitzy.config.cjs
, .gitzyrc.mjs
, or gitzy.config.mjs
.- all the files can also live under a
.config/
directory
Options
- breakingChangeEmoji
- closedIssueEmoji
- issuesHint
- issuesPrefix
- disableEmoji
- details
- headerMaxLength
- headerMinLength
- questions
- scopes
- types
- useCommitlintConfig
breakingChangeEmoji
feat: β¨ dope new feature
BREAKING CHANGE: π₯ breaks stuff
breakingChangeEmoji: "π₯"
closedIssueEmoji
fix: π resolved nasty bug
π Closes: #123
closedIssueEmoji: "π"
issuesHint
Allows you to customize theissues
prompt hintissuesHint: #123
issuesPrefix
Allows you to choose theissuesPrefix
based on Github supported keywords.issuesPrefix: closes # must be one of close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
disableEmoji
Disable all emojis, overridesbreakingChangeEmoji
, closedIssueEmoji
and emoji
optionsdisableEmoji: false
details
Allows you to further configure cli and git message output based ontype
.
Default emojis follow standards set by gitmojigitmojidetails:
chore:
description: Other changes that don't modify src or test files
emoji: "π€"
ci:
description: Changes to CI configuration files and scripts
emoji: "π·"
docs:
description: Add or update documentation.
emoji: "π"
feat:
description: A new feature
emoji: "β¨"
fix:
description: Fix a bug.
emoji: "π"
perf:
description: Improve performance.
emoji: "β‘οΈ"
refactor:
description: Refactor code.
emoji: "β»οΈ"
release:
description: Deploy stuff.
emoji: "π"
revert:
description: Revert changes.
emoji: "βͺ"
style:
description: Improve structure / format of the code.
emoji: "π¨"
test:
description: Add or update tests.
emoji: "β
"
headerMaxLength
headerMaxLength: 64
headerMinLength
headerMinLength: 3
questions
Allows you to toggle questions.questions:
- type # Choose the type
- scope # Choose the scope
- subject # Add a short description
- body # Add a longer description
- breaking # Add a short description
- issues # Add issues this commit closes, e.g #123
scope
question will not be turned if there's no scopesscopes
Allows you to provide list ofscopes
to choose from.scopes: []
Will enable
scope
question if scopes are provided.types
Allows you to provide list oftypes
to choose from. Can be further configured through Details
.types:
- chore
- docs
- feat
- fix
- refactor
- test
- style
- ci
- perf
- revert
- release
useCommitlintConfig
Will leverage Commitlint's configuration instead for these options:types
correlates torules[type-enum][2]
scopes
correlates torules[scope-enum][2]
headerMaxLength
correlates torules[header-max-length][2]
headerMinLength
correlates torules[header-min-length][2]
useCommitlintConfig: false
Flags
| flag | alias | description |
| --------------- | ----- | ---------------------------------------------------------------- |
| --breaking
| -b
| skip "breaking" question and provide your own "breaking" message |
| --body
| -d
| skip "body" question and provide your own "body" message |
| --help
| -h
| display help for command |
| --issues
| -i
| skip "issues" question and provide your own "issue" message |
| --subject
| -m
| skip "subject" question and provide your own "subject" message |
| --passthrough
| -p
| subsequent command line args passed through to git
|
| --scope
| -s
| skip "scope" question and provide your own "scope" message |
| --type
| -t
| skip "type" question and provide your own "type" message |
| --dry-run
| -D
| output the git message but do not commit |
| --version
| -v
| output the version number |
| --commitlint
| -l
| leverage commitlint's configuration |
| --skip
| -S
| skip questions |
| --no-emoji
| | disable all emojis |
| --retry
| -r
| retries previous commit, skips all prompts |