Skip to content

cz is a command-line tool for creating consistent, semantic commit messages with an interactive and user-friendly interface.

License

Notifications You must be signed in to change notification settings

rockingrohit9639/cz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cz - Commit Management CLI

cz is a command-line tool that helps developers craft well-structured commit messages. It provides an interactive experience for selecting commit types, scopes, and writing commit messages. The tool aims to make the process of creating consistent, semantic commit messages easier and more user-friendly.

Features

  • Interactive Prompts: Guides the user through a series of prompts to create well-structured commit messages.
  • Commit Types: Support for standard commit types such as feat, fix, docs, style, and more.
  • Scope Selection: Allows users to specify the scope of the commit, such as a module or feature.
  • Commit Message Generation: Generates commit messages based on user input using a customizable template.

Installation

To install cz, you can either clone the repository and build it yourself or use pre-built binaries.

Clone the repository and build

git clone https://github.com/rockingrohit9639/cz.git
cd cz
go build

Pre-built Binaries

Check latest release

Usage

Once installed, you can use cz to create commit messages. Here's an example of how to use the tool:

Commit Command

To start creating a commit message, run:

cz

The tool will guide you through the following prompts:

Commit Type: Select the type of commit (e.g., feat, fix, docs). Scope: Optionally specify the scope of the commit. Message: Write the main commit message. Body: Add an optional body to provide more details about the commit.

type-input

After completing the prompts, you will see a preview of the generated commit message. You can then confirm and proceed with committing the changes.

Undo command

The undo command reverts the last commit while keeping the changes unstaged, allowing you to modify and recommit if needed.

Usage:

cz undo

Add Command

The add command stages all modified, deleted, and new files, preparing them for commit. It's equivalent to running git add .

Usage:

cz add

Contributing

We welcome contributions! Feel free to open issues, submit pull requests, or suggest improvements.

  • Fork the repository
  • Create a new branch (git checkout -b feat/some-feature)
  • Commit your changes (use our cz tool 😄)
  • Push to the branch (git push origin feat/some-feature)
  • Open a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Future Plans

  • Add flags for type, scope, and message to override interactive prompts.
  • Add retry feature for commit creation.
  • Add undo command to revert the last commit.
  • Warn if no changes are staged
  • Add command to stage all changes
  • Support for commit templates.
  • Enhancements to the user interface (e.g., improved color schemes).
  • Preview commit message and only commit after confirmation.
  • Implement .czrc file

About

cz is a command-line tool for creating consistent, semantic commit messages with an interactive and user-friendly interface.

Topics

Resources

License

Stars

Watchers

Forks

Languages