Skip to content

0xble/commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit

commit

Generate commit messages using GPT-3 based on your changes and commit history.

Install

You need Rust and Cargo installed on your machine. See the installation guide here.

Then clone the repo and install the CLI globally like this:

cargo install --path .

Usage

commit uses GPT-3. To use it, you'll need to grab an API key from your dashboard, and save it to OPENAI_API_KEY as follows (you can also save it in your bash/zsh profile for persistance between sessions).

export OPENAI_API_KEY='sk-XXXXXXXX'

Once you have configured your environment, run commit in any Git repository with staged changes.

To get a full overview of all available options, run commit --help

$ commit --help
Generate commit messages using GPT-3 based on your changes and commit history.

Usage: commit [OPTIONS] [FILES]...

Arguments:
  [FILES]...  Files to stage and commit

Options:
  -c, --commits <COMMITS>        Number of commits in history to use generating message [default: 50]
  -t, --max-tokens <MAX_TOKENS>  Maximum number of tokens to use generating message [default: 2000]
      --copy                     Copy the commit message to clipboard instead of committing
      --no-commit                Don't commit, just print the commit message to stdout
  -y, --yes                      Answert "Yes" to prompts
  -h, --help                     Print help information
  -V, --version                  Print version information

About

Generate commit messages using GPT3 based on your changes and commit history.

Resources

License

Stars

Watchers

Forks

Languages