A simple CLI to chat with an Amazon Lex Chatbot - great for developing and debugging! The perfect companion to the Lex Starter Kit.
This guide covers how to use the tool, as well as how to develop for it and extend it.
Install with npm:
npm install -g lex-chatRun it up:
lex-chatAll available bots will be listed, choose the one you want to chat to then chat away!
Run it:
npm startDebug it:
npm run debugPublish it:
npm version patch # or minor/major
git push --follow-tags
npm publishFor extra diagnostics, use the DEBUG environment variable:
DEBUG=lex-chat lex-chatThis will output additional low-level data if needed. This is powered by the powerful debug library.
Some troubleshooting tips for common issues are below.
If you see the following message:
Then the tool cannot find any Lex bots on your AWS account. Make sure the AWS CLI is setup to connect to the correct account. Verify your account with:
aws sts get-caller-identityWhich should show you the current AWS account your configuration is targeting.
If you need to create a bot, try the lex-starter-kit project.
Some notes on key next steps for the big refactor:
- If no bots, show a more helpful interface, possibly link to the lex starter kit? Even offer the option to create one?
- For debugging, when we get an intent back, we can see what the intent is and get the lambda logs
- Show a demo/screenshot with a broken lambda function
- Show bot version in list?

