@phaktor/whatchanged
v1.0.14
Published
AI-powered changelog generator from git commits
Downloads
778
Maintainers
Readme
whatchanged
AI-powered changelog generator from git commits
Features
- 🤖 AI-Powered: Generate professional changelogs using OpenAI, Anthropic, or OpenRouter
- 📊 Smart Parsing: Classifies commits into categories (Added, Changed, Fixed, etc.)
- 🔍 Git Integration: Reads commits, diffs, and changed files directly from git
- 💾 Multiple Outputs: Keep a Changelog, Conventional Commits, or raw format
- 🔄 Fallback Mode: Works without AI using conventional commit parsing
- 🎨 Beautiful CLI: Interactive prompts with ASCII art
Installation
npm install -g whatchangedOr run directly with npx:
npx whatchanged init
npx whatchanged generateQuick Start
- Initialize configuration:
whatchanged init- Generate changelog:
# Basic (last commit)
whatchanged generate
# From version to version
whatchanged generate --from v1.0.0 --to v1.1.0
# With context
whatchanged generate --context "Breaking: new API design"Commands
init
Initialize whatchanged configuration (AI provider, model, etc.)
generate
Generate changelog from git commits
| Option | Description |
|--------|-------------|
| --from <tag> | Start from a specific tag or commit |
| --to <tag> | End at a specific tag or commit (default: HEAD) |
| --base <branch> | Base branch for comparison |
| --head <branch> | Head branch for comparison |
| --max-commits <n> | Maximum commits to analyze (default: 50) |
| --context <text> | Additional context for AI |
| --output <file> | Write to specific file |
| --stdout | Output to stdout only |
| --release | Generate release changelog |
| --skip-ai | Skip AI, use fallback parser |
| --format | Output format: keepachangelog, conventional, free |
config
Manage configuration
whatchanged config --viewConfiguration
Config is saved to:
- Project:
.wchanged.jsonin your project root - Global:
~/.config/whatchanged/config.json
Supported providers:
- OpenAI: GPT-4.1, GPT-4.1 Turbo, GPT-4.1 Mini
- Anthropic: Claude Sonnet 4, Claude Opus 4, Claude Haiku 4
- OpenRouter: Multiple providers (Claude, Gemini, GLM, etc.)
Examples
# Analyze commits between versions
whatchanged generate --from v1.0.0 --to v1.2.0
# Compare branches
whatchanged generate --base main --head feature-auth
# Skip AI (uses conventional commit parsing)
whatchanged generate --skip-ai
# Output to file
whatchanged generate --output CHANGELOG.md
# Silent mode (good for CI)
whatchanged generate --stdout --skip-ai > CHANGELOG.mdHow It Works
- Collect: Reads git commits, diffs, and changed files
- Parse: Classifies commits by type (feat, fix, refactor, etc.)
- Generate: Sends structured data to AI with context
- Format: Outputs in Keep a Changelog format by default
License
MIT
