Using the Cloud Foundry CLI

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Use the Cloud Foundry Command Line Interface (CF CLI)

The Cloud Foundry Command Line Interface

Usage Scenario

You have an account in the SAP Business Technology Platform and you enabled the runtime in your subaccount. To manage the environment using a command line interface, you need to get familiar with the Cloud Foundry Command Line Interface (CF CLI).

Manage the Cloud Foundry Runtime

The CF CLI enables you to work with the Cloud Foundry Runtime to deploy and manage your applications. To manage the Cloud Foundry Runtime, you can use both the BTP cockpit and the CF CLI. Many actions can only be performed using the CF CLI - for example, renaming a Cloud Foundry org.

To install the CLI, you can either grab the latest release on the official release page or use

In order to manage the SAP Cloud Foundry Runtime, you need to provide the CF CLI with an API endpoint. The API endpoint depends on the region you chose for your account:

  • For EU:
  • For US EAST:
You can find your specific API endpoint of your Cloud Foundry organization on your SAP BTP subaccount overview page. Always refer to them, and not to the previous examples shown here.

To try this out, you can open a command prompt and enter the following commands (in this case for the EU region):

Code snippet

cf api
cf login

Enter your credentials and try it out.

If you want to have an overview of all commands, enter the following command:

Code snippet
cf help -a

If you want to know the use of a special command - for example, rename-org to rename an org, enter the following command:

Code snippet
cf help rename-org

CF CLI: Plug-ins

CF CLI: Plug-ins offers a list of additional commands that have been implemented as plug-ins to extend the base CF CLI client.

You can find examples of a CF CLI plug-in for performing operations on multi-target applications (MTAs) in Cloud Foundry, such as deploying, removing, viewing, and so on:


You now have a more profound understanding of the CF CLI to manage the Cloud Foundry environment.

Log in to track your progress & complete quizzes