npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

alcl

v1.0.5

Published

Command line interface for Alexa Skill Lambda functions with alexa-app

Downloads

8

Readme

alcl - Alexa Lambda CLI

command line interface for Alexa Skill Lambda functions with alexa-app

New Alexa Skills Kit Template: Build a Trivia Skill in under an Hour ... just 17 easy manual steps.

Make some changes, make a zip file, open a browser, get dumped to login form, login, click Lambda, click the function, click Upload, choose a file, click Save. Repeat? Yeah, no.

prerequisites

  • Node.js v4.3.2
  • AWS account (http://docs.aws.amazon.com/lambda/latest/dg/setup.html)
  • AWS CLI
  • AWS CLI profile with permissions:
    • lambda:CreateFunction
    • lambda:CreateEventSourceMapping
    • lambda:UpdateFunctionCode
    • iam:PassRole permissions
  • Lambda execution role

See also:

install

npm install -g alcl

use

create a new skill

alcl init <skillName> -r <lambda_execution_role_ARN> --profile [profile]
  • create package.json, index.js, lambda.js, and .gitignore files
  • install the alexa-app npm package
  • create create-function.json, update-function-code.json, and launch.json config files in the aws subdirectory
  • create a Lambda function named skillName in us-east-1 with aws lambda create-function

skillName is required

lambda_execution_role_ARN is required; format is arn:aws:iam:::role/<role_name>

profile use this AWS CLI profile (optional)

Adding a Alexa Skills Kit event source doesn't seem to be supported through AWS CLI. Set it up manually on https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions/functionName?tab=eventSources

setup config for a skill

alcl setup <skillName>
  • create create-function.json, update-function-code.json, and launch.json config files in the aws subdirectory

Set up config files, but don't create skill template or new Lambda function.

push updated code to AWS

alcl push --profile [profile]
  • zip the contents of the current directory, excluding aws
  • upload the code with aws lambda update-function-code

profile use this AWS CLI profile (optional)

test a Lambda function

alcl test -f [filename] --profile [profile]
  • load request data from filename or aws/launch.json
  • POST request data to Lambda function with aws lambda invoke
  • decode and print log output
  • print function return value

get schema

alcl schema
  • print generated skill schema

There's no API to update the skill schema (why?!). Cut and paste this output into a text box on the Developer Console and click Save.

get utterances

alcl utterances
  • print generated skill utterances

There's no API to update the skill utterances (why?!). Cut and paste this output into a text box on the Developer Console and click Save.

generate utterances

alcl generate-utter <skillName> <action>
  • generate a list of possible utterances for a skill name and action

Generate possible utterances using the supported phrasings in Invoking a Skill with a Specific Request. Use this to explore the list of possible utterances for a skill and action and see which make sense. Remember to quote multi-word skill names and actions.