You can install the pre-compiled binary (in several ways), using Docker or compiling it from source.
Below you can find the steps for each of them.
Install the pre-compiled binary¶
- Add the Hombrew tab:
brew tap xavidop/tap email@example.com:xavidop/homebrew-tap.git brew update
- Install the Dialogflow CX CLI:
brew install cxcli
sudo snap install cxcli
scoop bucket add cxcli https://github.com/xavidop/scoop-bucket.git scoop install cxcli
echo 'deb [trusted=yes] https://apt.fury.io/xavidop/ /' | sudo tee /etc/apt/sources.list.d/cxcli.list sudo apt update sudo apt install cxcli
echo '[cxcli] name=Dialogflow CX CLI Repo baseurl=https://yum.fury.io/xavidop/ enabled=1 gpgcheck=0' | sudo tee /etc/yum.repos.d/cxcli.repo sudo yum install cxcli
yay -S cxcli-bin
deb, rpm and apk packages¶
.apk packages from the OSS releases page and install them with the appropriate tools.
go install github.com/xavidop/dialogflow-cx-cli@latest
curl -sfL https://cxcli.xavidop.me/static/run | bash
You can also set the
VERSION variable to specify
a version instead of using latest.
You can also pass flags and args to cxcli:
curl -sfL https://cxcli.xavidop.me/static/run | VERSION=__VERSION__ bash -s -- version
This script does not install anything, it just downloads, verifies and runs cxcli. Its purpose is to be used within scripts and CIs.
Download the pre-compiled binaries from the releases page and copy them to the desired location.
Verifying the artifacts¶
All artifacts are checksummed, and the checksum file is signed with cosign.
- Download the files you want, and the
checksums.txt.sigfiles from the releases page:
wget https://github.com/xavidop/dialogflow-cx-cli/releases/download/__VERSION__/checksums.txt wget https://github.com/xavidop/dialogflow-cx-cli/releases/download/__VERSION__/checksums.txt.sig wget https://github.com/xavidop/dialogflow-cx-cli/releases/download/__VERSION__/checksums.txt.pem
- Verify the signature:
COSIGN_EXPERIMENTAL=1 cosign verify-blob \ --cert checksums.txt.pem \ --signature checksums.txt.sig \ checksums.txt
- If the signature is valid, you can then verify the SHA256 sums match with the downloaded binary:
sha256sum --ignore-missing -c checksums.txt
Our Docker images are signed with cosign.
Verify the signatures:
COSIGN_EXPERIMENTAL=1 cosign verify xavidop/cxcli
.sig files are the image
Running with Docker¶
You can also use it within a Docker container. To do that, you'll need to execute something more-or-less like the examples below.
docker run --rm \ xavidop/cxcli cxcli version
Note that the image will almost always have the last stable Go version.
If you need more things, you are encouraged to keep your own image. You can always use cxcli's own Dockerfile as an example though and iterate from that.
Compiling from source¶
Here you have two options:
If you want to contribute to the project, please follow the steps on our contributing guide.
If you just want to build from source for whatever reason, follow these steps:
git clone https://github.com/xavidop/dialogflow-cx-cli cd dialogflow-cx-cli
get the dependencies:
go mod tidy
go build -o cxcli .
verify it works: