# Getting started

This guide explains how to set up your development environment and how to use the the Chatlayer CLI `cldk` which is available as a command line app.

# Prerequisites

To use the App Integration framework, you should be familiar with the following:

- Node.js
- Javascript


Knowledge of [Typescript](https://www.typescriptlang.org/) is helpful but not required.

To install CLI on your local system, you need the following:

- Node.js
App Integration requires *[version 14](https://nodejs.org/download/release/latest-v14.x/)* of Node.js.
For more information on installing Node.js, see [nodejs.org](https://nodejs.org/en/). If you are unsure what version of `Node.js` runs on your system, run `node -v` in a terminal window.
- `npm` package manager
App Integration CLI and the App you develop with this framework depends on many features and functions. To download and install Node.js packages, you need the  [npm](https://docs.npmjs.com/about-npm)  package manager. This guide uses the [npm client](https://docs.npmjs.com/cli/v8/commands/npm-install) command line interface, which is intalled with `Node.js` by default. To check that you have installed the npm client installed, run `npm -v` in the terminal window.


## Install the Chatlayer CLI (`cldk` for short)

You use the App Integration CLI to create project, generate a templated app and perform variety of ongoing development tasks such as testing, building, validating and deploying.

To install the `cldk`, open a terminal window and run the following command:

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

To know about all the commands that will be accessible after installing it, please refer to the [detailed documentation of the `cldk`](/docs/chatlayer/cli-tools)

## Create a workspace and scaffold a new app

You develop apps in the context of an App Integration workspace.

To create a new workspace and initial starter app:

Run the command `cldk scaffold` and provide the name *my-first-app,* as shown below:

```shell
cldk scaffold my-first-app
```

After a while it installs the necessary Node.js packages and other dependencies.

The CLI creates a new workspace and a simple app where you can fill in your code.

Once the above command is run, you should have following directory structure:

```shell
apps
  my-first-app
    README.md
    index.js
    package.json
```

Navigate to the app directory and run the following command:

```shell
npm install
```

This installs the required dependencies.