Getting started
This guide explains how to set up your development environment and how to use the the Chatlayer CLIcldk
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 is helpful but not required.
To install CLI on your local system, you need the following:
- Node.js
App Integration requires version 14 of Node.js.
For more information on installing Node.js, see nodejs.org. If you are unsure what version of
Node.js
runs on your system, runnode -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 package manager. This guide uses the npm client command line interface, which is intalled withNode.js
by default. To check that you have installed the npm client installed, runnpm -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 thecldk
, open a terminal window and run the following command: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
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 commandcldk scaffold
and provide the name my-first-app, as shown below: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:
apps
my-first-app
README.md
index.js
package.json
Navigate to the app directory and run the following command:
npm install
This installs the required dependencies.