Set up the ASK CLI to Use the Alexa Conversations Description Language
To install and configure the Alexa Skills Kit Command-Line Interface (ASK CLI), complete the following steps. Then use the skill tutorial to create an Alexa Conversations skill with the Alexa Conversations Description Language (ACDL).
ask. However, command-line messages might refer to
ask. For ACDL, always use
Before you install and configure the ASK CLI, you must meet the following prerequisites.
Establish the necessary accounts and permissions
- An Amazon developer account. If you don't already have one, go to the ASK Developer Console to create an account.
- An AWS account to host your skill on AWS Lambda. If you don't already have one, go to AWS to create an IAM user account.
Update your existing software
- The latest version of Node.js (version 17.4 or higher)
- Git version control system (version 2.35 or higher)
- Java development environment (version 1.8 or higher)
- The Amazon Web Services Command-Line Interface (AWS CLI).
Uninstall the public version of the ASK CLI (if necessary)
From the command line, run the following command.
npm uninstall -g ask-cli
Install and configure the ASK CLI
Complete the following steps to install and configure the ASK CLI to create skills for Alexa Conversations.
- Install the ASK CLI.
- Configure the ASK CLI.
- (Optional) Install the ACDL syntax highlighter for VS Code.
Step 1: Install the ASK CLI
From the command line, use
npm to install a beta version of the ASK CLI that supports Alexa Conversations.
npm install -g ask-cli-x
Step 2: Configure the ASK CLI
To link the ASK CLI with your Amazon developer account and your AWS account, run the following command.
Configure the ASK CLI
- Choose the default profile or enter a name to create a new profile.
Grant permission to link your AWS profile to your ASK CLI skill.
– Sign in to the AWS Key Management Service (KMS) as an IAM user.
– Choose a symmetric access key. This is a single 256-bit secret encryption key.
(Optional) Step 3: Install the ACDL syntax highlighter for VS Code
If you use Visual Studio (VS) Code and want to use the ACDL syntax highlighter, follow the instructions here. ACDL syntax highlighting is currently available only for VS Code.
Install the ACDL syntax highlighter for VS Code
Make sure you have the latest version of VS Code:
– Open VS Code and click Help.
– Click the update-related option, which might be Check for Updates or Restart to Update.
Install the ASK Toolkit VS Code extension (version 2.10 or higher).
If you've already the extension installed, update it to the latest version.
– Open VS Code and click Code > Preferences > Extensions.
– Search for the Alexa Skills Kit (ASK) toolkit extension.
– Click the gear icon, and then click Install another version > 2.10.
Troubleshooting the ASK CLI installation
If you have trouble installing the ASK CLI, try the following suggestions.
When I try to install the ASK CLI, I get an error similar to the following.
npm ERR! code ENOENT npm ERR! syscall rename npm ERR! path /Users/username/.nvm/versions/node/v17.4.0/lib/node_modules/.staging/ask-cli-e209bd51/node_modules/@babel/generator/node_modules/source-map npm ERR! dest /Users/username/.nvm/versions/node/v17.4.0/lib/node_modules/.staging/source-map-4818842b npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, rename '/Users/username/.nvm/versions/node/v17.4.0/lib/node_modules/.staging/ask-cli-e209bd51/node_modules/@babel/generator/node_modules/source-map' -> '/Users/username/.nvm/versions/node/v17.4.0/lib/node_modules/.staging/source-map-4818842b' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /Users/username/.npm/_logs/2022-02-09T04_38_12_058Z-debug.log
To make sure you have the latest npm package (version 8.5 or higher), run the following command.
$ sudo npm i -g npm
package-lock from your JSON file, run the following commands.
$ rm package-lock.json $ npm i $ sudo npm i -g .
To switch to the last working version of npm, run the following commands.
$ sudo npm i -g email@example.com $ npm -v 8.5.1 $ rm package-lock.json $ npm i $ sudo npm i -g .
Issue: AWS error message
When I try to install the ASK CLI, I get an AWS error message, such as a notice that my account couldn't be linked.
If you receive an AWS error message, log in to your AWS account to check your settings.
- Make sure your skill is linked to an IAM user, not a root user.
- Make sure your access key ID and secret access key match the credentials you entered.
- Check to see if your access keys have expired.
- Check your user configuration to see if you have the necessary policies and permissions.
Issue: Other error message
When I try to install the ASK CLI, I get an error not listed previously.
To make sure you didn't miss anything in the installation, review the general instructions for installing the ASK CLI.