Cloud Foundry CLI Reference Guide


NAME

cf - A command line tool to interact with Cloud Foundry

USAGE

cf [global options] command [arguments...] [command options]

VERSION

6.53.0+8e2b70a4a.2020-10-01

GETTING STARTED

Show help
Print the version
Log user in
Log user out
Change user password
Set or view the targeted org or space
Set or view target api url
Authenticate non-interactively

APPS

List all apps in the target space
Display health and status for an app
Push a new app or sync changes to an existing app
Change or view the instance count, disk space limit, and memory limit for an app
Delete an app
Rename an app
Start an app
Stop an app
Stop all instances of the app, then start them again. This causes downtime.
Recreate the app's executable artifact using the latest pushed app files and the latest environment (variables, service bindings, buildpack, stack, etc.). This action will cause app downtime.
Terminate, then restart an app instance
Run a one-off task on an app
List tasks of an app
Terminate a running task of an app
Show recent app events
Print out a list of files in a directory or the contents of a specific file of an app running on the DEA backend
Tail or show recent logs for an app
Show all env variables for an app
Set an env variable for an app
Remove an env variable from an app
List all stacks (a stack is a pre-built file system, including an operating system, that can run apps)
Show information for a stack (a stack is a pre-built file system, including an operating system, that can run apps)
Copies the source code of an application to another existing application (and restarts that application)
Create an app manifest for an app that has been pushed successfully
Show the type of health check performed on an app
Change type of health check performed on an app
Enable ssh for the application
Disable ssh for the application
Reports whether SSH is enabled on an application container instance
SSH to an application container instance

SERVICES

List available offerings in the marketplace
List all service instances in the target space
Show service instance info
Create a service instance
Update a service instance
Delete a service instance
Rename a service instance
Create key for a service instance
List keys for a service instance
Show service key info
Delete a service key
Bind a service instance to an app
Unbind a service instance from an app
Bind a service instance to an HTTP route
Unbind a service instance from an HTTP route
Make a user-provided service instance available to CF apps
Update user-provided service instance
Share a service instance with another space
Unshare a shared service instance from a space

ORGS

List all orgs
Show org info
Create an org
Delete an org
Rename an org

SPACES

List all spaces in an org
Show space info
Create a space
Delete a space
Rename a space
Allow SSH access for the space
Disallow SSH access for the space
Reports whether SSH is allowed in a space

DOMAINS

List domains in the target org
Create a domain in an org for later use
Delete a domain
Create a domain that can be used by all orgs (admin-only)
Delete a shared domain
List router groups

ROUTES

List all routes in the current space or the current organization
Create a url route in a space for later use
Perform a simple check to determine whether a route currently exists or not
Add a url route to an app
Remove a url route from an app
Delete a route
Delete all orphaned routes in the currently targeted space (i.e. those that are not mapped to an app)

NETWORK POLICIES

List direct network traffic policies
Create policy to allow direct network traffic from one app to another
Remove network traffic policy of an app

BUILDPACKS

List all buildpacks
Create a buildpack
Update a buildpack
Rename a buildpack
Delete a buildpack

USER ADMIN

Create a new user
Delete a user
Show org users by role
Assign an org role to a user
Remove an org role from a user
Show space users by role
Assign a space role to a user
Remove a space role from a user

ORG ADMIN

List available usage quotas
Show quota info
Assign a quota to an org
Define a new resource quota
Delete a quota
Update an existing resource quota
Share a private domain with an org
Unshare a private domain with an org

SPACE ADMIN

List available space resource quotas
Show space quota info
Define a new space resource quota
Update an existing space quota
Delete a space quota definition and unassign the space quota from all spaces
Assign a space quota definition to a space
Unassign a quota from a space

SERVICE ADMIN

List service auth tokens
Create a service auth token
Update a service auth token
Delete a service auth token
List service brokers
Create a service broker
Update a service broker
Delete a service broker
Rename a service broker
Migrate service instances from one service plan to another
Recursively remove a service and child objects from Cloud Foundry database without making requests to a service broker
Recursively remove a service instance and child objects from Cloud Foundry database without making requests to a service broker
List service access settings
Enable access to a service or service plan for one or all orgs
Disable access to a service or service plan for one or all orgs

SECURITY GROUP

Show a single security group
List all security groups
Create a security group
Update a security group
Deletes a security group
Bind a security group to a particular space, or all existing spaces of an org
Unbind a security group from a space
Bind a security group to the list of security groups to be used for staging applications
List security groups in the staging set for applications
Unbind a security group from the set of security groups for staging applications
Bind a security group to the list of security groups to be used for running applications
List security groups in the set of security groups for running applications
Unbind a security group from the set of security groups for running applications

ENVIRONMENT VARIABLE GROUPS

Retrieve the contents of the running environment variable group
Retrieve the contents of the staging environment variable group
Pass parameters as JSON to create a staging environment variable group
Pass parameters as JSON to create a running environment variable group

ISOLATION SEGMENTS

List all isolation segments
Create an isolation segment
Delete an isolation segment
Entitle an organization to an isolation segment
Revoke an organization's entitlement to an isolation segment
Set the default isolation segment used for apps in spaces in an org
Reset the default isolation segment used for apps in spaces of an org
Assign the isolation segment for a space
Reset the space's isolation segment to the org default

FEATURE FLAGS

Retrieve list of feature flags with status
Retrieve an individual feature flag with status
Allow use of a feature
Prevent use of a feature

ADVANCED

Executes a request to the targeted API endpoint
Write default values to the config
Retrieve and display the OAuth token for the current session
Get a one time password for ssh clients

ADD/REMOVE PLUGIN REPOSITORY

Add a new plugin repository
Remove a plugin repository
List all the added plugin repositories
List all available plugins in specified repository or in all added repositories

ADD/REMOVE PLUGIN

List commands of installed plugins
Install CLI plugin
Uninstall CLI plugin

INSTALLED PLUGIN COMMANDS

ENVIRONMENT VARIABLES

CF_COLOR=false
Do not colorize output
CF_DIAL_TIMEOUT=6
Max wait time to establish a connection, including name resolution, in seconds
CF_HOME=path/to/dir/
Override path to default config directory
CF_PLUGIN_HOME=path/to/dir/
Override path to default plugin config directory
CF_TRACE=true
Print API request diagnostics to stdout
CF_TRACE=path/to/trace.log
Append API request diagnostics to a log file
all_proxy=proxy.example.com:8080
Specify a proxy server to enable proxying for all requests
https_proxy=proxy.example.com:8080
Enable proxying for HTTP requests

GLOBAL OPTIONS

--help, -h
Show help
-v
Print API request diagnostics to stdout

APPS (experimental)

List all apps in the target space
Create a V3 App
Push a new app or sync changes to an existing app
Change or view the instance count, disk space limit, and memory limit for an app
Delete a V3 App
Start an app
Stop an app
Stop all instances of the app, then start them again. This causes downtime.
Create a new droplet for an app
Terminate, then instantiate an app instance
Applies manifest properties to an application
List droplets of an app
Set the droplet used to run an app
Show all env variables for an app
Set an env variable for an app
Remove an env variable from an app
Show the type of health check performed on an app
Change type of health check performed on an app's process
List packages of an app
Uploads a V3 Package
SSH to an application container instance