The Alexa Skills Kit Command Line Interface (ASK CLI) is a tool that you can use to manage your Alexa skills and related resources, such as AWS Lambda functions. With the ASK CLI, you have access to the Skill Management API, which enables you to manage Alexa skills programmatically from the command line.
Before you install the ASK CLI, make sure you have the following prerequisites:
npm
, which comes with Node.js. The ASK CLI requires Node.js version 14 or higher, but we recommend that you use the current release or active LTS version of Node.js. To install or update your version of Node.js, refer to the Node.js downloads page. To check your version of Node.js, open a command prompt, then type node --version
.If you want to be able to create
Alexa-hosted skillsby using the ASK CLI, you must install Git.
If you use AWS Lambda to host your skill's backend logic, then you need AWS credentials. Make sure that your AWS credentials are set up, with the appropriate permissions, on the computer to which you are installing the ASK CLI. For more information, see Create AWS credentials.
If you are not using AWS Lambda, you may point skills to your own endpoint, while still using ASK CLI to manage your skill's model.
Step 3: Install and initialize the ASK CLIUse npm
to install the ASK CLI.
On older versions of Node.js, the ASK CLI requires the
windows-build-toolspackage, which newer versions of Node.js include. To install windows-build-tools, first open PowerShell with the
Run as Administratoroption, and then type
npm install -g --production windows-build-tools
.
To install the ASK CLI:
sudo
.Open a command prompt, then type npm install -g ask-cli
.
If you only use
Alexa-hosted skills, you don't need to link an AWS account during ASK CLI setup.
If you already have the ASK CLI installed and want to update to the latest version, install it in the same way as a new user.
The first time you use the ASK CLI, you must use the ask configure
command to initialize the ASK CLI with your Amazon and AWS credentials. For more information, see configure command. The ask configure
command prompts you to name your ASK profile, choose the AWS profile to use, and then opens a browser so you can sign in to your Amazon developer account. If you're on a computer without a browser installed, you can use the ask configure --no-browser
command to complete initialization. After the initialization is complete, you can use ASK CLI to create or manage your skill.
By default, the ASK CLI transmits telemetry data in the background. Telemetry is the automated collection of usage statistics, systems data, and error logs. This information is helpful in diagnosing issues, improving features, and developing new products and services. You can opt out of telemetry at any time. For details, see
Opt Out of ASK CLI Telemetry.
Step 4: Use the ASK CLI commands to manage your skillUse the ASK CLI commands to manage your skill. For example, you can do the following:
Use the ask new command to create a new skill project from a template. The newly created skill project folder contains all the necessary files to deploy a skill, with only minimal changes. For details, see Create a new skill project.
Use the ask deploy command in your skill project directory to deploy your skill to your developer account. If you have your AWS credentials set up and your skill is configured to use AWS Lambda, this command automatically deploys your skill code. For details, see Deploy a skill project to the development stage.
If you are building your skill, use the ask run command to start a debugging session to test your skill locally. Then use the ask dialog to send requests to your skill locally. For details and prerequisites, see Test your skill locally.
Step 6: Test your skillThe ask deploy command automatically enables your skill for testing. If your skill is already deployed, use the ask dialog command to send requests to your deployed skill. For details, see Test your skill.
TroubleshootingIf you have problems with the ASK CLI, review the following troubleshooting solutions.
Issue: No installation privileges SymptomsWhen you try to install the ASK CLI, you encounter an installation privilege error.
Try thisOn Windows, start the command prompt with administrator privileges. Although this error rarely occurs on Mac and Linux systems, we recommend using the sudo
command.
When you call ask deploy
, you encounter an error regarding your AWS credentials. For example, if there are multiple AWS profiles and you select a profile that doesn't have AWS credentials set up with ask init
, you might get the following error message.
[code] [Error]: Cannot find the environment variable: AWS_ACCESS_KEY_ID
This error occurs because your AWS credentials aren't set up correctly in your AWS profile. Set the appropriate profile by using the ask init
command again.
To view the config file, go to the following file:
When you attempt to install the ASK CLI, the installation process can't find your vendor ID.
Try thisThis error occurs when the developer account information is insufficient. Visit your developer account settings and make sure that your account settings include your phone number and credit card information.
Note: If you create a developer account or Amazon account on amazon.com
, you have a US account. If you create skills for Japan, you must have an amazon.co.jp account
, so be sure to create an account on amazon.co.jp
.
The ASK CLI reports that it can't create or clone a Lambda function.
Try thisThis error occurs when the AWS account information is insufficient or the AWS Identity and Access Management (IAM) policy isn't set up correctly. To see your AWS account settings, go to Account. For details about using IAM policies with the ASK CLI, see Manage Credentials with the ASK CLI.
Last updated: Jan 26, 2024
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4