Dev Guide
Dev GuideUser GuideGitHubNuGetDevCommunityDoc feedbackLog In

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.

  1. 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.

  2. Accept the default value for the ID of your app field.
  3. 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.

  4. Enter a brief summary of your app in the App Summary field.
  5. Enter your support URL in the Support URL field.

    πŸ“˜

    Note

    This must be a valid URL.

  6. Enter a valid email address in the Contact email address field.
  7. In the Select the category for the app prompt, select Marketing.
  8. In the Select a template project prompt, select Basic Sample. This builds a scaffold for a marketing app.
  9. 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.

  10. 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.