A Go tool for generating changesets markdown files without requiring the node package from NPM.
Note: This tool only generates
.changeset/*.mdfiles. It does not replace the full@changesets/clifunctionality—you still need changesets in CI forchangeset versionandchangeset publishcommands.
go install github.com/smartcontractkit/gocs/cmd/gocs@latestOr add as a tool dependency (Go 1.24+):
go get -tool github.com/smartcontractkit/gocs/cmd/gocs@latest
go tool gocsOr run directly without installing:
go run github.com/smartcontractkit/gocs/cmd/gocs@latestgocsThis launches an interactive terminal UI where you can:
- Select one or more packages from discovered
package.jsonfiles - Choose version bump type (major/minor/patch) for each package
- Enter a changelog message
# Single package
gocs -pkg chainlink -m "Fix memory leak #internal"
# Multiple packages (same version type)
gocs -pkg chainlink,contracts -type minor -m "Add new feature"
# Specify version type
gocs -pkg mypackage -type major -m "Breaking API change"| Flag | Description | Default |
|---|---|---|
-pkg |
Package name(s), comma-separated | - |
-m |
Changelog message | - |
-type |
Version bump: major, minor, patch |
patch |
-version |
Print version | - |
-help |
Show help | - |
Creates a markdown file in .changeset/ with a random name:
---
"package-name": patch
---
Your changelog message heregocs scans your repository for package.json files and extracts the name field from each. These become the selectable packages in interactive mode or valid values for the -pkg flag. Only packages with a name field are discovered.
Each generated changeset markdown file contains:
- Package name(s): The npm package name from
package.json - Impact type:
major,minor, orpatch— determines how the version number changes - Changelog message: Description of the change for the changelog
The generated .changeset/*.md files are consumed by the Changesets CLI in CI:
-
changeset version: Reads all pending changesets and:- Updates the
versionfield in each package'spackage.jsonbased on the impact type:major:1.2.3→2.0.0minor:1.2.3→1.3.0patch:1.2.3→1.2.4
- Appends the changelog message to the package's
CHANGELOG.md - Deletes the consumed changeset files
- Updates the
-
changeset publish: Publishes the updated packages to npm
This separation allows gocs to handle changeset creation without Node.js, while still leveraging the full Changesets workflow in CI.
Add to your go.mod as a tool dependency:
go get -tool github.com/smartcontractkit/gocs/cmd/gocs@latestThen use with:
go tool gocsMIT