New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

changelog-gen-ai

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

changelog-gen-ai

AI-powered changelog generator for GitHub and GitLab repositories

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

changelog-gen

AI-powered changelog generator for GitHub and GitLab repositories. Analyzes git commits and uses OpenAI to generate well-formatted changelogs following the Keep a Changelog specification.

Features

  • Analyzes git commits and diffs to understand changes
  • Uses AI to categorize and summarize changes (Added, Changed, Fixed, etc.)
  • Supports multiple version tracking methods (tags, changelog parsing, manual)
  • Works with any OpenAI-compatible API (OpenAI, Azure, local models)
  • Easy integration with GitHub Actions and GitLab CI
  • Configurable via YAML config file

Installation

# Install globally
npm install -g changelog-gen

# Or use directly with npx
npx changelog-gen generate

Quick Start

  • Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key"
  • Generate a changelog:
# Generate changelog from the latest tag to HEAD
changelog-gen generate --from latest-tag

# Preview without writing (dry run)
changelog-gen generate --from latest-tag --dry-run

# Specify a version
changelog-gen generate --from v1.0.0 --version 1.1.0

Configuration

Create a .changelogrc.yaml file in your project root:

# Output file path
output: CHANGELOG.md

# OpenAI-compatible API endpoint
openaiUrl: https://api.openai.com/v1

# Model to use
model: gpt-4o-mini

# Version detection method: tags | changelog | manual
versionSource: tags

# Include commit links
includeCommitLinks: true

# Patterns to exclude
excludePatterns:
  - "chore(deps):"
  - "Merge branch"

Generate a default config file:

changelog-gen init

CLI Options

changelog-gen generate

Generate changelog entries from git commits.

OptionDescriptionDefault
-f, --from <ref>Starting point (tag, SHA, or "latest-tag")Auto-detected
-t, --to <ref>End pointHEAD
-o, --output <file>Output file pathCHANGELOG.md
-u, --openai-url <url>OpenAI API endpointhttps://api.openai.com/v1
-k, --api-key <key>OpenAI API keyOPENAI_API_KEY env
-m, --model <model>Model to usegpt-4o-mini
-v, --version <version>Version stringAuto-incremented
-c, --config <file>Config file path.changelogrc.yaml
-d, --dry-runPreview without writingfalse

changelog-gen init

Create a default configuration file.

OptionDescription
-f, --forceOverwrite existing config file

CI/CD Integration

GitHub Actions

- name: Generate Changelog
  env:
    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  run: npx changelog-gen generate --from latest-tag

See examples/github-action.yml for a complete workflow.

GitLab CI

changelog:
  image: node:20
  script:
    - npx changelog-gen generate --from latest-tag
  variables:
    GIT_DEPTH: 0

See examples/gitlab-ci.yml for complete examples.

Using with Local AI Models

changelog-gen works with any OpenAI-compatible API. To use with local models:

Ollama

# Start Ollama with an appropriate model
ollama run llama3.1

# Use with changelog-gen
changelog-gen generate --openai-url http://localhost:11434/v1 --model llama3.1

LM Studio

# Start LM Studio server, then:
changelog-gen generate --openai-url http://localhost:1234/v1 --model local-model

Output Format

Generated changelogs follow the Keep a Changelog format:

# Changelog

All notable changes to this project will be documented in this file.

## [1.1.0] - 2024-01-15

### Added

- User authentication with OAuth support
- Dark mode theme option

### Changed

- Improved performance of data loading

### Fixed

- Resolved issue with form validation on mobile devices

Environment Variables

VariableDescription
OPENAI_API_KEYOpenAI API key (required)

License

MIT

Keywords

changelog

FAQs

Package last updated on 13 Jan 2026

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