A professional Golang CLI tool for managing changelogs following the "Keep a Changelog" format and Semantic Versioning.
- changie
changie is a professional Go command-line application designed to help developers manage changelogs according to the Keep a Changelog format and Semantic Versioning principles. It provides a structured workflow for adding, organizing, and releasing changelog entries while integrating seamlessly with Git.
Built on solid engineering principles, changie includes:
- Modular command structure with Cobra
- Configuration management via Viper
- Structured logging with Zerolog
- Comprehensive testing and code quality checks
- Standardized Changelog Management: Follow "Keep a Changelog" best practices without manual formatting
- Semantic Versioning Support: Automatic version bumping following SemVer principles
- Git Integration: Seamless interaction with Git for tagging and committing changes
- Flexible Output Format: Generate consistent, well-formatted changelog files
-
Install changie:
go install github.com/peiman/changie@latest
-
Initialize a project:
changie init
-
Add a changelog entry:
changie changelog added "New feature: added user authentication" -
Release a new version:
changie bump minor
- Project Initialization: Generate a properly structured CHANGELOG.md file
- Entry Management: Add standardized changelog entries by type (added, changed, fixed, etc.)
- Version Control: Bump versions following Semantic Versioning (major, minor, patch)
- Git Integration: Commit changes and create version tags automatically
- Structured Output: Ensure consistency and readability of changelog files
- Go: 1.20+ recommended
- Git: For version control and integration features
go install github.com/peiman/changie@latestOr build from source:
git clone https://github.com/peiman/changie.git
cd changie
go install-
Initialize a project:
changie init
This creates a
CHANGELOG.mdfile in your project root. -
Add a changelog entry:
changie changelog added "New feature: added user authentication" -
Release a new version:
changie bump minor
This will bump the minor version number and update the changelog.
This project uses a "single source of truth" approach for configuration:
-
Binary Name: Defined only in
Taskfile.ymlasBINARY_NAME. This is propagated through the codebase via build flags and thebinaryNamevariable incmd/root.go. -
Module Path: Defined only in
go.modand referenced inTaskfile.ymlasMODULE_PATH.
When customizing this project:
- Change
BINARY_NAMEinTaskfile.ymlto your desired binary name - Change the module path in
go.modto your own repository path - Run
task buildto apply these changes throughout the codebase
Initialize a project with a properly formatted CHANGELOG.md file.
changie init [flags]--file: Changelog file name (default: "CHANGELOG.md")
changie init
changie init --file HISTORY.mdAdd entries to different sections of the changelog.
changie changelog [subcommand] [content]added: Add entry to the Added sectionchanged: Add entry to the Changed sectiondeprecated: Add entry to the Deprecated sectionremoved: Add entry to the Removed sectionfixed: Add entry to the Fixed sectionsecurity: Add entry to the Security section
--file: Changelog file name (default: "CHANGELOG.md")
changie changelog added "New feature: added user authentication"
changie changelog fixed "Bug in login form"
changie changelog security "Patched XSS vulnerability"Bump the version number according to Semantic Versioning rules.
changie bump [major|minor|patch] [flags]major: Bump the major version (breaking changes, X.y.z → X+1.0.0)minor: Bump the minor version (new features, x.Y.z → x.Y+1.0)patch: Bump the patch version (bug fixes, x.y.Z → x.y.Z+1)
--file: Changelog file name (default: "CHANGELOG.md")--rrp: Remote repository provider (github, bitbucket) (default: "github")--auto-push: Automatically push changes and tags--allow-any-branch: Allow version bumping on any branch (bypasses main/master branch check)
changie bump major
changie bump minor --auto-push
changie bump patch --file HISTORY.md
changie bump minor --allow-any-branch # For release branches or hotfixesNote: By default, version bump commands check that you're on the main or master branch. This is a best practice to maintain a clean release history. Use --allow-any-branch when you need to bump versions on other branches (e.g., release branches, hotfix branches).
changie uses Viper for flexible configuration:
Default config file: $HOME/.changie.yaml
Example:
app:
log_level: "info"
changelog:
file: "CHANGELOG.md"
version:
tag_prefix: "v"Override any config via environment variables:
export APP_LOG_LEVEL="debug"
export APP_CHANGELOG_FILE="HISTORY.md"Override at runtime:
changie init --file HISTORY.mdtask setup: Install toolstask format: Format codetask lint: Run linterstask test: Run tests with coveragetask build: Build the binarytask run: Run the binarytask check: All checks (format, lint, deps, tests)
task setup installs hooks that run format, lint, test on commit, ensuring code quality before changes land in the repository.
GitHub Actions runs task check on each commit or pull request, maintaining code standards and reliability.
task deps:verify: Verifies that dependencies haven't been modifiedtask deps:outdated: Checks for outdated dependenciestask deps:check: Runs all dependency checks (verification, outdated, vulnerabilities)
Dependency verification is automatically included in:
- Pre-commit hooks via Lefthook
- CI workflow via GitHub Actions
- The comprehensive quality check command:
task check
- Run
task deps:checkbefore starting a new feature - Update dependencies incrementally with
go get -u <package>followed bytask tidy - Always run tests after dependency updates
- Document significant dependency changes in commit messages
- Fork & create a new branch
- Make changes, run
task check - Commit with descriptive messages following the project's commit convention
- Open a pull request against
main
MIT License. See LICENSE.
- Run
task test:coverage-textto identify uncovered code paths for targeted testing improvements - Regularly run
task deps:checkto ensure dependencies are up-to-date and secure - For consistent formatting, run
task formatbefore committing changes