Vielen Dank für deinen Besuch. Diese Seite ist nur in Englisch verfügbar.

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

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

Step 1: Prerequisites for using ASK CLI

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

  • An Amazon developer account. Sign up is free.

  • Node.js 4.5 or higher and Node Package Manager (npm), which installs with Node.js. To check your version of Node.js, open a command prompt and type node --version. To install or update your version of Node.js, refer to the Node.js downloads page.

  • Git for cloning skills from templates in Git repositories. See Installing Git in the Git documentation.

Step 2: Set up an AWS IAM user

If you are using AWS Lambda to host your skill's business logic, it's required that you have an AWS account and that you set up an AWS IAM user. Make sure that your AWS credentials are set up, with the appropriate permissions, on the computer to which you are installing ASK CLI, as described in Associate AWS Credentials with ASK CLI.

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 ASK CLI

Use npm to install ASK CLI. Installation might require that you run as an administrator or super user.

To install the Node.js Windows build tools (for Windows users)

npm install -g --production windows-build-tools

To install ASK CLI (on all platforms)

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 call the init command to initialize the tool with your Amazon developer account credentials. For more information, see init command.

ask init

ASK CLI 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 to complete initialization. After the initialization is complete, you can use ASK CLI to manage your skill.

Step 4: 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 5: 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.