gh-gpt

Crates.iogh-gpt
lib.rsgh-gpt
version0.1.1
sourcesrc
created_at2023-05-12 11:59:10.555961
updated_at2023-05-12 15:18:57.215809
descriptionGithub ChatGPT powered bot.
homepagehttps://github.com/abdelhamidbakhta/gh-gpt
repositoryhttps://github.com/abdelhamidbakhta/gh-gpt
max_upload_size
id862920
size80,806
Abdel @ StarkWare (AbdelStark)

documentation

README

gh-gpt

Github AI-powered bot 🤖.

GitHub Workflow Status Project license Pull Requests welcome

gh-gpt is a Rust-based command line tool that uses the power of ChatGPT to automate tasks on Github. With gh-gpt, you can automatically add relevant labels to a Github issue, among other tasks.

gh-gpt banner

Table of Contents

Installation

gh-gpt requires a recent version of Rust. You can install Rust through the rustup toolchain installer here.

Once Rust is installed, you can install gh-gpt using Cargo:

cargo install gh-gpt

Configuration

gh-gpt uses dotenv to automatically load environment variables from a .env file. You can also set these variables manually in your environment. Here is an example of the configuration variables used:

# Github
GH_GPT_GITHUB_TOKEN="..."
GH_GPT_OPENAI_API_KEY="..."

# OpenAI
GH_GPT_CHATGPT_MODEL="gpt-4"
GH_GPT_CHATGPT_MAX_TOKENS="4096"

Replace the "..." with your actual tokens and preferences.

Usage

gh-gpt currently supports the following commands:

  • labelize - Automatically add relevant labels to a Github issue.
  • help - Print help message or the help of the given subcommand(s).

You can view help for the CLI tool with:

    gh-gpt help

Labelize

To automatically add relevant labels to a Github issue, use the labelize command:

gh-gpt labelize [repo_owner] [repo_name] [issue_number]

For example, to labelize issue #1 of keep-starknet-strange/madara you would run:

RUST_LOG=info gh-gpt labelize keep-starknet-strange madara 1

Contributing

Contributions to gh-gpt are welcomed! Feel free to submit a pull request or create an issue.

License

gh-gpt is licensed under the MIT License.

Commit count: 14

cargo fmt