Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Amazon Alexa Skill CLI and Management API to Streamline Development

Amazon Alexa Skill CLI and Management API to Streamline Development

This item in japanese

Amazon has announced a new API and command-line tool to make it possible to create, update, test, and submit Alexa skills.

Previously to the introduction of Alexa Skill CLI and Management API, the only option for developers to manager their skills was through the Amazon Skill Developer Portal, which was somewhat cumbersome to use for a number of reasons, such as slow interface, information scattering across several pages, limited editing capabilities, etc. More importantly, using the Developer Portal, developers had to manually execute all steps involved in creating or updating a skill. The Alexa Skill CLI will instead make it possible to automate all those steps using a script or plugging it into a continuous delivery pipeline. According to Amazon, all features of the Alexa Skills Kit are supported, including account linking integration or permission management.

For example, after installing and initializing the Alexa Skills CLI, you can create and deploy a new “Hello World” skill using the commands:

ask new
ask deploy

The ask new command creates two files, skill.json containing the skill’s metadata, and models/en-US.json with a sample interaction model. If a skill uses AWS Lambda, the deploy command will also automatically deploy the skill’s code in addition to updating its metadata and interaction model.

An area that can greatly benefit from the automation possibilities provided by the Alexa Skills CLI is testing skill invocations, which was previously only possible by manually entering each test utterance in the skill simulator provided in the Skill Portal. Using the Alexa Skills CLI, you can test an utterance by running:

ask simulate -t "utterance to test" --skill-id

According to Amazon, the Alexa Skill Management API, which provides the foundations for the Alexa Skills CLI, will open up many possibilities to create new tools that help developers design and build their skills, skipping the manual copy-paste phase that is required when interacting with the Developer Portal.

Finally, the Alexa Skill Management API provides the capability to integrate with out-of-session skill events, including such events as a customer linking their account with a third-party applicationa customer enabling a skill, or disabling it.

Rate this Article