1.0.16 • Published 12 months ago

@felipemantilla01/commit v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@felipemantilla01/commit

Description

@felipemantilla01/commit is a tool that facilitates the generation of commit messages using AI to analyze file changes and generate concise and well-structured commit messages. It is designed for developers who want to improve the quality of their commit messages and streamline the commit process.

Demo

Installation

To install the package globally, use the following command:

npm install -g @felipemantilla01/commit

Usage

Initial Setup

Before using the tool, you need to perform an initial setup to specify the AI provider and the API token:

commit --setup

This command will start an interactive prompt asking for the following information:

  1. AI Provider: Currently, only Anthropic is supported.
  2. API Token: Enter your API token for the selected AI provider.
  3. Commit Types: Select the commit types you want to use or add custom types.

The configuration will be saved in a file named commit-config.json in the current directory.

Generate Commit Messages

To generate a commit message based on the staged files and the current diff, simply run:

commit

The command will perform the following actions:

  1. Read the staged files and get the diff.
  2. Read the content of the staged files.
  3. Generate a commit message using AI.
  4. Display the generated commit message and ask for confirmation before committing.

Sign Commits with GPG

If you want to sign your commits with GPG, you can use the -S or --gpg-sign option:

commit -S

Command Line Options

  • --setup: Run the initial setup to specify the AI provider, API token, and commit types.
  • -S, --gpg-sign: Sign commits with GPG.

Example

  1. Run the initial setup:

    commit --setup
  2. Generate a commit message and commit:

    commit
  3. Generate a commit message and sign the commit with GPG:

    commit -S

Contributing

Contributions are welcome. If you find an issue or have a suggestion, please open an issue in the GitHub repository.

License

This project is licensed under the MIT License.


Thank you for using @felipemantilla01/commit!

1.0.16

12 months ago

1.0.15

12 months ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.11

12 months ago

1.0.10

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.0

12 months ago