Install the Cloud Foundry Command Line Interface (CLI)
- How to download the Command Line Interface (CLI) package
- How to install the CLI and connect it to Cloud Foundry
- How to explore a few basic CLI commands
- Step 1
Download the latest Command Line Interface (CLI) from the Cloud Foundry web site. Use the following URL:
On the Cloud Foundry website, choose either the command line installer or the binary from the table listed on the webpage. If you don’t know which to use, choose the installer (not the binary) for your Operating System from the table.
Open the installer on your computer, and follow the installation instructions.
For more help with the CLI installation, look at the Cloud Foundry CLI installation documentation.
- Step 2
Open a command prompt on your computer.
In Windows, you can search in the start menu for the application “command prompt”.
On a Mac, use spotlight to find the application “terminal”.
On Linux/Unix, you know how this works, just open your favorite command shell.
Next, test the Cloud Foundry command line interface to make sure it is installed correctly.
To test the CLI, type in the following:
You should see a list of Cloud Foundry commands.
Which commands are available to you in the Cloud Foundry CLI (select all that are available)?
- Step 3
First, find the correct API URL for your region. Select the correct region from this table, and copy the URL. You will use the URL in the next steps to connect to Cloud Foundry.
Region URL Europe (Frankfurt) AWS
US East (VA) AWS
If your region is not in this list, check the Regions and API endpoints list for the most up to date list.
You can also identify your API Endpoint using your Cloud Foundry account:
First, navigate to the SAP BTP cockpit and select Enter Your Trial Account
Next, click on the subaccount.
The API Endpoint is displayed on the left-hand side of the Overview page.
- Step 4
Next, open a command line prompt on your computer. In the command line screen, type in the following:bashCopy
cf login -a <URL>
<URL>section with the URL you selected from the table.
When prompted, enter your username and password. Once you are logged in, you should see your API endpoint, user, org, and space.
You are now set up to use the SAP BTP, Cloud Foundry environment.
For more information on the Command Line Interface (CLI), go to the Cloud Foundry Getting Started with the CLI website.
After you log in to CloudFoundry, the CLI tool lists your API Endpoint, User, Org, and Space.
Which Space is set up for your account?