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.
-
Create a folder for the project on your local machine and navigate to it from the terminal.
-
Initialize a project by executing the following command from that directory:
- Select the preferred portal (or organization) by navigating using the arrow keys and press Enter to confirm. If you have no other organizations associated with the account, then the default one will be selected automatically.
- Now, CLI will ask you to associate a Catalyst project with the directory. Associate it with the project that we created earlier from the console. Select GitHubBot from the list and press Enter.
- Select Functions using the space bar. Press the Enter key to initialize.
- The CLI will initiate the function setup. Select Integration as the function type.
- Select Cliq as the service and press Enter.
- All Cliq handlers classes will be selected by default. Press Enter.
- Select the latest supported runtime of Java as the function stack, and press Enter.
- Enter “GithubExtension” as the folder name and “MainClass” as the class name. Press Enter each time.
The CLI will download and install the latest Catalyst Java SDK package.
Your project directory is now set up with 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 will be the final structure of your project directory.
Last Updated 2024-06-12 17:41:34 +0530 +0530