In this tutorial, you install the IBM Cloud Command Line Interface, along with popular plug-ins and tools so that you can work with apps, toolchains, pipelines, Kubernetes clusters, and more in IBM Cloud.
The installation command in this tutorial installs the latest stand-alone IBM Cloud CLI version available, plus the following tools:
- Homebrew (Mac only)
- Git
- Docker
- Helm
- kubectl
- curl (Linux only)
- IBM Cloud Functions plug-in
- IBM Cloud Object Storage plug-in
- IBM Cloud Container Registry plug-in
- IBM Cloud Kubernetes Service plug-in
Want to instantly start working with the IBM Cloud CLI? Try out IBM Cloud Shell, which gives you a personal cloud-based shell workspace with the full IBM Cloud CLI and tons of command-line tools - no installation needed. To get started, click the Cloud Shell icon
in the IBM Cloud console menu bar. See Getting started with IBM Cloud Shell.
Before you begin
- Depending on your IBM Cloud account type, access to certain resources might be limited or constrained. Depending on your plan limits, certain capabilities that are required by some toolchains might not be available. See Setting up your IBM Cloud account.
- You must use the stable channel for Docker with a minimum version of 1.13.1.
- For Linux, install the curl command for downloading packages through the command line. If curl is already installed, the installer updates it to the latest version.
- For Windows, some functions are not supported unless you are running Windows 10 Pro.
If you need to use a 32-bit version of the CLI, or a previous version other than the latest for IBM Cloud Dedicated environments, see IBM Cloud CLI releases.
Step 1. Run the installation command
The latest version of the IBM Cloud CLI is installed when you run the command. As the CLI and plug-ins install, keep an eye on the command line to authenticate as needed.
For MacOS and Linux, run the following command:
curl -sL https://raw.githubusercontent.com/IBM-Cloud/ibm-cloud-developer-tools/master/linux-installer/idt-installer | bash
If you'd rather not pipe through bash, you can manually install the IBM Cloud CLI and then install the CLI plug-ins and tools separately.
For Windows 10 Pro, run the following command in PowerShell as an administrator:
[Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls11, Tls, Ssl3"; iex(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/IBM-Cloud/ibm-cloud-developer-tools/master/windows-installer/idt-win-installer.ps1')
To open PowerShell, right-click the Windows PowerShell icon, and select Run as administrator.
For automating DevOps installations, you can also access the installer script directly from this GitHub repo.
Step 2. Verify the installation
To verify that the CLI and Developer Tools were installed successfully, run the help command:
ibmcloud dev help
The output lists the usage instructions, the current version, and the supported commands.
Step 3. Configure your environment
Log in to IBM Cloud with your IBMid. If you've multiple accounts, you are prompted to select which account to use. If you do not specify a region with the -r flag, you must also select a region.
ibmcloud login
If your credentials are rejected, you might be using a federated ID. To log in with a federated ID, use the --sso flag. See Logging in with a federated ID for more details.
If you plan to access Cloud Foundry services, specify a Cloud Foundry org and space. We can run the following command to interactively identify the org and space:
ibmcloud target --cf
Or, if you know which org and space that the service belongs to, you can use the following command:
ibmcloud target -o <value> -s <value>
Next steps
You're now ready to develop and deploy your first app. See Creating and deploying apps by using the CLI.
Stay up to date with the IBM Cloud CLI by subscribing to the IBM Cloud CLI releases repository. You'll receive notifications about new IBM Cloud CLI releases.
IBM Cloud CLI supports a plug-in framework to extend its capability. Discover and install new CLI plugins!
Need a hand with remembering IBM Cloud CLI commands? Print the IBM Cloud CLI quick reference to keep commands for common tasks at your fingertips.