npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

diffscribe

v0.2.4

Published

An intelligent CLI tool designed to automatically generate meaningful commit messages using Git diffstat, status, and insights from OpenAI and you

Downloads

72

Readme

diffscribe

diffscribe is an intelligent CLI tool designed to automatically generate meaningful commit messages using Git diffstat, status, and insights from OpenAI and you.

Please note that this project is in its beta version and may undergo significant changes.

npm package Dependencies License

Features:

  • Smart Analysis: Evaluates Git status and Git diffstat to identify essential changes.
  • Security: Your code stays with you – no sharing with OpenAI.
  • User Interaction: Engages with you to refine its interpretations.
  • OpenAI Power: Uses the OpenAI API to create concise, descriptive commit messages.
  • Customizable: Offers customization options like model type, temperature, and commit message length.

Prerequisites:

  • Node.js >=18.17.0.
  • Git >=2.
  • An OpenAI API key. You can get one here.
  • .env file with OPENAI_API_KEY set to your OpenAI API key.

Installation:

You can install the tool locally or globally.

npm i -g diffscribe
# or for local usage
npm i -D diffscribe

The package has peer dependencies on openai to use the OpenAI API and dotenv to load the .env file.

npm i -g openai dotenv
# or for local usage
npm i -D openai dotenv

Usage:

  1. Make sure you have staged your changes in Git (git add .).
  2. Run diffscribe:
npx diffscribe [--model=<model_name>] [--modelTemperature=<temperature_value>] [--commitLength=<length>]

Options:

  • --model: The OpenAI model to use. Supported models are gpt-4 and gpt-3.5-turbo. The default is gpt-4.
  • --modelTemperature: The temperature setting for the OpenAI model. The default is 0.05. Use it to control the randomness of the generated commit message. It should be between 0 and 2.
  • --commitLength: The maximum length of the generated commit message. It should be between 50 and 500 characters. The default is 50. It is not an actual limit but rather a guideline to the model.

Example:

npx diffscribe

It seems like you've made a lot of changes, including adding a new package 'diffscribe', modifying several package.json files, and updating documentation. Could you please clarify what you're trying to achieve with this commit?

Answer: I added a new package named `diffscribe`. Rewrite readme and improve documentation for all public packages. Rewrite TSDoc in `@neshca/json-replacer-reviver` package

Based on the information provided, the commit message could be: "Add diffscribe package and improve documentation".

What happened behind the scenes:

  • diffscribe will run git status --renames and git diff --cached --stat to get the branch name, list of changed files, and the number of changes in each file. It does not look inside the files.
  • This information is sent to OpenAI's API, along with the context and guidelines for the GPT model.
  • GPT will try to understand the changes and prompt the user to confirm its understanding.
  • GPT will generate a commit message if the user confirms the understanding.

Notes:

  • Ensure you have the .env file in the same directory from which you are running diffscribe.
  • If you encounter errors related to model selection, temperature, or commit length, please check the passed arguments for validity.

Developing and contributing

Developing and contributing diffscribe

License:

MIT