HomeGuidesAPI ReferenceGraphQL
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Initialize your first app

This section describes how to initialize an app from scratch with the Optimizely Connect Platform (OCP) command-line interface (CLI).

This is the second step in creating your first app using OCP. Make sure you have set up your OCP development environment before continuing.

Initialize an app using the CLI

In the directory, you want to create your app structure, run opti app init and follow the on-screen instructions. In this example, we will build a Marketing application.

In this example, we have named the app My Marketing App.

  1. Accept the default for the "ID of your app".
  2. Update the version to 0.0.0-dev.1. More on versioning later.
  3. Provide a brief summary of your app. The summary is unimportant for this example.
  4. Provide a correctly structured URL for the "Support URL". The URL does not matter at this point, but a URL is required for the build.
  5. Provide a correctly structured email address for "Contact email address". The email address does not matter at this point, but an email address is required for the build.
  6. Select "Marketing" as the category:

  1. Select the "Basic Sample", this will build a scaffold for a Marketing app:

  1. Accept the directory name (the default is named after your app):

  1. The CLI will now run through the build process and create the scaffold for the app. Move into the new directory and list the contents to see the scaffold:

Conclusion

Congratulations! Your app has now been built on your local machine. You can learn more about the structure in the App Structure documentation.

Next, learn how to publish your OCP app to the App Directory.