An open API service indexing awesome lists of open source software.

https://github.com/jannchie/gitcm

An opinionated git commits message helper.
https://github.com/jannchie/gitcm

Last synced: about 1 year ago
JSON representation

An opinionated git commits message helper.

Awesome Lists containing this project

README

          

# gitcm

`gitcm` is an opinionated git commits message helper.

## Usage

```bash
npx @gitcm/cli
```

## Installation

You can choose to install globally so that you can use the `gitcm` or `git-commit` commands. They are equivalent to `npx @gitcm/cli`.

```bash
npm install -g @gitcm/cli
```

## More Examples

For example, you can use the following command:

```bash
gitcm init "init commit"
```

Which will execute the following command:

```bash
git commit -m ":tada: init: init commit"
```

We provide an interactive cli tool.

```bash
$ gitcm
┌ @gitcm/cli - v0.1.4

● Config file found in C:\Users\Jannchie\.config\gitcm\config.json

◇ What is the commit type? (required)
│ ✨ feat

◇ What is the commit scope? (optional)
│ test

◇ What is the commit body? (required)
│ this is a commit message

◇ Your commit command is ─────────────────────────────────────────╮
│ │
│ git commit -m ":sparkles: feat(test): this is a commit message" │
│ │
├───────────────────────────────────────────────────────────────────╯
```

You can also set the type, scope and body with command-line arguments:

```bash
# git commit -m ":sparkles: feat(test): test commit"
gitcm feat test "test commit"

# git commit -m ":sparkles: feat: test commit"
gitcm feat "test commit"
```

We provide an AI-powered commit message generator.

```bash
# Generate a commit message with OpenAI ChatGPT API
gitcm -a
```

You can find help with the following command:

```bash
gitcm --help
```

## Configuration

When you use this command for the first time, it writes the configuration in `~/.config/gitcm/config.json`.

You can change the configuration by editing this file.

## License

MIT