Initialize Resources

Introduction

The first step in working with the Catalyst CLI is initializing a Catalyst project in a directory in your local system and associating that directory with that project. You cannot perform any project-related operations in the CLI until you have initialized a Catalyst project.

The directory that you initialize a project in is referred to as the project directory. The required configuration files for your project are created automatically when the project is initialized.

You can initialize the three basic components of a Catalyst project: Functions, Client, and AppSail . The directories of the components that you initialize are created automatically, along with required configuration files and dependencies.

For detailed information on the project directory structure and the code structures of the configuration files, refer to the Project Directory Structure help page.

Note: You can also pull a JSON file that contains the API definitions of API Gateway from the remote console, into your project directory. Refer to the Working with API Gateway help page to learn more.

After the initialization process is complete, this directory will be permanently bound to that project. Although you can use the directory to work with other projects using the catalyst project:use command, this association will only be temporary. The project that you originally initialize in a directory will be considered to be the base project of that directory.

Note:
  • You will not be able to initialize a project in a directory whose root is already bound to another project. When a project is initialized in a directory, the CLI performs a check for Catalyst components beginning with the directory’s root. If any components are found in the root, the CLI will not initialize a new project in it.

  • The best way to initialize a new project is to create an individual folder for it in your local system, navigate to it, and execute the initialize command from that directory.

Last Updated 2023-07-21 16:41:15 +0530 +0530

ON THIS PAGE