Skip to main content

CLI

The Tharsis CLI supports all major platforms, and binaries are released via GitLab releases.

Have a question?

Check the FAQ to see if there's already an answer.

Download binary​

Latest version: <VERSION>

tharsis_<VERSION>_linux_amd64
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
caution

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 the project to the local machine
git clone https://gitlab.com/infor-cloud/martian-cloud/tharsis/tharsis-cli.git
Use make to compile a binary
cd <project-directory>
make build

To set a custom default endpoint at build time, pass it via ldflags:

Build with a custom default endpoint
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.