Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.18 KB

cf-cli.md

File metadata and controls

71 lines (52 loc) · 1.18 KB

CF CLI

  • The CF CLI is a command line interface for CloudFoundry

Logging in

Username/Password login

cf login -a https://api.sys.my.org
# Enter username and password when prompted

SSO Login

cf login -a https://api.sys.my.org --sso
# Go to URL when prompted and copy passcode, paste into this terminal

Skip SSL Validation

cf login -a https://api.sys.my.org --skip-ssl-validation

Useful commands

Push

  • How to deploy applications
# if the manifest.yml exists in the working directory
cf push

# if the manifest.yml exists in a different directory
cf push -f some/other/dir/manifest.yml

# without a manifest
cf push my-app --stack windows --buildpack hwc_buildpack

Logs

# actively tails and displays current logs
cf logs my-app

# gets the most recent logs
cf logs my-app --recent

List resources

# list apps
cf apps

# list services
cf services

# list routes
cf routes

Switch orgs/spaces

# Switches to the dev space
cf target -s dev

# Switches to a different org's stage space
cf target -o app2 -s stage