go-changeset
A CLI for managing changesets, versions, changelogs, and GitHub releases in Go workspaces (monorepos). Inspired by @changesets/cli.
Quick start
Install
go install github.com/jakoblorz/go-changesets/cmd/changeset@latest
Prerequisites
- A Go workspace with a
go.work at the repo root
- One or more Go modules referenced via
go.work use
Typical workflow
- Add a changeset
changeset
# or
changeset add
- Apply changesets to a project (bumps version + updates changelog)
changeset version --project <project>
- Publish a GitHub release (creates git tag + GitHub release)
export GITHUB_TOKEN=...
changeset publish --project <project> --owner <org> --repo <repo>
Batch operations
Run commands per project with filters:
# Version all projects that have pending changesets
changeset each --filter=open-changesets -- changeset version
# Publish all projects where the local version is newer than the latest tag
changeset each --filter=outdated-versions -- \
changeset publish --owner <org> --repo <repo>
Documentation
Extended guides live in docs/:
docs/01_intro-to-using-changesets.mdx
docs/02_adding-a-changeset.mdx
docs/03_changeset-groups.mdx
docs/04_snapshotting.mdx
docs/05_github-integration.mdx
docs/06_concepts.mdx
docs/07_cli-reference.mdx
Architecture (high level)
- Business logic is separated from IO via mockable interfaces:
internal/filesystem.FileSystem
internal/git.GitClient
internal/github.GitHubClient
- Core domain types live in
internal/models.
- CLI is handling imperative flow:
internal/cli
Testing
go test ./...
E2E tests:
go test ./test/e2e/... -v
Kitchen sink example
A complete demo monorepo lives in kitchensink/.
License
MIT