Skip to content

GitLexJS: An intelligent commit message generator using OpenAI. Simplify your Git workflow by auto-generating meaningful commit messages based on your code changes.

License

Notifications You must be signed in to change notification settings

krjordan/GitLexJS

Repository files navigation

npm version

GitLexJS 🚀✨

GitLexJS is a command-line tool that uses the power of AI to generate meaningful commit messages for your Git changes. Leveraging OpenAI's GPT models, GitLexJS analyzes your code diffs and crafts commit messages that accurately reflect the changes you've made. Say goodbye to the struggle of coming up with commit messages and let GitLexJS do the work for you! 🎉

Table of Contents

Prerequisites

Ensure you have Node.js and npm installed. If not, download and install them from Node.js's official site.

Important: You will also need an OpenAI API key. See API Key Configuration below.

Installation 📦

Install GitLexJS globally:

npm install -g gitlexjs

Usage 🚀

GitLexJS uses an interactive menu for user input.

To start the tool, simply run:

gitlex

You will be presented with a list of options:

  • Generate a commit message
  • Set API Key
  • Replace API Key
  • Delete my API Key
  • Check if API key is set
  • Select OpenAI model
  • Show version
  • Exit

Select the option you want by using the arrow keys and pressing Enter.

Note: The tool will prompt you for the OpenAI API key if it's not found in the configuration file. Your API key will be stored locally in the .gitlex-config.json file.

API Key Configuration 🔑

For GitLexJS to work, you'll need an OpenAI API key:

  1. Sign up for an API key with OpenAI.
  2. Run GitLexJS and select the appropriate option from the interactive menu to set, replace, or delete your API key. The key is then stored locally and securely in .gitlex_config.json.

⚠️ Note: Never share your API key or commit it directly to your codebase.

Roadmap 🗺️✨

Join us in refining your commit messages. Look into our future plans in the ROADMAP.md file. Feedback, contributions, and suggestions are always welcome!

Development Workflow 🛠

For contributors, we follow the gitflow workflow:

  • Develop: Our main development branch.
  • Release: For final testing before a release.
  • Main: Stable releases are merged here.

Local Development Setup:

  1. Clone the repository:
git clone https://github.com/krjordan/GitLexJS.git
cd GitLexJS
  1. Install dependencies:
npm install

Running the Application:

To run the application locally, use the following command:

npm start

Building the Application:

To build the application, use the following command:

npm run build

Linting:

To run the linter, use the following command:

npm run lint

Testing:

To run tests, use the following command:

npm run test

Contributing 🤝

Your contributions are eagerly awaited! From bug reports, feature requests to new ideas – share them all. Dive into the CONTRIBUTING.md file for guidance.

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Raise a pull request detailing your additions.

License 📄

GitLexJS is open-sourced under the MIT License. Dive into the LICENSE.md for all the specifics.

About

GitLexJS: An intelligent commit message generator using OpenAI. Simplify your Git workflow by auto-generating meaningful commit messages based on your code changes.

Resources

License

Code of conduct

Stars

Watchers

Forks