Using the Fn Project CLI with Oracle Functions

Oracle Functions is powered by the Fn Project open source engine. As a result, you can use the Fn Project CLI to perform create, read, update, and delete operations on Oracle Functions.

To enable you to use the Fn Project CLI with Oracle Functions, you perform a number of preparatory tasks. See Functions QuickStart Guides and Client Environment Configuration Notes for Oracle Functions.

Most Fn Project CLI commands have a similar syntax:

fn [global options] <command> [command options] [subcommands] [arguments]

For example, to:

  • list all the available applications, use the command:
    fn list apps
  • create an application, use a command like:
    fn create app acmeapp --annotation oracle.com/oci/subnetIds='["ocid1.subnet.oc1.phx.aaaaaaaacnh..."]'
  • invoke a function, use a command like:
    fn invoke helloworld-app helloworld-func
  • change the profile that the Fn Project CLI uses for its context, use a command like:
    fn update context oracle.profile john-oci-profile

To see a complete list of Fn Project CLI commands, you can:

  • Log in to your development environment as a functions developer and enter fn --help or fn -h in a terminal window.
  • In a web browser, go to the Fn Project CLI documentation.

To see detailed information about individual Fn Project CLI commands, you can:

  • Log in to your development environment as a functions developer and enter fn <command> [subcommand] --help or fn <command> [subcommand] -h in a terminal window. For example:
    fn create --help
    fn update app -h
  • In a web browser, go to the Fn Project CLI documentation and select the command from the list.

From time to time, new versions of the Fn Project CLI are released. See Upgrading the Fn Project CLI.