Coder Social home page Coder Social logo

gpt-commit-rust's Introduction

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.

gpt-commit-rust's People

Contributors

dertyp7214 avatar kesuaheli avatar

Forkers

kesuaheli

gpt-commit-rust's Issues

use of unstable library feature

I cloned built the binary as described int the README steps. But yet I ran in the following error while building (cargo build --release)

...
   Compiling dotenv v0.15.0
   Compiling git2 v0.17.2
   Compiling gpt-commit-rust v0.3.3 (/Users/kesuaheli/repositories/dertyp7214/gpt-commit-rust)
error[E0658]: use of unstable library feature 'path_as_mut_os_str'
   --> src/utils.rs:205:46
    |
205 |             .arg(update_file_path.to_owned().as_mut_os_str())
    |                                              ^^^^^^^^^^^^^
    |
    = note: see issue #105021 <https://github.com/rust-lang/rust/issues/105021> for more information

Currently on macOS Ventura v13.4
referenced issue: rust#105021

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.