Skip to content

DerTyp7214/gpt-commit-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpt-commit-rust

gpt-commit-rust is a command-line tool that leverages GPT-3 to generate commit messages for your Git repository. It provides an interactive interface to compose and execute Git commands conveniently.

Installation (source)

  1. Make sure you have Rust and Cargo installed on your system.
  2. Clone the repository: git clone https://github.com/DerTyp7214/gpt-commit-rust.git
  3. Navigate to the project directory: cd gpt-commit-rust
  4. Build the project: cargo build --release
  5. The binary will be generated in the target/release directory.

Installation (binary)

  1. Download the latest release from the releases page
  2. Move the binary to a directory in your PATH environment variable
  3. Make the binary executable: chmod +x gpt-commit-rust

Usage

Usage: gpt-commit-rust [optional:option] [optional:files]

Options:
--help, -h: Shows the help message.
--version, -v: Shows the current version of the program.
--update, -u: Updates the program to the latest version.
--force-update, -f: Forces the update to the latest version.
--init, -i: Initializes a README.md file in the current directory based on the content of the given files.
--no-ai, -n: Commits the changes without using GPT-3.
--push, -p: Pushes the changes to the remote repository after running the commands.
--api-key: Sets the API key to use for GPT-3. You can also set the API key in the .env file.
--clear-api-key: Clears the API key from the config file.

Getting Started

  1. Run gpt-commit-rust in your Git repository's directory.
  2. Use the interactive interface to compose your commit message.
  3. Confirm the generated commands.
  4. Optionally, use the --push option to push the changes to the remote repository.

Examples

  1. Generate commit commands without pushing changes:

    gpt-commit-rust
  2. Generate commit commands and push changes:

    gpt-commit-rust --push
  3. Set the GPT-3 API key:

    gpt-commit-rust --api-key YOUR_API_KEY
  4. Clear the GPT-3 API key:

    gpt-commit-rust --clear-api-key

Contribution

Thank you for your interest in contributing to gpt-commit-rust! Contributions are always welcome. To contribute, please follow these steps:

  1. Fork the repository on GitHub.
  2. Clone your forked repository to your local machine.
  3. Create a new branch from the master branch: git checkout -b feature/my-new-feature.
  4. Make your desired changes to the codebase.
  5. Test your changes to ensure they work as expected.
  6. Commit your changes with descriptive commit messages.
  7. Push your changes to your forked repository.
  8. Create a pull request from your branch to the master branch of the original repository.
  9. Provide a clear and concise description of your changes in the pull request.
  10. Be responsive to any feedback or questions related to your contribution.

Thank you for your contribution in advance!

License

This project is licensed under the MIT License.

Acknowledgements

This tool was built using the following libraries:

Special thanks to the OpenAI team for their GPT-3 model.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages