@weirdscience/version
v1.0.3
Published
A utility for generating human-readable changelogs from git commit differences using OpenAI's GPT model.
Downloads
11
Maintainers
Readme
@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:
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
- Obtain an API key from OpenAI.
- Set the API key in your environment variables:
export OPENAI_API_KEY='your_api_key_here'