The pfs Command Line Interface (CLI)

This topic provides a summary of commands provided by the pfs command line interface (CLI).

To install the pfs CLI, see Download PFS from Pivotal Network.

Command Help

Most pfs commands take the following form: pfs COMMAND ACTION NAME [--option option-value] ...

For example:

pfs function create square \
  --git-repo https://github.com/projectriff-samples/node-square \
  --artifact square.js \
  --tail
pfs function delete square

Online help is available with the flag --help or -h. E.g. pfs COMMAND -h shows help for a command and pfs COMMAND ACTION -h shows help for a specific action.

The pfs CLI provides commands for building functions, applications, and containers. It also provides commands for deploying on the Core runtime and the Knative runtime.

Building Functions

  • pfs function create
    Create a function from source. Function source can be specified either as a Git repository or as a local directory. Builds from Git are run in the cluster while builds from a local directory are run inside a local Docker daemon.

  • pfs function delete
    Delete one or more functions by name or all functions within a namespace.

  • pfs function list
    List functions in a namespace or across all namespaces.

  • pfs function status
    Display status details for a function.

  • pfs function tail
    Watch build logs for a function. To cancel, press Ctrl-c.

Building Applications

  • pfs application create
    Create an application from source using the application Cloud Native Buildpack builder. Application source can be specified either as a Git repository or as a local directory. Builds from Git are run in the cluster while builds from a local directory are run inside a local Docker daemon

  • pfs application delete
    Delete one or more applications by name or all applications within a namespace.

  • pfs application list
    List applications in a namespace or across all namespaces.

  • pfs application status
    Display status details for an application.

  • pfs application tail
    Watch build logs for an application. To cancel, press Ctrl-c.

Building Containers

  • pfs container create
    Create a container to watch for the latest image. There is no build performed for containers.

  • pfs container delete
    Delete one or more containers by name or all containers within a namespace.

  • pfs container list
    List containers in a namespace or across all namespaces.

  • pfs container status
    Display status details for a container.

Deploying on the Core Runtime

  • pfs core deployer create
    Create Core runtime deployer with a Kubernetes deployment and service. The deployer references a function, application, or container, and watches for updates to built images.

  • pfs core deployer delete
    Delete a Core runtime deployer.

  • pfs core deployer list
    List Core runtime deployers.

  • pfs core deployer status
    Display status details for a Core runtime deployer.

  • pfs core deployer tail
    Watch the logs of a Core Runtime deployment. To cancel, press Ctrl-c.

Deploying on Knative

  • pfs knative deployer create
    Create a Knative deployer with a new Knative Configuration and Knative Route using images built from a function, application, or container.

  • pfs knative deployer delete
    Delete a Knative runtime deployer.

  • pfs knative deployer list
    List Knative runtime deployers.

  • pfs knative deployer status
    Display status details for a Knative runtime deployer.

  • pfs knative deployer tail
    Watch the logs of a Knative Runtime deployment. To cancel, press Ctrl-c.

Knative Adapters

  • pfs knative adapter create
    Create a Knative adapter which updates an existing Knative Service or Knative Configuration with images built from a function, application, or container.

  • pfs knative adapter delete
    Delete a Knative runtime adapter.

  • pfs knative adapter list
    List Knative runtime adapters.

  • pfs knative adapter status
    Display status details for a Knative runtime adapter.

Miscellaneous

  • pfs doctor
    Check for system components and access to interfaces.

  • pfs --version
    Print version information about pfs.

  • pfs completion
    Generate shell completion scripts for pfs.