Skip to content

affanmustafa/commitier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commitier

The Rust Programming Language: A language empowering everyone to build reliable and efficient software

Commitier is a command-line tool designed to help developers create consistent and meaningful commit messages. Built with Rust, it provides a structured way to format commit messages and can even create commits directly.

Features

  • Interactive commit message creation
  • Customizable commit message prefixes
  • Option to create Git commits directly
  • View recent commit history

Prerequisites

Before you can use Commitier, you need to have Rust installed on your system. If you haven't installed Rust yet, follow these steps:

  1. Visit https://www.rust-lang.org/tools/install
  2. Follow the instructions for your operating system
  3. After installation, restart your terminal

You can verify your Rust installation by running:

rustc --version

Installation

Currently, Commitier is not packaged for distribution. To use it, you'll need to clone the repository and run it locally:

  1. Clone the repository:

    git clone https://github.com/affanmustafa/commitier.git
    cd commitier
  2. Build the project:

    cargo build --release

Usage

Initializing Commitier

Before first use, initialize Commitier in your project:

cargo run init

This will prompt you to set up your preferred commit message prefixes.

Stage the files

git add .

This will stage all the files in the current directory.

Creating a Commit Message

To generate a commit message:

cargo run commit

This will guide you through selecting a prefix and entering a commit description.

Creating a Git Commit

To generate a commit message and create a Git commit:

cargo run commit --create-commit

Viewing Recent Commits

To view recent commits:

cargo run check-commits

By default, this shows the last 5 commits. You can specify a different number:

cargo run check-commits --count 10

Configuration

Commitier uses a custom field in your project's package.json file to store commit message prefixes. After initialization, your package.json will include:

{
  "commitier-prefixes": [
    "feat:",
    "fix:",
    "docs:",
    "style:",
    "refactor:",
    "test:",
    "chore:"
  ]
}

You can manually edit this list to customize your commit prefixes.

Default Prefixes

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation changes
  • style: - Formatting, missing semi colons, etc; no code change
  • refactor: - Refactoring production code
  • test: - Adding missing tests, refactoring tests; no production code change
  • chore: - Updating grunt tasks etc; no production code change

Future Plans

In the future, Commitier will be packaged as an npm module for easier installation and use.

Author

Affan Mustafa

Acknowledgments

  • Inspired by Commitizen, a tool for creating standardized commit messages
  • Built with Rust

About

Prettier commits with standardized prefixes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages