@weirdscience/version

1.0.3 • Public • Published

@weirdscience/version - Generate CHANGELOG.md files with AI

This module is designed to automatically generate a changelog for a project by summarizing the differences between commits. It uses the OpenAI API to create human-readable summaries of code changes. The changelog is saved in a Markdown file named after the current version of the project, as specified in the package.json file.

Features

  • Summarizes code changes between commits using OpenAI.
  • Generates a Markdown-formatted changelog.
  • The changelog filename includes the project's current version.

Usage

To generate a changelog, run the script with an optional argument specifying the number of commits to include in the changelog. If no argument is provided, the script defaults to the last commit.

generate-changelog [number_of_commits]

Requirements

  • Node.js
  • An OpenAI API key set in the environment variable `OPENAI_API_KEY`.

Installation

To install this tool for generating changelogs, follow these steps:

  1. Install the package globally:

    You need to have Node.js installed on your system. Then, run the following command to install the package globally:

npm install -g @weirdscience/version

Setting Up Your OpenAI API Key

  1. Obtain an API key from OpenAI.
  2. Set the API key in your environment variables:
export OPENAI_API_KEY='your_api_key_here'

Package Sidebar

Install

npm i @weirdscience/version

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

21.1 kB

Total Files

9

Last publish

Collaborators

  • mikexrmn