Code Monkey home page Code Monkey logo

conventional-commit-cli's Introduction

Git Conventional Commits CLI

Generate conventional commit messages from the command line.

I liked using conventional commits extension on VS Code and wanted to have a similar experience on the terminal.

This CLI is inspired by the Conventional Commits specification.

Installation

Make sure you have node.js installed on your system. You can download it from here.

Run the following command to install the CLI globally.

npm i c-commit-cli -g

You can now run commit from any directory.

Usage

Make sure to stage your changes before running the command.
The goal of the CLI is to help you generate conventional commit messages and not manage your git workflow.

Run commit to initiate the commit process.

What type of commit are you making?

The first prompt is about the type of commit you are making. Following are the options you can pick from.

Select commit type

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

To be added in the future

  • wip: Work in progress
  • release: Release a new version
  • deps: Update dependencies
  • security: Fix security issues
  • breaking: Introduce breaking changes

Select a Gitmoji

The second prompt is about selecting a Gitmoji. Gitmoji is an emoji guide for your commit messages. You can find more about it here.

Select Gitmoji

If you don't want "Type" or "Gitmoji", you can skip them.

Commit message and details

You will be prompted to enter a commit message and an optional detailed description of the changes you made.

Commit message and details

If you want to add a detailed description, you will be taken to your default editor to write the description. The changes made and saved in the editor will reflect in the terminal once you close the editor.

Commit message preview

On the final stage you will get a preview of the commit message. You can either confirm the message or go back to make changes.

Commit message preview

Feedback

Feel free to open an issue if you have any feedback or suggestions. I would love to hear from you.

If you want to contribute, please open a pull request.

conventional-commit-cli's People

Contributors

paari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.