Using the CLI
This tool allows the manipulation of all Metal Cloud elements via the command line.
Installation
Section titled “Installation”Download the latest release for your operating system.
Mac OS X
Section titled “Mac OS X”brew tap metalsoft-io/homebrew-repobrew install metalcloud-cliCentOS/Redhat Linux distribution
Section titled “CentOS/Redhat Linux distribution”Use the latest release for your platform https://github.com/metalsoft-io/metalcloud-cli/releases/latest
sudo yum install $(curl -s https://api.github.com/repos/metalsoft-io/metalcloud-cli/releases/latest | grep -i browser_download_url | grep "amd64" | grep -i linux | grep rpm | head -n 1 | cut -d'"' -f4)Debian/Ubuntu distributions
Section titled “Debian/Ubuntu distributions”curl -skL $(curl -s https://api.github.com/repos/metalsoft-io/metalcloud-cli/releases/latest | grep -i browser_download_url | grep "$(dpkg --print-architecture)" | grep deb | head -n 1 | cut -d'"' -f4) -o metalcloud-cli.deb && sudo dpkg -i metalcloud-cli.debWindows
Section titled “Windows”Binaries are available here.
Simply run the exe directly.
Build from source/go get
Section titled “Build from source/go get”You can also use go get, on any platform where golang is installed to retrieve the latest executable:
go get github.com/metalsoft-io/metalcloud-cliRetrieving the API key and endpoint and configuring the environment variables
Section titled “Retrieving the API key and endpoint and configuring the environment variables”- In the MetalSoft Web UI click on the user icon at the top right corner. Then go to API credentials → APY key
- Copy the api key. Its format should be
<number>:<letters>. - Copy the endpoint. Its format should be
https://api.environment.hostname.
- Configure credentials as environment variables (for Windows, use
SETrather thanexport).
export METALCLOUD_API_KEY="your key" # example value: "1:e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e"export METALCLOUD_ENDPOINT="your api endpoint" # example value: "https://api.demo.metalsoft.io"export METALCLOUD_INSECURE_SKIP_VERIFY=false #defaults to falseGetting a list of supported commands
Section titled “Getting a list of supported commands”Use metalcloud-cli help for a list of supported commands.
To see the complete documentation for the CLI visit: