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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ai-changelog-generator

v0.3.0

Published

An npm command line tool that generates changelogs in keep-a-changelog format using OpenAI or XAI

Readme

AI Changelog Generator

An npm command line tool that generates changelogs in Keep a Changelog format using AI services (XAI or OpenAI).

Features

  • 🤖 AI-Powered: Uses XAI (default) or OpenAI to generate meaningful changelog entries
  • 📝 Keep a Changelog Format: Generates changelogs following the standard format
  • 🔍 Dry Run Mode: Test the output before writing to files
  • 📁 Flexible Output: Create new files or append to existing changelogs
  • 🔑 Environment Variables: Supports API keys from environment variables
  • Simple CLI: Easy-to-use command line interface with yargs

Installation

npm install -g ai-changelog-generator

Or use locally in your project:

npm install ai-changelog-generator
npx ai-changelog

Usage

Basic Usage

# Generate changelog for version 1.2.0 (uses XAI by default)
ai-changelog -v 1.2.0

# Use OpenAI instead
ai-changelog -v 1.2.0 -p openai

# Dry run - see output without writing to file
ai-changelog -v 1.2.0 -d

# Append to existing changelog
ai-changelog -v 1.2.0 -a

Advanced Usage

# Generate changelog for commits since a specific date
ai-changelog -v 1.2.0 -s "2024-01-01"

# Generate changelog for commits since 1 week ago
ai-changelog -v 1.2.0 -s "1 week ago"

# Specify custom output file
ai-changelog -v 1.2.0 -o MY_CHANGELOG.md

# Provide API key directly
ai-changelog -v 1.2.0 -k your-api-key-here

API Keys

The tool requires API keys for the AI services. You can provide them in two ways:

Environment Variables (Recommended)

For XAI (default):

export XAI_API_KEY="your-xai-api-key"
# or
export X_API_KEY="your-xai-api-key"

For OpenAI:

export OPENAI_API_KEY="your-openai-api-key"

Command Line Option

ai-changelog -v 1.2.0 -k your-api-key-here

Command Line Options

| Option | Alias | Description | Default | |--------|-------|-------------|---------| | --version | -v | Version number for the changelog entry | Required | | --provider | -p | AI provider (xai or openai) | xai | | --api-key | -k | API key for the AI provider | From env vars | | --output | -o | Output file path | CHANGELOG.md | | --dry-run | -d | Print changelog without writing to file | false | | --append | -a | Append to existing changelog | false | | --since | -s | Generate changelog since this date | Last 10 commits | | --help | -h | Show help | |

Example Output

The tool generates changelogs in the standard Keep a Changelog format:

## [1.2.0] - 2024-01-15

### Added
- New user authentication system
- Support for multiple file formats

### Changed
- Improved error handling in API requests
- Updated dependencies to latest versions

### Fixed
- Fixed memory leak in file processing
- Resolved issue with special characters in filenames

### Security
- Enhanced input validation
- Updated authentication tokens

Requirements

  • Node.js >= 14.0.0
  • Git repository (the tool reads git log)
  • API key for XAI or OpenAI

License

MIT © Tantawowa