Cloud Foundry CLI & BTP CLI

Install the cf CLI (v8) and the BTP CLI, log in, and verify both tools are talking to your BTP account.

Cloud Foundry CLI & BTP CLI

You need two command-line tools to deploy applications to SAP BTP:

Tool What it does
cf CLI Deploy, scale, and manage apps in a Cloud Foundry space
btp CLI Manage BTP global account resources (subaccounts, service instances, entitlements)

Install the CF CLI (v8)

macOS

brew install cloudfoundry/tap/cf-cli@8

Windows (PowerShell)

Download the installer from github.com/cloudfoundry/cli/releases — pick the cf8-installer-windows64.zip.

Linux (Debian/Ubuntu)

wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt update && sudo apt install cf8-cli

Verify

cf --version
# CF CLI version 8.x.x

Log in to Cloud Foundry

cf login -a https://api.cf.eu10.hana.ondemand.com
# Replace eu10 with your BTP region (us10, ap21, etc.)

Enter your BTP email and password. Select your org and space.

cf target   # shows current org/space

Install the BTP CLI

Download from tools.hana.ondemand.com → SAP BTP command line interface.

Or on macOS/Linux:

# Check https://tools.hana.ondemand.com for the latest URL
curl -L https://tools.hana.ondemand.com/additional/btp-cli-linux-amd64-2.x.x.tar.gz | tar xz
sudo mv btp /usr/local/bin/

Verify

btp --version
btp login
# Follow the browser login prompt

Quick reference — commands you will use constantly

cf apps                     # list deployed apps in current space
cf logs <app-name> --recent # view recent app logs
cf env <app-name>           # view environment variables
cf restage <app-name>       # rebuild app image after env change
cf push                     # deploy from current directory
Sign in for progress tracking & Q&A →