wtctl: install, version and release
wtctl is the Watchtower command line client. It handles source map and debug file upload, release markers, JUnit and Test Impact Analysis in CI, as-code apply/diff and the MCP proxy. It is published from go/wtctl to the public repository watchtowerobservability/watchtower-cli (scripts/go-mirror.sh watchtower-cli ./wtctl). Each v* tag there builds a GitHub Release (publish/watchtower-cli/.github/workflows/release.yml).
Install
Method | Command |
|---|---|
Homebrew |
|
Scoop |
|
npm |
|
Go |
|
Download |
|
In CI (GitHub Actions, Linux):
- run: |
base=https://github.com/watchtowerobservability/watchtower-cli/releases/latest/download
curl -fsSLO "$base/wtctl_linux_amd64" && curl -fsSLO "$base/SHA256SUMS"
grep " wtctl_linux_amd64\$" SHA256SUMS | sha256sum -c -
install -m 0755 wtctl_linux_amd64 /usr/local/bin/wtctl && wtctl versionPin a version by replacing latest/download with download/v0.2.0. Verify provenance with gh attestation verify wtctl_linux_amd64 --repo watchtowerobservability/watchtower-cli.
Version and updates
wtctl versionprints the release version (stamped at build time with-X main.Version), the OS/arch and the Go version.wtctl --versiondoes the same.wtctl version --checkcompares that version with the latest GitHub release.$WTCTL_RELEASES_APIoverrides the lookup URL, for example for a GitHub Enterprise mirror.wtctl self-updatedownloadswtctl_<os>_<arch>[.exe]from the latest release, checks it against that release'sSHA256SUMS, and only then replaces the running binary. On Windows, the old binary is kept aswtctl.exe.old.--urlor$WTCTL_UPDATE_URLpoints it at another release location (https only). Binaries installed by Homebrew, Scoop or npm should be updated with that package manager.
Releasing (maintainers)
Add a section to
publish/watchtower-cli/CHANGELOG.md.Run
scripts/go-mirror.sh watchtower-cli ./wtctl. It refuses packages outsidepublish/watchtower-cli/allow.txtand pushes a history-free snapshot.Tag the mirror:
git -C <mirror checkout> tag v0.2.0 && git push origin v0.2.0. The workflow then:tests,
cross-builds the six binaries with the version stamped and checks
wtctl versionprints it,writes
SHA256SUMSand a Scoopwtctl.jsonwith the real hashes,attests build provenance,
creates the GitHub Release with every file attached,
updates the Homebrew tap (when the
TAP_TOKENsecret is set),publishes the npm wrapper.
This is the same flow as the agent (publish/watchtower-agent, released as v0.1.2).