Initialize the Project from the CLI

You can now begin working on your Catalyst project from the CLI. The first step is to initialize the project in an empty 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 this from the Project Directory Structure help page. You can learn about initializing a project in detail from the CLI help documentation.

For this InvoiceNotifier, we will initialize an Event Function, which will contain the logic of the action that is required to occur once the event happens and a Basic web app as the client component.

The event function will be initialized in the Python 3.9 platform. However, you can also initialize it in the Java or Node JS platforms.

Note: Ensure that you enter the function's package name or class name exactly as instructed, because the application's code contains the same name.
  1. Create a folder for the project on your local machine and navigate to it from the terminal.

  2. Initialize a project by executing the following command from that directory:

copy
$
catalyst init
  1. Navigate using the arrow keys and select your preferred portal and press the Enter key. If you have no other organizations associated with the account, then the default one will be selected automatically.
catalyst_authorization_portal_multiorg_choice

You can find out more about Catalyst’s multi-org portal feature from this help document.

  1. The CLI will now ask you to associate a Catalyst project with the directory. Associate it with the project that we created earlier from the console.

Select InvoiceNotifier from the list and press Enter.

Select your project
  1. Select Functions using the space-bar, then press the Enter key to initialize.
Select Function component
  1. The CLI will initiate the function setup. Select Event as the function type.
Select function type
  1. Select Python 3.9 as the programming environment.
Select language environment for function
  1. Enter Cliq_Notifier as the package name, “main.py” as the entry point, and press Enter.

Alternatively, you can press Enter without entering inputs to fill in the default values.

Provide package name and other details

The Catalyst initialization is now complete.

The project directory is now set up with the functions directory along with configuration files and dependencies. The project directory also contains the catalyst.json configuration file and a hidden .catalystrc file.

The structure of your project directory should now appear as shown below:

Project Directory for NodeJS

Last Updated 2025-06-10 18:26:01 +0530 +0530