Generate release notes from git commit history.
# With npm
npm install --save-dev @definitely-not-devs/notegen
# With pnpm
pnpm add -D @definitely-not-devs/notegen
# With yarn
yarn add -D @definitely-not-devs/notegen# With npm
npm install -g @definitely-not-devs/notegen
# With pnpm
pnpm add -g @definitely-not-devs/notegen
# With yarn
yarn global add @definitely-not-devs/notegenWith global installation, use notegen directly without npx.
- Initialize configuration:
npx notegen initThis creates a notegen.json file in your project:
{
"baseUrl": "https://jira.company.com/browse",
"releaseNotes": true,
"output": "CHANGELOG.md"
}- Generate release notes:
npx notegen generate# Generate release notes for all commits
npx notegen generate
# Or add to package.json scripts:
{
"scripts": {
"release-notes": "notegen generate"
}
}
# Then run:
pnpm release-notes# Specify output file
npx notegen generate -o CHANGELOG.md
# Generate for specific commit range
npx notegen generate --from v1.0.0 --to v2.0.0
# Generate for a specific tag (auto-detects previous tag)
npx notegen generate --to v2.0.0
# Generate for the latest tag (auto-detects last and previous tag)
npx notegen generate --last --release-notes
# Limit number of commits
npx notegen generate --limit 10
# Generate release notes format (grouped by feat/fix with tickets)
npx notegen generate --release-notes
# With ticket links
npx notegen generate --release-notes --base-url https://jira.company.com/browse-o, --output <file>- Output file path (default:RELEASE_NOTES.md)-f, --from <commit>- Start from commit/tag (exclusive)-t, --to <commit>- End at commit/tag (inclusive, default:HEAD)-l, --limit <number>- Limit number of commits-r, --release-notes- Generate release notes format with grouped tickets (feat/fix)--no-release-notes- Generate standard changelog format (overrides config)-b, --base-url <url>- Base URL for linking tickets--last- Generate release notes for the last tag (auto-detects previous tag)
CLI options override configuration file settings.
Groups commits by conventional commit prefixes in the message:
feat: add user authentication
fix: resolve login bug
chore: update dependenciesGenerates a simple changelog grouped by:
- Features (
feat:commits) - Bug Fixes (
fix:commits) - Other Changes (everything else)
Custom sections from config are not used in basic mode.
If your config has "releaseNotes": true by default, you can override it with --no-release-notes to use basic mode.
Groups commits by ticket references for tracking. The ticket reference can be in either the commit message or body:
# In commit message (single -m)
git commit -m "feat: add user authentication US-123"# In commit footer (multiple -m or editor)
feat: add user authentication
US: 123fix: resolve login bug
BUG: 456In release notes mode, commits are grouped by ticket reference type (US, BUG, etc.) instead of the commit message prefix. Supported formats:
US: 123orUS-123orUS 123orUS#123→ User Stories sectionBUG: 456orBUG-456orBUG 456orBUG#456→ Bugs section- Any custom pattern defined in your config
Commits without matching ticket references are excluded from release notes mode.
You can configure custom sections in notegen.json:
{
"sections": [
{
"section": "User Stories",
"pattern": "US",
"label": "US"
},
{
"section": "Bugs",
"pattern": "BUG",
"label": "BUG"
},
{
"section": "Improvements",
"pattern": "IMPROVEMENT",
"label": "IMPROVEMENT"
}
]
}Each section matches commits based on ticket references in either the commit message or body. The pattern field looks for <pattern>: <number>, <pattern>-<number>, <pattern> <number>, or <pattern>#<number> anywhere in the commit.