From 1240d1e4439babedceb54dfc907484ba79487fbf Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 3 Jun 2026 14:05:57 +0530 Subject: [PATCH 1/4] chore: add changelog.md --- CHANGELOG.md | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..408740c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,117 @@ +# Changelog + +All notable changes to chatwoot-cli are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Help center commands for managing portals and articles ([#15](https://github.com/chatwoot/cli/pull/15)). + +### Changed + +- Reworked the authentication flow ([#19](https://github.com/chatwoot/cli/pull/19)). +- Updated bundled usage examples. +- Bumped `github.com/getkin/kin-openapi` from 0.138.0 to 0.139.0 ([#18](https://github.com/chatwoot/cli/pull/18)). +- Bumped `actions/upload-artifact` from 4 to 7 ([#17](https://github.com/chatwoot/cli/pull/17)). + +### Fixed + +- Hardened the install script and credential cleanup ([#14](https://github.com/chatwoot/cli/pull/14)). + +## [0.5.0] - 2026-05-13 + +Adds a raw API escape hatch for cases where the CLI does not yet have a first-class command. There are no breaking changes. + +### Added + +- **`chatwoot api` raw API command** — make authenticated Chatwoot API requests directly from the CLI ([#13](https://github.com/chatwoot/cli/pull/13)). Account-relative paths such as `/conversations/123` are expanded automatically under `/api/v1/accounts/`; use `--exact` to target absolute paths like `/api/v1/profile`. Supports custom methods (`-X`), JSON request bodies, file/stdin bodies (`--data`), and additional headers. JSON responses are pretty-printed; non-JSON responses are passed through as-is. + + ```bash + chatwoot api /conversations/123 + chatwoot api -X PATCH /conversations/123 --data '{"status":"open"}' + chatwoot api --exact /api/v1/profile + ``` + +### Changed + +- Updated the bundled agent skill with stronger raw API guidance: prefer first-class commands, consult the Chatwoot Swagger before raw calls, and treat all writes (including non-GET raw API calls) as privileged actions requiring explicit user confirmation. +- Simplified the README to focus on core setup and usage, delegating full command details to the docs site. + +## [0.4.0] - 2026-05-11 + +### Added + +- **`chatwoot conv contact` command** — fetch the contact attached to a conversation directly from the conversation id, without a separate contacts lookup ([#10](https://github.com/chatwoot/cli/pull/10)). +- **Version check** — the CLI now checks for newer releases so users know when an update is available. +- **Smarter install script** — detects an existing install, skips the completion prompt on rerun, and uses the `install` command when available ([#11](https://github.com/chatwoot/cli/pull/11)). + +### Changed + +- Improved CI and tooling: added `govulncheck`, a `go mod tidy` diff check, a coverage task with a sticky PR coverage comment (gated to same-repo PRs), and dependency review for PRs. Bumped GitHub Actions versions and updated the Go toolchain ([#9](https://github.com/chatwoot/cli/pull/9)). +- Removed the bundled `.claude` directory. +- Bumped `github.com/alecthomas/kong` from 1.14.0 to 1.15.0 ([#4](https://github.com/chatwoot/cli/pull/4)). +- Bumped `github.com/getkin/kin-openapi` from 0.133.0 to 0.138.0 ([#8](https://github.com/chatwoot/cli/pull/8)). +- Bumped `golang.org/x/term` from 0.31.0 to 0.43.0 ([#6](https://github.com/chatwoot/cli/pull/6)). + +## [0.3.0] - 2026-05-11 + +### Added + +- **Agent skills** — bundled skill definitions for driving the CLI from agent workflows. +- Pinned GoReleaser for reproducible release builds. + +### Fixed + +- Avoid caching the user id when authenticating from an environment token. +- Prevent account override from persisting across invocations. +- Redact tokens in verbose logs. +- Sanitize untrusted output fields. +- Validate `smoke.sh` base URL against URL userinfo bypass. +- Pin the zsh completion source to the install path. +- Null-delimit the find loop in the mise agents task. +- Drop the project `bin/` from the mise `PATH`. +- Fixed the docs link, spellcheck errors, the Go version, and skill label usage. + +## [0.2.0] - 2026-05-08 + +### Added + +- **`version` command** to report the installed CLI version. +- **`whoami` command**, unified with `me` / `auth status`. +- Better shell completions. +- Better install script. +- CI for tests. + +### Fixed + +- Clean exit when changing directory. +- Handle output writer errors to satisfy `errcheck`. + +## [0.1.0] - 2026-05-08 + +First release. A CLI for Chatwoot that reads and writes the same Chatwoot API your dashboard uses. + +### Added + +- List conversations, view details, reply, change status, assign, label, and set priority. +- Noun-grammar CLI with id-first verb dispatch and a custom Kong help printer. +- SDK services for conversations, contacts, inboxes, agents, and profile, including conversation writes and subresources. +- Mentions support in private notes, including team mentions. +- Message rendering with pagination and autofetch. +- API keys stored in the OS keyring; hardened auth input and storage. +- Shell completion support. +- Release pipeline and smoke test. +- Pre-built binaries for macOS, Linux (x86_64 + arm64), and Windows. + +Install with `curl -fsSL https://chwt.app/install-cli | sh`, then `chatwoot auth login`. + +[Unreleased]: https://github.com/chatwoot/cli/compare/v0.5.0...HEAD +[0.5.0]: https://github.com/chatwoot/cli/compare/v0.4.0...v0.5.0 +[0.4.0]: https://github.com/chatwoot/cli/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/chatwoot/cli/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/chatwoot/cli/compare/v0.1.0...v0.2.0 +[0.1.0]: https://github.com/chatwoot/cli/releases/tag/v0.1.0 From b186ccbce6e6204e2279104fe9e5d9e5dec1d8c2 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 3 Jun 2026 14:13:06 +0530 Subject: [PATCH 2/4] chore: bump version --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 408740c..cc25d05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +### Changed + +### Fixed + +## [0.6.0] - 2026-06-03 + +### Added + - Help center commands for managing portals and articles ([#15](https://github.com/chatwoot/cli/pull/15)). ### Changed From 8a76cc82d36e9dd9e3759064ab281e80b383d239 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 3 Jun 2026 14:13:13 +0530 Subject: [PATCH 3/4] feat: update release notes --- .github/workflows/release.yml | 18 +++++++++++++++++- .goreleaser.yml | 3 +++ CLAUDE.md | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d16e15..a9cc105 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,11 +29,27 @@ jobs: - name: go test run: go test -race -count=1 ./... + - name: Extract release notes from CHANGELOG.md + run: | + version="${GITHUB_REF_NAME#v}" + awk -v ver="$version" ' + # Stop at the next version heading or the link-reference footer. + found && (/^## \[/ || /^\[[^]]+\]: /) { exit } + /^## \[/ && index($0, "[" ver "]") { found=1; next } + found { print } + ' CHANGELOG.md > release_notes.md + if [ ! -s release_notes.md ]; then + echo "::error::No CHANGELOG.md section found for version $version" + exit 1 + fi + echo "----- release notes for $version -----" + cat release_notes.md + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v7 with: distribution: goreleaser version: "2.15.4" - args: release --clean + args: release --clean --release-notes=release_notes.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 54ec561..524ecdc 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -51,6 +51,9 @@ checksum: snapshot: version_template: "{{ incpatch .Version }}-next" +# The release body is supplied from CHANGELOG.md via `--release-notes` in the +# release workflow, so this generated changelog is used only as a fallback if +# that flag is ever dropped. changelog: sort: asc use: github diff --git a/CLAUDE.md b/CLAUDE.md index 5ded20e..b868f7c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -52,3 +52,19 @@ internal/ ## Commits Use conventional commits without scope: `feat:`, `fix:`, `chore:`, `refactor:`, `docs:` + +## Releasing + +Releases are tag-driven and the GitHub release body comes from `CHANGELOG.md`. + +1. Move the relevant items from `## [Unreleased]` into a new `## [x.y.z] - YYYY-MM-DD` section in `CHANGELOG.md`, and add its `[x.y.z]: .../compare/...` link at the bottom. (Follow [Keep a Changelog](https://keepachangelog.com/) / SemVer.) +2. Commit, then push tag `vx.y.z` (must match the changelog version, minus the `v`). +3. The `release` workflow (`.github/workflows/release.yml`) runs tests, extracts that version's section from `CHANGELOG.md` with awk, and passes it to GoReleaser via `--release-notes`. **If no matching section exists, the release fails fast** — so the changelog must be updated before tagging. +4. GoReleaser (`.goreleaser.yml`) builds the cross-platform archives, checksums, and the GitHub release; its own `changelog:` block is only a fallback if `--release-notes` is ever dropped. + +Dry run (local goreleaser must be v2; CI pins `2.15.4`): + +```bash +go run github.com/goreleaser/goreleaser/v2@v2.15.4 check +go run github.com/goreleaser/goreleaser/v2@v2.15.4 release --snapshot --clean --skip=publish +``` From 8eb59d5bcdfed585f4dca62e4115a7e097131993 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 3 Jun 2026 14:14:27 +0530 Subject: [PATCH 4/4] chore: update links --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc25d05..62ac4ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -117,7 +117,8 @@ First release. A CLI for Chatwoot that reads and writes the same Chatwoot API yo Install with `curl -fsSL https://chwt.app/install-cli | sh`, then `chatwoot auth login`. -[Unreleased]: https://github.com/chatwoot/cli/compare/v0.5.0...HEAD +[Unreleased]: https://github.com/chatwoot/cli/compare/v0.6.0...HEAD +[0.6.0]: https://github.com/chatwoot/cli/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/chatwoot/cli/compare/v0.4.0...v0.5.0 [0.4.0]: https://github.com/chatwoot/cli/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/chatwoot/cli/compare/v0.2.0...v0.3.0