Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andostronaut/commitizen-cli
Command-line interface tool that helps enforce standardized commit message formats in Git repositories.
https://github.com/andostronaut/commitizen-cli
cli command-line command-line-tool git git-commit process simple standard
Last synced: 15 days ago
JSON representation
Command-line interface tool that helps enforce standardized commit message formats in Git repositories.
- Host: GitHub
- URL: https://github.com/andostronaut/commitizen-cli
- Owner: andostronaut
- License: mit
- Created: 2023-05-30T08:23:11.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-09T06:39:01.000Z (about 1 year ago)
- Last Synced: 2024-10-03T18:46:05.353Z (about 1 month ago)
- Topics: cli, command-line, command-line-tool, git, git-commit, process, simple, standard
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/commitizen-cli
- Size: 11.9 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![build](https://github.com/iamando/commitizen-cli/workflows/build/badge.svg)
![license](https://img.shields.io/github/license/iamando/commitizen-cli?color=success)
![npm](https://img.shields.io/npm/v/commitizen-cli)![Demo](./demo.gif)
Command-line interface tool that helps enforce standardized commit message formats in Git repositories.
## Features
- **Standardized Commit Messages**: Enforce consistent commit message structure by guiding users through prompts and validating against specified formats.
- **Conventional Commit Support**: Easily generate commit messages following popular commit conventions like Conventional Commits.
- **User-Friendly Interface**: Interactive prompt-based interface for creating compliant commit messages without worrying about format details.
- **Integration with Git**: Seamlessly commit changes directly from the CLI, ensuring compliance with the chosen commit message convention.
- **Emoji Support**: Add emojis to your commit messages to express the nature of the changes or provide additional context.
- **Ticket Support**: Set ticket reference to your commit messages to link directly the changes with your task.
- **Specific Pattern**: Commit pattern is flexible and customisable to provide a better commit message convention.
- **Configuration Support**: Get or Set specific configuration like pattern config.## Installation
To install commitizen-cli, use:
```shell
npm install -g commitizen-cli
```or if you don't like to install it globaly, use:
```shell
npx commitizen-cli
```## Usage
Navigate to your Git repository.
Run the following command:
```shell
commitizen-cli
```## Updating from a Previous Version
If you have previously installed a version that is older than 3.0.0, it's important to follow these steps to ensure a smooth update process. The new version introduces significant changes that might conflict with remnants of the old installation.
It's recommended to use the clean command to remove any residual configurations that might still be present. Run the following command:
```shell
commitizen-cli clean
```## Commands
### Update Command
The update command allows you to synchronize your local package with the latest changes from the package's repository. To update your package, run:
```shell
commitizen-cli update
```This command will fetch the latest updates and apply them to your local package installation. Staying up to date ensures that you have access to new features, bug fixes, and enhancements provided by the package maintainers.
### Config Command
The config command is used to configure various settings for your package. It supports both get and set modes.
Get Mode
To retrieve configuration values, use the get mode:
```shell
commitizen-cli config get
```This command will display the current value associated with the specified configuration key.
Set Mode
To update configuration values, use the set mode:
```shell
commitizen-cli config set =
```### Clean Command
The clean command allows you to reset the configuration settings. This command will clear all configurations inside the configuration file generated by the package. To reset the configuration, execute:
```shell
commitizen-cli clean
```Please be cautious when using this command, as it will reset all configuration settings. This action is irreversible.
## Configuration
List of type available:
- feature โจ
- bugfix ๐
- hotfix ๐
- chore ๐ ๏ธ
- epic ๐
- design ๐จ
- experiment ๐งช
- documentation ๐Pattern is defined like this: ``(``): ``
- ``: Type of commit (feature, bugfix, documentation, ...)
- ``: Reference of ticket (if ticket is defined)
- ``: Commit messageExample: design(XXX-000): implement responsive design
But `` is an optional pattern, you can set it to false on prompt and the default pattern is like this: ``: ``
Example: feature: implement new chat system on the frontend
And `` is an optional pattern too, if you like to make your commit cool you can check the use emoji prompt and define custom pattern with ``,
like this:- if you have `` reference: `` ``(``): ``: ๐ documention(XXX-000): creating new docs on the package
- or not: `` ``: ``: ๐ documention: creating new docs on the packageGet or Set configuration directly to save specific config, use:
```shell
commitizen-cli config get PATTERN
``````shell
commitizen-cli config set PATTERN='specific pattern'
```### Update
To update to the latest version, use:
```shell
commitizen-cli update
```Follow the prompts to generate a standardized commit message.
The CLI will execute the Git command to commit your changes with the generated message.
## Support
Commitizen CLI is an MIT-licensed open source project. It can grow thanks to the sponsors and support.
## License
Commitizen CLI is [MIT licensed](LICENSE).