From b6569c6b5c801e355fd4c1902de153ea1a1ca660 Mon Sep 17 00:00:00 2001 From: Abhinav Prasad Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:25:43 -0700 Subject: [PATCH 1/3] Updates for README --- README.md | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c83856b..5098cdd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ -# Temporal Cloud CLI +# Temporal Cloud CLI (Public Preview) -Plugin for the Temporal command-line interface to work with [Temporal Cloud](https://docs.temporal.io/cloud) +Plugin for the Temporal command-line interface to work with [Temporal Cloud](https://docs.temporal.io/cloud). + +> **Public Preview:** This plugin (and the underlying Cloud Ops API) is offered as a Public Preview. While it is production-worthy, it is subject to change. Please reach out to [Temporal Support](https://support.temporal.io/) if you have questions. + +## Prerequisites + +- A [Temporal Cloud](https://docs.temporal.io/cloud) account. +- The [`temporal` CLI](https://temporal.io/setup/install-temporal-cli) installed and on your `PATH`. The Cloud CLI runs as a plugin to it. ## Quick install @@ -10,20 +17,37 @@ Plugin for the Temporal command-line interface to work with [Temporal Cloud](htt ### Install via download -1. Install the [`temporal` CLI](https://temporal.io/setup/install-temporal-cli) -2. Download the [latest version](https://github.com/temporalio/cloud-cli/releases/latest) for your OS and architecture: -3. Extract the downloaded archive. -4. Add the `temporal-cloud` binary to your `PATH` (`temoporal-cloud.exe` for Windows). +1. Download the [latest version](https://github.com/temporalio/cloud-cli/releases/latest) for your OS and architecture. +2. Extract the downloaded archive. +3. Add the `temporal-cloud` binary to your `PATH` (`temporal-cloud.exe` for Windows). ### Build -1. Install the [`temporal` CLI](https://temporal.io/setup/install-temporal-cli) -2. Install [Go](https://go.dev/doc/install) (check [go.mod](./go.mod) for the version) -3. Clone repository -4. Switch to cloned directory, and run `go build ./cmd/temporal-cloud` +1. Install [Go](https://go.dev/doc/install) (check [go.mod](./go.mod) for the version). +2. Clone this repository. +3. From the cloned directory, run `make build` (or `go build ./cmd/temporal-cloud`). -The executable will be at `temporal-cloud` (`temporal-cloud.exe` for Windows). +The executable will be at `temporal-cloud` (`temporal-cloud.exe` for Windows). Add it to your `PATH` so the `temporal` CLI can discover it. ## Usage -Once installed, invoke the plugin via `temporal cloud` +Once installed, invoke the plugin via `temporal cloud`. + +### Authenticate + +```sh +temporal cloud login # browser-based OAuth login +temporal cloud whoami # confirm the authenticated identity +``` + +Alternatively, pass an API key directly to any command with `--api-key`. + +### Examples + +```sh +temporal cloud namespace list +temporal cloud namespace get --namespace +temporal cloud namespace retention get --namespace +``` + +Run `temporal cloud --help` (or `temporal cloud --help`) to see all available commands and flags. From 3edc28792fbfd9edef79f1f1cb340524a7ff81d8 Mon Sep 17 00:00:00 2001 From: Abhinav Prasad Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:39:45 -0700 Subject: [PATCH 2/3] address code review comments --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5098cdd..6aeb20d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Temporal Cloud CLI (Public Preview) +# Temporal Cloud CLI (Pre-release) Plugin for the Temporal command-line interface to work with [Temporal Cloud](https://docs.temporal.io/cloud). -> **Public Preview:** This plugin (and the underlying Cloud Ops API) is offered as a Public Preview. While it is production-worthy, it is subject to change. Please reach out to [Temporal Support](https://support.temporal.io/) if you have questions. +> **Pre-release:** This plugin is offered as a pre-release and is subject to change. Please reach out to [Temporal Support](https://support.temporal.io/) if you have questions. ## Prerequisites From 6ee46bf56e0e45decd44ee405d931c726ba0e8c9 Mon Sep 17 00:00:00 2001 From: Abhinav Prasad Nekkanti <10552725+anekkanti@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:57:15 -0700 Subject: [PATCH 3/3] Set version build flags --- Makefile | 10 +++++++++- README.md | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 92c750a..073034d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,14 @@ -include .env export +# Derive the version from git so `make build` stamps the binary. Falls back to +# the commit hash if no tag is reachable, and appends "-dirty" for uncommitted changes. +# When git is unavailable (e.g. a source tarball), VERSION is empty and we omit the +# ldflag entirely so the in-code default (0.0.0-DEV) is preserved. +VERSION := $(shell git describe --tags --always --dirty 2>/dev/null) +VERSION_PKG := github.com/temporalio/cloud-cli/temporalcloudcli +LDFLAGS := $(if $(VERSION),-X $(VERSION_PKG).Version=$(VERSION)) + all: gen build mocks test # we need to install gen-commands directly because gen-commands does not have its @@ -18,7 +26,7 @@ gen: install gen-commands -input ./temporalcloudcli/commands.yml -pkg temporalcloudcli > ./temporalcloudcli/commands.gen.go build: - go build ./cmd/temporal-cloud + go build -ldflags "$(LDFLAGS)" ./cmd/temporal-cloud test-integration: go test -tags=integration ./... diff --git a/README.md b/README.md index 6aeb20d..550946f 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Plugin for the Temporal command-line interface to work with [Temporal Cloud](htt 1. Install [Go](https://go.dev/doc/install) (check [go.mod](./go.mod) for the version). 2. Clone this repository. -3. From the cloned directory, run `make build` (or `go build ./cmd/temporal-cloud`). +3. From the cloned directory, run `make build`. The executable will be at `temporal-cloud` (`temporal-cloud.exe` for Windows). Add it to your `PATH` so the `temporal` CLI can discover it.