# Generating projects using the CLI

The instruction below explain how to automatically generate projects using the CLI. This can be especially useful when deploying projects between different environments.

## Command syntax

`ComposeCli.exe generate_project --project project_name [--database_already_adjusted] [--stopIfDatamartsNeedRecreation]`

## Parameters

| Parameter | Description |
| --- | --- |
| --project | The name of the project. |
| --database\_already\_adjusted | This should only be included if the data warehouse and data marts were adjusted outside of Compose. |
| --stopIfDatamartsNeedRecreation | Stops the process if any data marts cannot be automatically adjusted and need to be recreated. |

## Example

`ComposeCli.exe generate_project --project MyProject --stopIfDatamartsNeedRecreation`

When the command is run, Compose will:

* Validate the model.

* Create any data warehouse tables that do not exist.

* Validate the data warehouse.

* Adjust the data warehouse if needed.

  Information note

  If an Adjust script is needed and `--database_already_adjusted` is included in the command, the script (DDL) will not be run as it is assumed that the user ran it manually.

* Generate all data warehouse tasks.

  Information note

  If Compose encounters an error while generating a data warehouse task, it will skip the problematic task and continue with the remaining tasks.

* Create, adjust and generate all data marts.

  Information note

  If the "Adjust" cannot be performed automatically and `--stopIfDatamartsNeedRecreation` is included in the command, the process will stop.

Certain limitations apply when adjusting the data mart. For more information, see [Auto-adjust limitations and considerations](https://help.qlik.com/en-US/compose/December2024/Content/ComposeDWDL/Main/DW/Data%20Marts/validate_the_data_mart.htm#Adjust).