@botpress/webchat-cli
v0.2.4
Published
Webchat CLI is a tool to help you build and deploy custom webchat components.
Keywords
Readme
Webchat CLI
Webchat CLI is a tool to help you build and deploy custom webchat components.
Installation
npm install -g @botpress/webchat-cli && npm install -D @bpinternal/zuiUsage
Start by creating a new component:
webchat initYou will be asked to provide a name for your component. Once provided, the CLI will create a new folder with the name of your component containing the following files:
Component.bp.tsx: The main component of your webchat component.schema.ts: The schema of your webchat component properties.styles.css: The styles of your webchat component.
You can now start developing your webchat component. Once you are done, you can build your component by running:
webchat buildand selecting your component from the list.
This will create a Component.bp.js file in your folder. You can now deploy this file to your bot by running:
webchat deployand select your component from the list.
First time deployment
If this is the first time you are deploying a component, you will be asked to:
- provide Personal Access Token (PAT)
- select your workspace
- select your bot
Once you have provided the required information, the CLI will deploy your component to your bot.
Remove a component
webchat removeand select your component from the list.
This will remove the component from your bot.
Logout
webchat logoutThis will logout from your workspace.
