Vielen Dank für Ihren Besuch. Diese Seite ist momentan nur auf Englisch verfügbar. Wir arbeiten an der deutschen Version. Vielen Dank für Ihr Verständnis.

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

  • 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 are using Linux, use nvm (node version manager) to install Node.js and npm to avoid permissions issues. See Using a version manager to install Node.js and npm.

If using a template to create a new skill, git must be installed on your machine. See Installing Git.

Step 2: Set up AWS IAM user (if using AWS Lambda to host your skill)

If you are using AWS Lambda to host your skill's business logic, it is required that you have an AWS account and that you set up an AWS IAM user. Ensure that your AWS credentials are 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.

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. 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.

$ npm install -g ask-cli

After you install ask-cli, 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 4: 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.

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 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 the development stage of 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 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 may diverge as you continue to develop the skill. To compare between the local and remote versions of a project, use diff. To push the local changes to the remote version, use deploy.