Skip to content

Hayden-Liles/autocommit

Repository files navigation

AutoCommit - VS Code Extension

AutoCommit is a VS Code extension that automatically generates and commits descriptive and meaningful commit messages based on your changes. It uses the power of GPT-4 by OpenAI to understand your code changes and generates a commit message that follows the Conventional Commit standards.

Features

  • Automatically generates commit messages based on your changes. (Uses gpt 3.5 - 4 was unessicary and more expensive)
  • Commits each changed file separately with a relevant commit message. (The Prompt is 316 Tokens OR $0.000474)
  • Avoids committing files specified in .gitignore.
  • Optionally pushes changes to the remote repository automatically. (Can be changed in settings DEFAULT: true)

RATE LIMITS FOR FREE VERSION

When you see this, this is due to openAI
Error Code 429 - Rate limit reached for requests
I reccomend getting the "Pay as you go" version I made this so that 10,000 commits will cost about $4.50 Error

Setup

STEP 1

Step 2

  • Sign up OR Login

    Step2

Step 3

  • Click on your profile image. Cick "View API keys"

    Step3

Step 4

  • Click "Create new secret key"

    Step4

Step 5

  • Name your key.

    Step5

Step 6

  • Copy your key.

    Step6

Step 7

  • Open Vscode settings (ctrl + ,)
  • Go to Extensions -> goto AutoCommit
  • Paste your Key

    Step7

Usage

After installing and setting up the extension, navigate to your source control and you will see a green button
Click it and you are done.
Usage 1 Usage 3 Usage 2

This command will:

  • Find all changed and new files in your workspace.
  • Generate a commit message for each file based on its changes.
  • Commit each file separately with its generated commit message.
  • If autoSync is enabled, it will push the changes to the remote repository.

## License MIT

This README.md provides the necessary information for users to understand what the extension does, how to set it up, and how to use it. You can always expand it and add more sections such as a FAQ or Known Issues, if needed.