Initialize your first app
Initialize an app from scratch with the Optimizely Connect Platform (OCP) command-line interface (CLI).
After you get an Optimizely Connect Platform (OCP) developer account and configure the OCP command-line interface (CLI), this is the first step in creating your first app with OCP.
Complete these steps to scaffold an app on your local machine.
Initialize an app using the CLI
To create your app structure, run ocp app init
in the directory and follow the on-screen instructions. This example builds a marketing application.
- Enter the name of your app in the Name of your app prompt.
Note
In this example, the app is named My New Marketing App.
- Accept the default value for the ID of your app field.
- The default Version (
1.0.0-dev.1
) works well in most cases.Note
For more information on app versioning in OCP, see Update your app version.
- Enter a brief summary of your app in the App Summary field.
- Enter your support URL in the Support URL field.
Note
This must be a valid URL.
- Enter a valid email address in the Contact email address field.
- In the Select the category for the app prompt, select Marketing.
- In the Select a template project prompt, select Basic Sample. This builds a scaffold for a marketing app.
- In the Project directory name prompt, press Enter to accept the directory name.
Note
The default is a hyphenated version of the app name you entered in step 1.
- Now, the CLI runs through the build process and creates the scaffold for the app. Move into the new directory or drop into your favorite code editor to take a look at the structure and files provided for your app.

Your app is now built on your local machine. For more information on the OCP app structure, see App Structure.
Next, learn how to publish your OCP app to the App Directory.
Updated about 2 months ago