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

7.3.0+645c3ce6a.2021-08-16

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
Create an Application in the target space
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
Cancel the most recent deployment for an app. Resets the current droplet to the previous deployment's droplet.
Start an app
Stop an app
Stop all instances of the app, then start them again.
Stage a package into a droplet
Stage the app's latest package into a droplet and restart the app with this new droplet and updated configuration (environment variables, service bindings, buildpack, stack, etc.).
Terminate, then instantiate an app instance
Run a one-off task on an app
List tasks of an app
Terminate a running task of an app
List packages of an app
Uploads a Package
List droplets of an app
Set the droplet used to run an app
Download an application droplet
Show recent app events
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 restages 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's process
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
Apply manifest properties to 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 private domain for a specific org
Delete a private 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 route for later use
Perform a check to determine whether a route currently exists or not
Map a route to an app
Remove a 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 or service instance)

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
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 organization quotas
Show organization quota
Assign a quota to an organization
Define a new quota for an organization
Delete an organization quota
Update an existing organization quota
Share a private domain with a specific org
Unshare a private domain with a specific org

SPACE ADMIN

List available space quotas
Show space quota info
Define a new quota for a space
Update an existing space quota
Delete a space quota
Assign a quota to a space
Unassign a quota from a space

SERVICE ADMIN

List service brokers
Create a service broker
Update a service broker
Delete a service broker
Rename a service broker
Recursively remove a service offering 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 offering or service plan for one or all orgs
Disable access to a service offering 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 globally
List security groups globally configured for staging applications
Unbind a security group from the set of security groups for staging applications globally
Bind a security group to the list of security groups to be used for running applications
List security groups globally configured for running applications
Unbind a security group from the set of security groups for running applications globally

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

METADATA

List all labels (key-value pairs) for an API resource
Set a label (key-value pairs) for an API resource
Unset a label (key-value pairs) for an API resource

ADVANCED

Executes a request to the targeted API endpoint
Write default values to the config
Display the OAuth token for the current session and refresh the token if necessary
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

EXPERIMENTAL COMMANDS

List revisions of an app
Show details for a specific app revision
Rollback to the specified revision of an app