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 Python 3.9 as the function stack, and press Enter.
- Press Enter to confirm the default package name as git_hub_bot_function and the entry point as main.py.
The CLI will download and install the latest Catalyst Python 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, a requirements.txt file and a hidden catalyst.rc file.
This will be the final structure of your project directory.
Last Updated 2023-12-15 18:54:08 +0530 +0530