npm package: @lxgicstudios/changelog-gen
Description: Generate changelogs from conventional commit history. Groups by feat/fix/chore, links to commits, supports tag ranges. Zero dependencies.
Author: LXGIC Studios
Latest version: 1.0.0

# @lxgicstudios/changelog-gen

[![npm version](https://img.shields.io/npm/v/@lxgicstudios/changelog-gen)](https://www.npmjs.com/package/@lxgicstudios/changelog-gen)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
[![Zero Dependencies](https://img.shields.io/badge/dependencies-0-blue)](https://www.npmjs.com/package/@lxgicstudios/changelog-gen)

Generate changelogs from your conventional commit history. Groups commits by type (feat, fix, chore, etc.), links to commits, supports tag ranges, and detects breaking changes. Zero dependencies.

## Install

```bash
# Run directly with npx
npx @lxgicstudios/changelog-gen

# Or install globally
npm install -g @lxgicstudios/changelog-gen
```

## Usage

```bash
# Changes since last tag
changelog-gen --unreleased

# Between two specific tags
changelog-gen --from v1.0.0 --to v2.0.0

# Generate a CHANGELOG.md file
changelog-gen --format markdown > CHANGELOG.md

# JSON output for automation
changelog-gen --json
```

## Features

- **Conventional commits** - Parses `type(scope): subject` format automatically
- **Smart grouping** - feat, fix, perf, refactor, docs, test, build, ci, chore, style, revert
- **Breaking changes** - Detects `!` suffix and `BREAKING CHANGE` in commit body
- **Commit links** - Auto-links to GitHub/GitLab commits when remote is detected
- **Tag ranges** - Filter by `--from` and `--to` tags
- **Unreleased mode** - Show everything since the last tag
- **Multiple formats** - Terminal (colorful), Markdown, JSON
- **Zero dependencies** - Just Node.js and git

## Options

| Option | Description |
|--------|-------------|
| `--from <tag>` | Start from this tag (default: latest tag) |
| `--to <tag>` | End at this tag (default: HEAD) |
| `--unreleased` | Show changes since the last tag |
| `--format <type>` | Output format: `terminal` (default) or `markdown` |
| `--title <text>` | Custom changelog title |
| `--json` | Output results as JSON |
| `--help` | Show help message |
| `--version` | Show version number |

## Conventional Commit Types

| Type | Description | Emoji |
|------|-------------|-------|
| `feat` | New feature | 🚀 |
| `fix` | Bug fix | 🐛 |
| `perf` | Performance improvement | ⚡ |
| `refactor` | Code refactoring | ♻️ |
| `docs` | Documentation | 📚 |
| `test` | Tests | 🧪 |
| `build` | Build system | 🏗️ |
| `ci` | CI/CD changes | 🔧 |
| `chore` | Maintenance | 🧹 |
| `style` | Code style | 🎨 |
| `revert` | Reverted change | ⏪ |

## Breaking Changes

Mark breaking changes with `!` after the type:
```
feat!: remove deprecated API endpoints
```

Or include `BREAKING CHANGE:` in the commit body:
```
feat: update authentication flow

BREAKING CHANGE: JWT tokens now expire after 1 hour instead of 24 hours
```

## Requirements

- Node.js >= 18
- Git (accessible in PATH)
- Must be run inside a git repository
- Works best with conventional commit messages

## License

MIT - [LXGIC Studios](https://lxgicstudios.com)