The pfs Command Line Interface (CLI)

Page last updated:

This topic describes how to use 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 \
  --image gcr.io/$GCP_PROJECT_ID/square:v1 \
  --namespace default
pfs service delete square

Online help is available with the flag --help or -h. Run pfs -h to get started and pfs COMMAND -h for command-specific help.

The pfs CLI provides commands for interacting with functions, eventing, image relocation, installation, and more.

Functions and Knative Services

This section describes the pfs function and pfs service commands.

  • pfs function create NAME
    Create a new Knative service by building a function from source.

  • pfs function update NAME
    Trigger a function build to generate a new revision for the service.

Note: After you create a function, you can continue to interact with the Knative service using pfs service commands.

  • pfs service create NAME
    Create a new Knative service using a specified container image.

  • pfs service delete NAME
    Delete an existing Knative service (including those built from functions).

  • pfs service invoke NAME
    Invoke a Knative service.

  • pfs service list
    List Knative services.

  • pfs service status NAME
    Display the status of a Knative service.

  • pfs service update NAME
    Create a new revision for a Knative service, with updated attributes.

Eventing

This section describes the pfs channel and pfs subscription commands.

  • pfs channel create NAME
    Create a new channel on a bus or a cluster bus.

  • pfs channel delete NAME
    Delete an existing channel.

  • pfs channel list
    List channels.

  • pfs subscription create NAME
    Create a new subscription, binding a service to an input channel.

  • pfs subscription delete NAME
    Delete an existing subscription.

  • pfs subscription list
    List existing subscriptions.

For more information, see Eventing Channels.

Image Relocation

This section describes the pfs image commands.

  • pfs image relocate
    Relocate a PFS distribution to use images from a specified registry.

  • pfs image push
    Push docker images from files in a distribution to a registry.

For more information, see Relocate Container Images.

Install

This section describes PFS installation commands.

  • pfs system install
    Install PFS and Knative system components using the manifest from a distribution.

  • pfs system uninstall
    Remove PFS and Knative system components.

  • pfs namespace init
    Initialize a Kubernetes namespace using the manifest from a distribution.

For more information, see Installing PFS.

Miscellaneous

This section describes miscellaneous PFS commands.

  • pfs version
    Print version information about pfs.

  • pfs completion
    Generate shell completion scripts for pfs.