changemylog
v1.0.0
Published
CLI tool to generate changelogs from git commits using OpenRouter AI
Downloads
6
Readme
changemylog
CLI tool to automatically generate changelogs from git commits using OpenRouter AI.
Installation
npm installUsage
npx changemylog --file CHANGELOG.md --openRouterApiKey YOUR_API_KEYOptions
--file <path>(required): Path to the changelog file (e.g., CHANGELOG.md)--openRouterApiKey <key>(required): Your OpenRouter API key--model <model>(optional): OpenRouter model to use (default: anthropic/claude-3.5-sonnet)--autoCommit(optional): Automatically commit the changelog after generation (default: false)
Examples
Basic usage:
npx changemylog --file CHANGELOG.md --openRouterApiKey as9d8a9s8d90sad0asdWith auto-commit:
npx changemylog --file CHANGELOG.md --openRouterApiKey as9d8a9s8d90sad0asd --autoCommitHow it works
- The tool reads your git commit history
- On first run, it analyzes all commits
- On subsequent runs, it only analyzes new commits since the last run
- Commits are sent to OpenRouter AI to generate a standardized changelog
- The changelog is updated with the new entries
- The last processed commit hash is stored in the changelog file for tracking
Features
- Creates changelog file if it doesn't exist
- Tracks last processed commit to avoid duplicates
- Ignores changelog commits to prevent infinite loops
- Generates categorized, standardized changelogs using AI
- Supports custom OpenRouter models
- Adds timestamps to each changelog entry
- Auto-commit option with conventional commit format (docs(changelog): update changelog)
