winget install --id=Vultr.CLI -e
Official command line tool for Vultr services
Vultr CLI is a command-line interface designed to manage Vultr cloud services through their API. It provides developers and system administrators with a powerful toolset for efficiently managing resources such as instances, DNS records, firewalls, and more.
Ideal for developers and system administrators seeking to streamline cloud resource management. It enables efficient automation and provides a consistent interface for managing diverse services, enhancing productivity and operational efficiency.
Vultr CLI can be installed via winget, making it easy to integrate into your workflow.
The Vultr Command Line Interface
vultr-cli is a command line interface for the Vultr API
Usage:
vultr-cli [command]
Available Commands:
account Commands related to account information
apps Display applications
backups Display backups
bare-metal Commands to manage bare metal servers
billing Display billing information
block-storage Commands to manage block storage
cdn Commands to manage your CDN zones
completion Generate the autocompletion script for the specified shell
container-registry Commands to interact with container registries
database Commands to manage databases
dns Commands to control DNS records
firewall Commands to manage firewalls
help Help about any command
inference Commands to manage serverless inference
instance Commands to interact with instances
iso Commands to manage ISOs
kubernetes Commands to manage kubernetes clusters
load-balancer Commands to managed load balancers
marketplace Display marketplace information
object-storage Commands to manage object storage
os Display available operating systems
plans Display available plan information
regions Display regions information
reserved-ip Commands to interact with reserved IPs
script Commands to interact with startup scripts
snapshot Commands to interact with snapshots
ssh-key Commands to manage SSH keys
user Commands to manage users
version Display the vultr-cli version
vpc Commands to manage VPCs
Flags:
--config string config file (default is $HOME/.vultr-cli.yaml)
-h, --help help for vultr-cli
-o, --output string output format [ text | json | yaml ] (default "text")
Use "vultr-cli [command] --help" for more information about a command.
These are the options available to install vultr-cli
:
If you are to visit the vultr-cli
releases page. You can download a compiled version of vultr-cli
for you Linux/MacOS/Windows in 64bit.
You will need Go installed on your machine in order to work with the source (and make if you decide to pull the repo down).
$ source <(vultr-cli completion bash) $ vultr-cli completion fish | source PS> vultr-cli completion powershell | Out-String | Invoke-Expressiongo install github.com/vultr/vultr-cli/v3@latest
Another way to build from source is to
git clone git@github.com:vultr/vultr-cli.git or git clone https://github.com/vultr/vultr-cli.git
cd vultr-cli
make builds/vultr-cli_(pass name of os + arch, as shown below)
The available make build options are
Note that the latter method will install the vultr-cli
executable in builds/vultr-cli_(name of os + arch)
.
pacman -S vultr-cli
brew install vultr/vultr-cli/vultr-cli
dnf install vultr-cli
pkg_add vultr-cli
You can find the image on Docker Hub. To install the latest version via docker
:
docker pull vultr/vultr-cli:latest
To pull an older image, you can pass the version string in the tag. For example:
docker pull vultr/vultr-cli:v2.15.1
The available versions are listed here.
As described in the next section, you must authenticate in order to use the CLI. To pass the environment variable into docker, you can do so via:
docker run -e VULTR_API_KEY vultr/vultr-cli:latest instance list
This assumes you've already set the environment variable in your shell environment, otherwise, you can pass it in via -e VULTR_API_KEY=
In order to use vultr-cli
you will need to export your Vultr API KEY
export VULTR_API_KEY=
vultr-cli
can interact with all of your Vultr resources. Here are some basic examples to get you started:
vultr-cli instance list
vultr-cli instance create --region --plan --os --host
vultr-cli dns domain create --domain --ip
You should use = when using a boolean flag.
vultr-cli instance create --region --plan --os --host --notify=true
The config flag can be used to specify the vultr-cli.yaml file path when it's outside the default location (default is $HOME/.vultr-cli.yaml). If the file has the api-key
defined, the CLI will use the vultr-cli.yaml config, otherwise it will default to reading the environment variable for the api key.
vultr-cli instance list --config /Users/myuser/vultr-cli.yaml
Currently the only available field that you can use with a config file is api-key
. Your yaml file will have a single entry which would be:
api-key: MYKEY
vultr-cli completion
will return autocompletions, but this feature requires setup.
Some guides:
To load completions for each session, execute once: Linux: $ vultr-cli completion bash > /etc/bash_completion.d/vultr-cli
macOS: $ vultr-cli completion bash > /usr/local/etc/bash_completion.d/vultr-cli
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions for each session, execute once: $ vultr-cli completion zsh > "${fpath[1]}/_vultr-cli"
You will need to start a new shell for this setup to take effect.
To load completions for each session, execute once: $ vultr-cli completion fish > ~/.config/fish/completions/vultr-cli.fish
To load completions for every new session, run: PS> vultr-cli completion powershell > vultr-cli.ps1 and source this file from your PowerShell profile.
Feel free to send pull requests our way! Please see the contributing guidelines.