The Equinix Metal CLI¶
Equinix Metalâ„¢ provides an API-driven bare metal platform that combines the automation experience of the cloud with the benefits of physical, bare metal servers.
The Equinix Metal CLI wraps the Equinix Metal Go SDK packngo
, allowing interaction with the Equinix Metal API from a command-line interface.
Installation¶
You can download the appropriate binary for your system from the Releases page on GitHub.
Authentication¶
The CLI uses your Equinix Metal API token for authentication. The token can be stored in the $PACKET_TOKEN
environment variable.
export PACKET_TOKEN=[PACKET_TOKEN]
Or, you can set the token in a JSON or YAML configuration file.
YAML configuration file - $HOME/.packet-cli.yaml
.
---
token: PACKET_TOKEN
JSON configuration file - $HOME/.packet-cli.json
.
{
"token": "PACKET_TOKEN"
}
If needed, the configuration file path can be overridden with the --config flag.
CLI Reference¶
More documentation and a reference is in the Equinix Metal CLI GitHub repository.