New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ryan-commit-gpt

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ryan-commit-gpt

Automatically generate commit messages using ChatGPT.

  • 1.0.5
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

commitgpt

Automatically generate commit messages using ChatGPT.

commitgpt

How to use?

npx commitgpt

or use -c for conventional commits format.

npx commitgpt -c

Getting Your OpenAI API Key and Setting the Environment Variable

  1. Sign up for an OpenAI account and log in to the OpenAI dashboard: https://beta.openai.com/signup
  2. Generate a new API key by clicking on the "API Keys" tab and then clicking on the "Create API Key" button.
  3. Copy the API key to your clipboard.
  4. Open a terminal or command prompt and set the environment variable with the API key using the following command (replace "YOUR_API_KEY" with the actual API key you copied in step 3):
export OPENAI_API_KEY="YOUR_API_KEY"
  1. Verify that the environment variable has been set correctly by running the following command:
echo $OPENAI_API_KEY

This should print the value of the OPENAI_API_KEY environment variable, which should be the API key you set in step 4.

Note: The steps to set environment variables may differ based on your operating system. For more information, you can refer to the documentation for your specific operating system.

How it works

  • Runs git diff --cached
  • Sends the diff to ChatGPT and asks it to suggest commit messages
  • Shows suggestions to the user

Credits

Some code and approaches were inspired by the awesome projects below:


Do you need API docs? Check out Redocly.

FAQs

Package last updated on 18 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc