cf
Push applications to Cloud Foundry
TLDR
Log in to the Cloud Foundry API
Push an app using the default settings
View the services available from your organization
Create a service instance
Connect an application to a service
Run a script whose code is included in the app, but runs independently
Start an interactive SSH session with a VM hosting an app
View a dump of recent app logs
SYNOPSIS
cf [global options] <command> [<options>] [<arguments>]
PARAMETERS
-v, --verbose
Enable verbose output
-V, --version
Display cf CLI version
--help, -h
Show help information
--no-color
Disable colored output
--color
Force colored output
--locale <LOCALE>
Set locale (e.g., en_US)
--sso
Use single sign-on for login
--sso-passcode <PASSCODE>
SSO passcode for login
--trace
Trace all network calls
--url-timeout <TIMEOUT>
Max time to wait for server response (seconds)
-r, --randomize
Randomize query results
--json
Format output as JSON
DESCRIPTION
The cf command is the official command-line interface (CLI) for Cloud Foundry (CF), an open-source platform-as-a-service (PaaS) for deploying, scaling, and managing cloud-native applications.
Cloud Foundry supports multiple languages and frameworks, allowing developers to push apps with cf push, manage services, routes, and organizations/spaces. It interacts with CF API endpoints to perform operations like authentication (cf login), targeting org/space (cf target), listing apps (cf apps), viewing logs (cf logs), and scaling instances.
The CLI is plugin-extensible, supports streaming logs in real-time, and provides features like blue-green deployments via zero-downtime pushes. It's widely used in enterprise environments for microservices orchestration on public or private CF installations like PCF or OSS CF.
Installation is via package managers (e.g., apt, brew) or binaries. Users must login to a CF foundation and set API targets before use. Output is colorized by default for readability.
CAVEATS
Not a core Linux utility; requires separate installation. Must configure API endpoint and authenticate via cf login before use. Subcommands have their own man pages (e.g., cf-push(1)). Large outputs may require pagination tools.
COMMON WORKFLOW
cf login → cf target -o ORG -s SPACE → cf push → cf apps → cf logs APP
INSTALLATION
Linux: sudo apt install cf-cli or download from github.com/cloudfoundry/cli. Verify with cf --version.
PLUGINS
Extend with cf install-plugin PLUGIN, e.g., cf-plugin-autosleep.
HISTORY
Originated in 2011 from VMWare's Cloud Foundry project, initially private PaaS. Became open-source in 2011 under Apache 2.0. CLI (cf) evolved from v6 (2014) to v7+ with modern Go rewrite, supporting CF 2.x/3.x. Maintained by Cloud Foundry Foundation.
SEE ALSO
cf-push(1), cf-login(1), cf-target(1), cf-apps(1), kubectl(1)


