1.0.5 • Published 8 years ago

alcl v1.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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

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.

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago