# Chatlayer CLDK

To aid in the development process of an app integration, we have developed a set of tools called Chatlayer Developer
Tools (`cldk` for short). These tools are available as a command line application. You can use them to scaffold, build,
test and publish your integrations directly from the command line.

## Installing the `cldk`

To install it, run from your terminal the following command

```shell
  npm install -g @chatlayer/app-platform
```

To verify that it is correctly installed, run:

```shell
cldk --version
```

If you see an output similar to the following

```shell
@chatlayer/app-platform/0.4.8
```

then you are ready to go.

## Basic workflow

```shell
  cldk --help
  cldk scaffold --help
```

To scaffold and build a new app with custom authentication, enter the following commands:

```shell
cldk scaffold my-first-app --auth=custom
cd apps/my-first-app
npm install
cldk build
```

### Regions

Chatlayer is available in several regions; depending on the region your app is deployed, the correct URL should be used.
Most of the commands support passing a `--region` parameter, which will automatically choose the right URL for you.

- US: `https://app-integrations.us-east4.gcp.chatlayer.ai` [`--region=us-east4`]
- EU: `https://app-integrations.chatlayer.ai` [`--region=europe-west1`]
- ASIA: `https://app-integrations.asia-south1.gcp.chatlayer.ai` [`region=asia-northeast1`]


## Command Overview

| COMMAND | DESCRIPTION |
|  --- | --- |
| [scaffold](/docs/chatlayer/cli-tools/cldk-scaffold) | Scaffold a new app. It will already contain a template app |
| [build](/docs/chatlayer/cli-tools/cldk-build) | Create a local build of the app |
| [upload](/docs/chatlayer/cli-tools/cldk-upload) | Upload an existing local build to Chatlayer's cloud infrastructure |
| [validate](/docs/chatlayer/cli-tools/cldk-validate) | Validate the app schema of your app |
| [push](/docs/chatlayer/cli-tools/cldk-push) | Build and upload your app. This is a combination of the `build` and `upload` commands. |
| [logs](/docs/chatlayer/cli-tools/cldk-logs) | Retrieve the logs from your deployed app integration |