CLI
The Phobos 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/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_linux_amd64"
mv phobos_<VERSION>_linux_amd64 phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_linux_arm64"
mv phobos_<VERSION>_linux_arm64 phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_linux_arm"
mv phobos_<VERSION>_linux_arm phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_linux_386"
mv phobos_<VERSION>_linux_386 phobos
chmod +x phobos
- Apple Silicon
- Intel
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_darwin_arm64"
mv phobos_<VERSION>_darwin_arm64 phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_darwin_amd64"
mv phobos_<VERSION>_darwin_amd64 phobos
chmod +x phobos
- amd64
- 386
Invoke-WebRequest -Uri "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_windows_amd64" -OutFile phobos.exe
Invoke-WebRequest -Uri "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_windows_386" -OutFile phobos.exe
- amd64
- arm
- 386
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_freebsd_amd64"
mv phobos_<VERSION>_freebsd_amd64 phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_freebsd_arm"
mv phobos_<VERSION>_freebsd_arm phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_freebsd_386"
mv phobos_<VERSION>_freebsd_386 phobos
chmod +x phobos
- amd64
- 386
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_openbsd_amd64"
mv phobos_<VERSION>_openbsd_amd64 phobos
chmod +x phobos
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_openbsd_386"
mv phobos_<VERSION>_openbsd_386 phobos
chmod +x phobos
- amd64
curl -LO "https://gitlab.com/api/v4/projects/59088135/packages/generic/phobos-cli/<VERSION>/phobos_<VERSION>_solaris_amd64"
mv phobos_<VERSION>_solaris_amd64 phobos
chmod +x phobos
Installing the Phobos 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 Phobos 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/phobos/phobos-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.phobos.example.com" -o phobos ./cmd/phobos
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 phobos 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.