Initialize the Project from the CLI

After configuring the actions for a bot and coding the business logic for them, we will proceed to code the client application to embed the bot. We will be using the Catalyst Web Client Hosting component to host the client application in this tutorial.

In order to code the Catalyst functions, we will need to first initialize the project from the Catalyst CLI. The first step is to login to the CLI and initialize the project in an empty local directory. This will be the home directory of your project and all of the project files will be saved in it.

You can learn more about the project directory structure for all programming stacks supported by Catalyst from this page. You can learn about initializing a Catalyst project in detail from the CLI help documentation.

Please follow the steps listed below to initialize the project and create the required functions and client components:

  1. Create a folder for the project on your local machine and navigate to it from the CLI terminal.

  2. To initialize the project, please execute the following command:

copy
$
catalyst init
  1. The CLI will now ask you to select the default Catalyst organization. Select the organization in which you created the project in the first step of this tutorial and press Enter. select-portal
Note : To know the organization in which your project resides in, please refer to the steps in this page.
  1. You can associate the current project directory with the Catalyst project you created in this organization. Select Ecommerce and press Enter. select-project

  2. Select the components that you need to set up for your Catalyst application. Navigate through the options using the arrow keys and select them by pressing space bar. Select Client and press Enter to confirm your choice. choose-client

  3. The CLI will initiate the client setup next. Select Basic web app as your client type.

select-client-type

  1. Enter ecommerceclient as the name of the client package and then press Enter. You can enter any name you need.

setup-client

The client directory will be created in the standard structure and will look like this :

client-directory

Catalyst initialization is now complete. The project directory will contain the client and other project dependency files.

Last Updated 2023-12-15 18:54:08 +0530 +0530

RELATED LINKS

Initialize Resources