Quick Start Alexa Skills Kit Command Line Interface (ASK CLI)
The ASK Command Line Interface (ASK CLI) is a tool for you to manage your Alexa skills and related AWS Lambda functions. With ASK CLI, you have access to the Skill Management API, which allows you to manage Alexa skills programmatically from the command line.
To see a video demonstrating the use of ASK CLI, see ASK CLI Setup on YouTube.
- Step 1: Prerequisites for Using ASK CLI
- Step 2: Install and Initialize ASK CLI
- Step 3: Use ASK CLI Commands to Manage Your Skill
- Step 4: Test Your Skill
Step 1: Prerequisites for Using ASK CLI
- An Amazon developer account
Node.js 4.5 or greater and Node Package Manager (npm), which installs with Node.js. To check the version of node.js, open a command prompt and type the following:
$ node --version
To install or update your version of Node.js, refer to the Node.js downloads page.
If you plan to use AWS Lambda to host your skill’s business logic, you need an AWS account. Ensure that you have AWS credentials set up with the appropriate permissions on the computer to which you are installing ASK CLI, as described in Set Up Credentials for an Amazon Web Services (AWS) Account.
Step 2: Install and Initialize ASK CLI
To install ASK CLI:
Use npm to install ASK CLI.
$ npm install -g ask-cli
If you are using Linux, the installation may require
$ sudo npm install -g ask-cli
To initialize ASK CLI:
The first time you use ASK CLI, you must call the
init command to initialize the tool with your Amazon developer account credentials. For more information, see init command.
$ ask init
You will be prompted to name your profile (
default by default), choose the AWS profile to use, and to log in to your Amazon developer account. Once the initialization is complete, you can use ASK CLI to manage your skill.
Step 3: Use ASK CLI Commands to Manage Your Skill
These commands provide basic functionality for managing skills. To see all of the commands available in ASK CLI, refer to the ASK CLI Reference.
ask new: Using this command you can create a new skill project from the built-in “Hello World” sample or from one of the supported open source templates by using the
--template option. The newly created skill project folder will contain all necessary files to deploy it with minimal changes. For more information, see new command.
ask deploy [--no-wait]: Using this command inside the skill project directory will deploy your skill to your developer account. If you have your AWS credentials set up and skill configured to use AWS Lambda, this command will automatically deploy your code as well,. For more information, see deploy command.
ask clone [<-s|--skill-id <skill Id>]: Use this command to create a local skill project directory from an existing skill. This command will download the entirety of your skill, including the skill manifest, interaction model, and skill code (if your skill uses AWS Lambda). After cloning, you can make changes locally then deploy them easily using the
ask deploy command. For more information, see clone command.
Step 4: Test Your Skill
ask deploy command automatically enables your deployed skill, so you can immediately start testing it on your device or using the
ask simulate command. You can also use the service simulator on the developer portal.