CLI
The Tharsis CLI supports all major platforms, and binaries are released via GitLab releases.
Check the FAQ to see if there's already an answer.
Download binary​
Latest version: <VERSION>
- Linux
- macOS
- Windows
- FreeBSD
- OpenBSD
- Solaris
- amd64
- arm64
- arm
- 386
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_linux_amd64"
mv tharsis_<VERSION>_linux_amd64 tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_linux_arm64"
mv tharsis_<VERSION>_linux_arm64 tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_linux_arm"
mv tharsis_<VERSION>_linux_arm tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_linux_386"
mv tharsis_<VERSION>_linux_386 tharsis
chmod +x tharsis
- Apple Silicon
- Intel
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_darwin_arm64"
mv tharsis_<VERSION>_darwin_arm64 tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_darwin_amd64"
mv tharsis_<VERSION>_darwin_amd64 tharsis
chmod +x tharsis
- amd64
- 386
Invoke-WebRequest -Uri "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_windows_amd64" -OutFile tharsis.exe
Invoke-WebRequest -Uri "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_windows_386" -OutFile tharsis.exe
- amd64
- arm
- 386
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_freebsd_amd64"
mv tharsis_<VERSION>_freebsd_amd64 tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_freebsd_arm"
mv tharsis_<VERSION>_freebsd_arm tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_freebsd_386"
mv tharsis_<VERSION>_freebsd_386 tharsis
chmod +x tharsis
- amd64
- 386
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_openbsd_amd64"
mv tharsis_<VERSION>_openbsd_amd64 tharsis
chmod +x tharsis
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_openbsd_386"
mv tharsis_<VERSION>_openbsd_386 tharsis
chmod +x tharsis
- amd64
curl -LO "https://gitlab.com/api/v4/projects/39923532/packages/generic/tharsis-cli/<VERSION>/tharsis_<VERSION>_solaris_amd64"
mv tharsis_<VERSION>_solaris_amd64 tharsis
chmod +x tharsis
Installing the Tharsis CLI on other platforms may be possible, but it is not recommended nor supported.
Build from source​
While downloading a pre-built binary meets most use-cases, it may be desired to build a binary from source. Doing so will allow changing the default Tharsis HTTP endpoint (DefaultHTTPEndpoint) the CLI uses, which offers some convenience when configuring the CLI.
The CLI project includes a handy Makefile to help the build process be a little easier.
Requirements​
git clone https://gitlab.com/infor-cloud/martian-cloud/tharsis/tharsis-cli.git
cd <project-directory>
make build
To set a custom default endpoint at build time, pass it via ldflags:
go build -ldflags "-X main.DefaultHTTPEndpoint=https://api.tharsis.example.com" -o tharsis ./cmd/tharsis
Frequently asked questions (FAQ)​
Is there a way to run the CLI from any directory?​
Yes. Add the directory containing the binary to your system's PATH.
On Linux/macOS (Bash):
echo "PATH=\$PATH:[binary path]" >> ~/.bashrc && source ~/.bashrc
On Windows (PowerShell):
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";[binary path]", "User")
Replace
[binary path]with the full path to the directory containing the CLI binary.
Does the CLI auto-update?​
At the moment, it does not. However, running tharsis version will show when a newer version is available and provide the download URL.
Is the CLI binary signed?​
Not yet, although, this is on our roadmap.