Skip to main content
Version: release-0.7

Install kbcli

You can install kbcli on your laptop or virtual machines on the cloud.

Environment preparation

For Windows users, PowerShell version should be 5.0 or higher.

Install kbcli

kbcli now supports macOS, Windows, and Linux.

You can install kbcli with curl or brew.

  • Option 1: Install kbcli using the curl command.
  1. Install kbcli.

    curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
  2. Run kbcli version to check the version of kbcli and ensure that it is successfully installed.

note
  • If a timeout exception occurs during installation, please check your network settings and retry.
  • Option 2: Install kbcli using Homebrew.
  1. Install ApeCloud tap, the Homebrew package of ApeCloud.

    brew tap apecloud/tap
  2. Install kbcli.

    brew install kbcli
  3. Verify that kbcli is successfully installed.

    kbcli -h

(Optional) Enable auto-completion for kbcli

kbcli supports command line auto-completion.

# Configure SHELL-TYPE as one type from bash, fish, PowerShell, and zsh
kbcli completion SHELL-TYPE -h

For example, enable kbcli auto-completion for zsh.

Steps:

  1. Check the user guide.

    kbcli completion zsh -h
  2. Enable the completion function of your terminal first.

    echo "autoload -U compinit; compinit" >> ~/.zshrc
  3. Enable the kbcli automatic completion function.

    echo "source <(kbcli completion zsh); compdef _kbcli kbcli" >> ~/.zshrc