cmd/generate_changelog/README.md
A high-performance changelog generator for Git repositories that automatically creates comprehensive, well-formatted changelogs from your git history and GitHub pull requests.
go install github.com/danielmiessler/fabric/cmd/generate_changelog@latest
generate_changelog
generate_changelog -o CHANGELOG.md
generate_changelog -v v1.4.244
generate_changelog -l 10
export GITHUB_TOKEN=your_token_here
generate_changelog
# Or pass directly
generate_changelog --token your_token_here
# Enable AI summaries using Fabric
generate_changelog --ai-summarize
# Use custom model for AI summaries
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4 generate_changelog --ai-summarize
# Rebuild cache from scratch
generate_changelog --rebuild-cache
# Force a full PR sync from GitHub
generate_changelog --force-pr-sync
# Disable cache usage
generate_changelog --no-cache
# Use custom cache location
generate_changelog --cache /path/to/cache.db
| Flag | Short | Description | Default |
|---|---|---|---|
--repo | -r | Repository path | . (current directory) |
--output | -o | Output file | stdout |
--limit | -l | Limit number of versions | 0 (all) |
--version | -v | Generate for specific version | |
--save-data | Save version data to JSON | false | |
--cache | Cache database file | ./cmd/generate_changelog/changelog.db | |
--no-cache | Disable cache usage | false | |
--rebuild-cache | Rebuild cache from scratch | false | |
--force-pr-sync | Force a full PR sync from GitHub | false | |
--token | GitHub API token | $GITHUB_TOKEN | |
--ai-summarize | Generate AI-enhanced summaries using Fabric | false | |
--release | Update GitHub release description with AI summary for version |
The generated changelog follows this structure:
# Changelog
## Unreleased
### PR [#1601](url) by [author](profile): PR Title
- Change description 1
- Change description 2
### Direct commits
- Direct commit message 1
- Direct commit message 2
## v1.4.244 (2025-07-09)
### PR [#1598](url) by [author](profile): PR Title
- Change description
...
The tool has been optimized to drastically reduce GitHub API calls and improve performance:
Previous approach: Individual API calls for each PR (2 API calls per PR)
Current approach: GraphQL batch fetching with intelligent caching
The optimization includes:
The tool supports GitHub authentication via:
export GITHUB_TOKEN=your_token--token your_token.env file in the same directory as the binaryCreate a .env file next to the generate_changelog binary:
GITHUB_TOKEN=your_github_token_here
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-sonnet-4-20250514
The tool automatically loads .env files for convenient configuration management.
Without authentication, the tool is limited to 60 GitHub API requests per hour.
The SQLite cache stores:
Cache benefits:
The tool can generate AI-powered summaries using Fabric for more polished, professional changelogs:
# Enable AI summarization
generate_changelog --ai-summarize
# Custom model (default: claude-sonnet-4-20250514)
FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4 generate_changelog --ai-summarize
Set the model via environment variable:
export FABRIC_CHANGELOG_SUMMARIZE_MODEL=claude-opus-4
# or
export FABRIC_CHANGELOG_SUMMARIZE_MODEL=gpt-5.2
AI summaries are cached and only regenerated when:
This tool is part of the Fabric project. Contributions are welcome!
The MIT License. Same as the Fabric project.