Initialize a Project

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 the Alien City application, we will initialize the client and the Advanced I/O function components. As mentioned earlier, you can code the Advanced I/O function in the Java or Node.js platform, based on your convenience.

  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: \

catalyst init
  1. Select Client and Functions, then press the Enter key to initialize.

  2. 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 AlienCity from the list and press Enter.

  3. The CLI will initiate the function setup. Select AdvancedIO as the function type.

  4. Select the latest runtimes of the Java or Node.js programming environment based on your preference.

  5. If you select Java, enter “AlienCityAIO” as the folder name and press Enter. Enter the same name “AlienCityAIO” as the class name of the Java function as well and press Enter.


    The CLI will install the catalyst-java-sdk on your local system and update the information in the configuration file.

Note: Ensure that you enter the package name, or class name and folder name, exactly as instructed, because the application's code contains the same names.
  1. The CLI will now initiate the client set up. Enter “ALcity” as the name for the client package and press Enter. You can enter any name you need.

    The client directory will be created in the standard structure. Catalyst initialization is now complete.

Your project directory (CATALYST_PROJECT_HOME) is now set up with the client directory (CATALYST_CLIENT_HOME) and the functions directory (CATALYST_FUNCTIONS_HOME) along with configuration files and dependencies. The project directory also contains the catalyst.json configuration file and a hidden catalyst.rc file.

This is the structure of the AlienCity project’s directory, if the Advanced I/O function is of the Java platform. alien-city-client

This is the structure of the AlienCity project’s directory, if the Advanced I/O function is of the Node.js platform.alien-city-client