Quick Start: Alexa Skills Kit Command Line Interface (ASK CLI)
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.
- For an overview of the ASK CLI, see ASK CLI Overview.
- For the ASK CLI command reference, see ASK CLI Command Reference.
Step 1: Prerequisites for using ASK CLI
Before you install the ASK CLI, make sure you have the following prerequisites:
- An Amazon developer account. Sign up is free.
- Node.js and
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
- Git, for cloning skills from templates in Git repositories. See Installing Git in the Git documentation.
Important: If you want to be able to create Alexa-hosted skills by using the ASK CLI, you must install Git.Note: If you install Git for Windows from https://git-scm.com/download/win, make sure to select the Enable symbolic links option during installation.
Step 2: Set up an AWS IAM user
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 CLI
npm to install the ASK CLI.
npm install -g --production windows-build-tools.
To install the ASK CLI:
- Installation might require that you run as an administrator or super user. On Windows, open PowerShell with the Run as Administrator option. On Linux or macOS, use
Open a command prompt, then type
npm install -g ask-cli.Note: 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.
Step 4: Use the ASK CLI commands to manage your skill
Use 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.
Step 5: Test your skill locally
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 skill
The 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.
- Test and Debug Your Skill
- Test your skill in the developer console
- Test Skills in Visual Studio Code
Was this page helpful?
Last updated: Mar 31, 2023