Return to site

Alexa Cli Mac

broken image


  1. Alexa Setup On Mac
  2. Download Alexa App For Mac
  3. Alexa Clinic

npm uninstall -g ask-cli-x // in case you still have the beta version installed, no longer used npm uninstall -g ask-cli // this will unistall your current ask-cli but won't delete your cli configuration npm install -g ask-cli@1.7.23 // this will install your ask-cli as the latest v1 version (1.7.23) git clone git@github.com:alexa. To utilize Amazon's Alexa routines for a smart home, you need one of Amazon's Echo devices such as the Echo, Echo Dot, Echo Show 5, Echo Plus, or the recent addition, Echo Spot.

My latest project includes integration with Amazon's Alexa voice service. My coworker Jordan already wrote an excellent post on how to get started writing your own Alexa Custom Skill. Amazon's API makes it relatively easy to develop a new Skill, and with a number of languages to choose from (Python, Node.js, Java, C#, etc), developers can create a simple Skill in a weekend.

  • The web service receives requests from Alexa voice service in the form of intents and slots. It processes the intents and publishes messages to PubNub network. You can carry out these steps on your host machine running either Linux / Windows / Mac. It is easier to work with command line interface when using Heroku.
  • Some commands are fire and forget and have no verbal response - such as 'Alexa, turn TV on.' I guess what I am saying, to get to the point, is that if your web service is on a private network and not accessible outside of your network the Amazon server cannot call your web service.
  • Build for voice with the Alexa Skills Kit (ASK), a collection of self-service APIs and tools for making Alexa skills. Skills are like apps for Alexa, enabling customers to engage with your content or services naturally with voice.

With longer development times and iterative updates to our Skill's functionality, we decided to find a way to auto-deploy our Lambda code with each Git commit.

Note: this post was originally titled ‘Deploying your Alexa Skill' and has been changed. Alexa Skills have two parts: the skill itself (consisting of a name, logo, intent schema, sample utterances, etc.), and code that executes commands based on the incoming user input. These two parts are managed separately. While you can choose to host this code by yourself (using Heroku, for example), Amazon makes it easy to host your code with Amazon Lambda, and simplifies the authentication process for you.

This post is about deploying to Amazon Lambda. Amazon does not provide a way to auto-deploy to the Alexa Skill itself. However, because that content is relatively static (with the name, logo, intents, and utterances set up at the beginning of our development cycle), I haven't had a need to repeatedly change the Alexa Skill, only the Lambda code.

1. Install AWS CLI

First, you will need to install the Amazon Web Services command line interface (AWS CLI).

For Mac and Unix users, you will need Pip and Python installed. Then:

Note: if you get an error regarding `six` (an issue in El Capitan), use --ignore-installed option.

Alternatively, if you use Homebrew:

To test if your installation was successful, type:

For Windows, installers are available here.

2. Configure AWS CLI

Next, you will need to configure AWS CLI so it has permission to access and update your Alexa Skill code. You will need an Access Key and Secret Access Key, which can be found in the AWS Lambda portal. After you have logged in, click your name in the upper right-hand corner and select 'My Security Credentials' from the dropdown menu.

Click 'Access Keys' to get your AWS Access Key ID. Your AWS Secret Access Key cannot be retrieved from this page. If you previously created a AWS Secret Access Key, you should have downloaded a file with both the Access Key ID and Secret Access Key. If you don't have a Secret Access Key, or you have lost yours, you can create a new one on this page. While you're here, take note of your region name as well.

Next, open up a command line and type:

Raw power 2 1 320. This command is interactive, and it will let you input each of the following pieces of information:

3. Deploy Your Updates

Once you have updates to your code, open up the command line and navigate to the directory where your Alexa Skill code is. Note: this assumes that you have already manually deployed your code through the AWS Lambda portal when you initially set up your Skill.

In the photo above, the name of my Skill is AlexaTest, and the name of my handler is lambda_function.

You will first need to zip up your directory. Instal play store di laptop. You can do this from the command line if you'd like:

Alexa Cli Mac

Here, I am zipping my file into a zipped directory with lambda_function as the name. It is important that this name matches the handler that I set up in the AWS Lambda portal. We used Python for our Alexa Skill, so all of our code is in the lambda_function.py file.

Note: -r tells zip to recurse into directories, and -X tells zip to exclude extra file attributes. https://tufeamisti1975.mystrikingly.com/blog/video-editing-software-free-download-mac-os-x.

Let's push our (zipped) changes to AWS Lambda using the AWS CLI: http://cnswmt.xtgem.com/Blog/__xtblog_entry/19179142-hydro-flame-fa-7916-manual#xt_blog.

The function name needs to match my Skill name (Alexa Test), and again, I'm using lambda_function.zip. I also need the fileb:// prefix.

Go to the AWS Lambda Portal to see if your code was updated.

Alexa Setup On Mac

If something went wrong, double-check your Skill and handler names, and make sure that the zip file contains the appropriate files.

4. Include Libraries

Often, you will want to include a library in your deployment. We needed to include a library to support JWT tokens. We decided to put this library in a folder called 'deployment-package,' along with the Python file.

Once again, we'll zip up our project files. Here, we're navigating into the directory where the project files live and zipping them into a directory called lambda_function.zip (one directory level higher). The * grabs all the files in the deployment-package directory.

Putting this together, I have:

The parenthesis around the first line denote a subshell. In this case, it means that I don't need a cd . before I make my aws call.

5. Add to Your Deployment Workflow

Download Alexa App For Mac

Alexa Cli Mac

Here, I am zipping my file into a zipped directory with lambda_function as the name. It is important that this name matches the handler that I set up in the AWS Lambda portal. We used Python for our Alexa Skill, so all of our code is in the lambda_function.py file.

Note: -r tells zip to recurse into directories, and -X tells zip to exclude extra file attributes. https://tufeamisti1975.mystrikingly.com/blog/video-editing-software-free-download-mac-os-x.

Let's push our (zipped) changes to AWS Lambda using the AWS CLI: http://cnswmt.xtgem.com/Blog/__xtblog_entry/19179142-hydro-flame-fa-7916-manual#xt_blog.

The function name needs to match my Skill name (Alexa Test), and again, I'm using lambda_function.zip. I also need the fileb:// prefix.

Go to the AWS Lambda Portal to see if your code was updated.

Alexa Setup On Mac

If something went wrong, double-check your Skill and handler names, and make sure that the zip file contains the appropriate files.

4. Include Libraries

Often, you will want to include a library in your deployment. We needed to include a library to support JWT tokens. We decided to put this library in a folder called 'deployment-package,' along with the Python file.

Once again, we'll zip up our project files. Here, we're navigating into the directory where the project files live and zipping them into a directory called lambda_function.zip (one directory level higher). The * grabs all the files in the deployment-package directory.

Putting this together, I have:

The parenthesis around the first line denote a subshell. In this case, it means that I don't need a cd . before I make my aws call.

5. Add to Your Deployment Workflow

Download Alexa App For Mac

Lastly, you can turn these two lines into a script. We are using CircleCI for this project, and we altered our circle.yml file to execute our deployment script after every push to master.

Alexa Clinic

or as a Git hook.





broken image