Rustgpt Autocode is a Rust-based tool that leverages the power of OpenAI's language models to automatically modify code in a GitHub repository based on user instructions. This tool is designed to streamline the process of making code changes, especially in collaborative environments.
To use Rustgpt Autocode, you need to have Rust and Cargo installed on your system. You can install Rust and Cargo by following the instructions on the official Rust website.
Clone the repository and navigate to the project directory:
git clone https://github.com/JesusGautamah/rustgpt-autocode.git
cd rustgpt-autocodeInstall the required dependencies:
cargo buildTo run Rustgpt Autocode, you need to set the OPENAI_API_KEY environment variable with your OpenAI API key. You can obtain an API key by signing up on the OpenAI website.
Run the following command to set the environment variable:
export OPENAI_API_KEY=your_openai_api_keyThen, you can run the tool with the following command:
cargo run -- <repository_name> <file_path> <modification_text> [--branch <branch_name>]<repository_name>: The name of the GitHub repository (e.g.,user/repo).<file_path>: The path to the file you want to modify.<modification_text>: The text describing the modification you want to make.[--branch <branch_name>]: (Optional) The branch name to use or create.
Example:
cargo run -- user/repo src/main.rs "Add a new function to calculate the factorial of a number" --branch feature/factorialContributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.