Oracle Cloud Infrastructure Documentation

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 Configuring Your Client Environment for Function Development.

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. To:

  • See which version of the Fn Project CLI is currently installed and whether it is the most recent version, log in to your development environment as a functions developer and enter fn version in a terminal window. The Fn Project CLI version number is displayed. If a more recent version of the Fn Project CLI is available, the number of the latest available version is also displayed.
  • Upgrade the Fn Project CLI to the most recent version, reinstall the Fn Project CLI by following the instructions in 5. Install the Fn Project CLI.