lightszentip / laravel-release-changelog-generator
Package to create releases and changelogs in laravel
Package info
github.com/lightszentip/laravel-release-changelog-generator
pkg:composer/lightszentip/laravel-release-changelog-generator
Requires
- php: >=8.4
- symfony/yaml: ^7.2|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^v3.86.0
- orchestra/testbench: ^v11.0.0
- pestphp/pest: ^v4.0.4
- pestphp/pest-plugin-laravel: ^v4.0.0
- pestphp/pest-plugin-type-coverage: ^4.0
- phpcheckstyle/phpcheckstyle: ^V0.14.8
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan-deprecation-rules: ^2.0.3
- phpstan/phpstan-phpunit: ^2.0.7
- psalm/plugin-laravel: ^v4.0.0
- psalm/plugin-phpunit: ^0.19.5
- roave/security-advisories: dev-latest
- vimeo/psalm: ^7.0.0
This package is auto-updated.
Last update: 2026-04-27 06:47:30 UTC
README
This package adds changelog management over the command line and version release management. You can add new changelog items, and if you release, the changelog is updated with the new version and the version file. Thus, it is easy to manage a customer changelog.
The changelog is a JSON file that can easily be integrated into a controller to present to the end customer.
See ROADMAP for new functions.
HINT: Please run 'php artisan vendor:publish --tag=resources'
Version Compatibility
| Release Changelog Generator | PHP | Laravel |
|---|---|---|
| 0.1.x | >=8.0 | 9 |
| 0.2.0 | >=8.0 | 9 |
| 0.2.1 | >=8.0 | 9 / 10 (not tested) |
| 0.3.x | >=8.1 | 9 / 10 |
| 0.4.x | >=8.2 | 11 |
| 1.0.x | >=8.3 | 11, 12 |
| 1.1.x | >=8.4 | 12, 13 |
Installation
You can install the package via Composer:
composer require lightszentip/laravel-release-changelog-generator
Please publish the necessary files with:
php artisan vendor:publish --provider="Lightszentip\LaravelReleaseChangelogGenerator\ServiceProvider"
php artisan vendor:publish --tag=resources
Usage
If the command is used without arguments, the command line creates an ask for all necessary arguments.
Create a new changelog item:
php artisan changelog:add --type="feat" --message="Implement the whole function for magic" php artisan changelog:add --type="fix" --message="Fix the magic" --issue="42" php artisan changelog:add --type="feat" --message="Module feature" --module="core"
Options: --type, --message, --issue (optional issue reference), --module (optional module name).
You can find the result in resources/.changes/changelog.json
Release the changelog
php artisan changelog:release --releasename="My First Release" --type=patch
This updates the version.yml to the next patch version and add in the changelog.json a new release with all current changelog items.
Set a specific release version:
php artisan changelog:set-release --releasename="My Release" --versionnumber="2.1.0"
Update the version without creating a release:
php artisan changelog:update-version --type=patch
Types: patch, minor, major, rc, timestamp
Show the current version:
php artisan changelog:show-version php artisan changelog:show-version --format=full
Update CHANGELOG.md file:
This will update the CHANGELOG.md file in the root with your changes.
php artisan changelog:generate-md
Get the version in the application
Blade
@releasechangelog
To get a special format for the version, you find in the 'releasechangelog.php' in the config dir the item ' version_formats'. You can add new formats and/or change the existing ones. To use it:
@releasechangelog('full')
Code
app('releasechangelog.version')->showVersion($format)
Config
prerelease set to false to remove the "rc" part from version
To use another pre-release name as 'rc', change it on version.yml direct.
Example Result
version.yml
label: v
major: 1
minor: 0
patch: 1
prerelease: rc
prereleasenumber: 0
buildmetadata: null
timestamp:
date: null
timestamp: null
changelog.json
{"unreleased":{"name":"tbd","date":"","release":false},
"1.0.1.rc0":{"name":"My First Release","date":"2022-12-22 23:56:34","release":true,"feat":[{"message":"My first feature"},{"message":"Implement the whole function for magic"}]}}
AI & Pipeline Integration
JSON Output Flag
Every Artisan command supports --json for machine-readable output:
php artisan changelog:show-version --json # {"version":"1.0.0"} php artisan changelog:suggest-release --json # {"type":"minor","reason":"Feature type 'feat' found in unreleased entries"} TYPE=$(php artisan changelog:suggest-release --json | jq -r '.type') php artisan changelog:release --releasename="My Release" --type="$TYPE"
Read Commands
# List all released versions php artisan changelog:list php artisan changelog:list --json # Show unreleased entries (default) or a specific version php artisan changelog:show php artisan changelog:show --unreleased --json php artisan changelog:show --ver=1.0.0 --json
MCP Server (Claude Code / AI Tools)
The package ships a standalone MCP server that AI tools (Claude, Cursor, etc.) can use to read and write the changelog without a full Laravel bootstrap.
Setup:
-
Copy the example config to your project root:
cp vendor/lightszentip/laravel-release-changelog-generator/.mcp.json.example .mcp.json
-
Adjust paths in
.mcp.jsonif your project uses non-default locations:{ "mcpServers": { "changelog": { "command": "vendor/bin/changelog-mcp", "env": { "CHANGELOG_PATH": "resources/.changes/changelog.json", "VERSION_PATH": "resources/.version/version.yml" } } } }
Available MCP Tools:
| Tool | Description |
|---|---|
add_entry |
Add a changelog entry to unreleased (type, message, optional module/issue) |
get_unreleased |
Return the current unreleased section |
get_version |
Return the current version (optional format parameter) |
list_releases |
List all released versions |
create_release |
Bump version and create a new release (name, type: patch/minor/major/rc) |
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.