Quick Start: Alexa Skills Kit Command Line Interface (ASK CLI) Beta

The Alexa Skills Kit Command Line Interface (ASK CLI) is a tool for you to manage your Alexa skills and related resources, such as 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.

Video overview of ASK CLI

Prerequisites for using ASK CLI

Before you install ASK CLI, make sure you have the following prerequisites:

  1. An Amazon developer account. Sign up is free.
  2. Node.js and npm, which comes with Node.js. ASK CLI requires Node.js version 6 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.
  3. Git, for cloning skills from templates in Git repositories. See Installing Git in the Git documentation.

Step 1: BETA: Use ASK CLI to set up your AWS user

You can now use ASK CLI to set up your AWS user.

Set up your AWS user

Step 1: ASK CLI Initialization

  1. Open a command prompt, type the code below, and then press Enter.
ask init

  1. Use the arrow keys to select Create a new profile or overwrite an existing one, and then press Enter.
  2. Follow the prompts to complete the new profile if needed.
  3. Close the web page and return to the command prompt.

Step 2: Associate an AWS Profile with ASK CLI 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 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.

To associate a AWS Profile with ASK CLI

  1. To associate a AWS Profile with ASK CLI type Y, and then press Enter.
  2. Use the arrow keys to select an existing profile or select Create new profile and follow the prompts.
  3. Type a profile name, and then press Enter.
  4. Access Manage Credentials to continue with the profile set up.
  5. Type the AWS Access Key ID, and then press Enter.
  6. Type the AWS Secret Access Key, and then press Enter. A confirmation and your profile information will display.

Step 2: Install and initialize ASK CLI

Use npm to install ASK CLI.

To install 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 sudo.
    1. Open a command prompt, then type npm install -g ask-cli.

If you already have 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 ASK CLI, you must use the ask init command to initialize ASK CLI with your Amazon and AWS credentials. For more information, see init command. The ask init 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 init --no-browser command to complete initialization. After the initialization is complete, you can use ASK CLI to create or manage your skill.

Step 3: Use ASK CLI commands to manage your skill

The following commands provide basic functionality for managing skills. To see all of the commands available in ASK CLI, refer to the ASK CLI Reference.

To set up a skill project with ASK CLI, see Create a new skill project.

To see commands for managing in-skill purchases, see In-Skill Product Command Reference.

ask new
Using this command you can 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 more information, see Create a new skill project.
ask deploy
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 your skill is configured to use AWS Lambda, this command will automatically deploy your skill code as well. For more information, see Deploy a skill project to the development stage.
ask clone
Using this command will create a local skill project directory, then clone an existing skill from the development stage to the local directory. This command downloads all parts of the 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

The 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 Alexa Simulator on the Test page of the developer console.

After a skill is deployed, the local and remote versions might diverge as you continue to develop the skill. To compare between the local and remote versions of a project, use the ask diff command. To push the local changes to the remote version, use ask deploy.

Was this page helpful?

Last updated: Nov 29, 2023