Use a Catalyst Project

Using Catalyst CLI, you can associate a Catalyst project for your working directory. You can add an existing Catalyst project and link it with your directory.

However, your directory can only be bound and permanently associated with its base project, which is the project you initialized in that directory. Therefore, when you use another project in the directory, the association with that project will only be temporary.

Note: This command can only be run from an active Catalyst project directory. Therefore, if your current directory selection is not an active project directory, you can initialize the project , or pull its components into the directory, instead.

Command Execution

  1. To use a Catalyst project in your working directory, execute the following command from the required directory:
copy
$
catalyst project:use

The CLI will display a list of your existing projects from your default organization.

  1. Select the project that you require, using the arrow keys. Press Enter to confirm your choice.

Use Catalyst Project in CLI

Your project will now be added to your working directory and the CLI will display a confirmation message.

Use Catalyst Project in CLI


You can also execute the catalyst project:use command with the name or the Project ID of that project to use it in the working directory as follows:

copy
$
catalyst project:use [name_or_project_id]

Use Catalyst Project in CLI

Note: If you wish to use a project belonging to an organization which is not the default one, make sure to include the –org option and execute the below command to use the project:
copy
$
catalyst project:use [name_or_project_id] --org<org_id>

Note: If you are a Visual Studio Code IDE user, you can install the Catalyst Tools extension, and perform the above mentioned CLI operation using your IDE in place of the CLI. Steps to add a Catalyst project to your existing working directory using Visual Studio Code IDE can be found here

Last Updated 2024-01-09 17:07:13 +0530 +0530

ON THIS PAGE