Serverless Alexa Skills Plugin
Description
Manage your Alexa Skills with Serverless Framework.
Requirements
- Serverless Framework 1.0 or higher
Installation
serverless plugin install --name serverless-alexa-skills
or
npm install serverless-alexa-skills
Setup
Configuration
serverless.yml
provider: name: aws runtime: nodejs6.10plugins: - serverless-alexa-skillscustom: alexa: skills: - id: ${env:YOUR_ALEXA_SKILL_ID} skillManifest: publishingInformation: locales: en-US: name: test2 apis: custom: {} manifestVersion: '1.0' models: en-US: interactionModel: languageModel: invocationName: hello intents: - name: AMAZON.CancelIntent samples: [] - name: AMAZON.HelpIntent samples: [] - name: AMAZON.StopIntent samples: [] - name: HelloWorldIntent samples: - hello - say hello - hello world
Commands
alexa auth
Authenticate with Amazon OAuth2.
- This command creates a local web server to receive OAuth2 authentication redirects. The default port is
9090
. If you want to change the port, please changecustom.alexa.localServerPort
setting.
Note: You must use the 9090 port if use the default security profile. If you want to use another port number, you have to create a custom security profile with "http://127.0.0.0:$YOUR_PORT_NUMBER/cb" as Allow Return URLs.
$ serverless alexa auth -hPlugin: AlexaSkillsalexa auth .................... Authenticate with Amazon OAuth2
alexa create
Create an Alexa Skill.
$ serverless alexa create -hPlugin: AlexaSkillsalexa create .................. Create an Alexa Skill --name / -n (required) ............. Name of the skill --locale / -l (required) ........... First locale of the skill (e.g. "ja-JP", "en-US") --type / -t (required) ............. Type of the skill (e.g. "custom", "smartHome", "video")
alexa delete
Delete an Alexa Skill.
$ serverless alexa delete -hPlugin: AlexaSkillsalexa delete .................. Delete an Alexa Skill --id / -i (required) ............... Skill ID
alexa manifests
List your Alexa Skill Manifests.
$ serverless alexa manifests -hPlugin: AlexaSkillsalexa manifests ............... List your Alexa Skill Manifests
alexa update
Update your Alexa Skill Manifests.
$ serverless alexa update -hPlugin: AlexaSkillsalexa update .................. Update your Alexa Skill Manifests --dryRun / -d ...................... Dry run (Only output the diff)
alexa models
List your Alexa Interaction Models.
$ serverless alexa models -hPlugin: AlexaSkillsalexa models .................. List your Alexa Interaction Models
alexa build
Update and buid your Alexa Interaction Models.
$ serverless alexa build -hPlugin: AlexaSkillsalexa build ................... Update and buid your Alexa Interaction Models --dryRun / -d ...................... Dry run (Only output the diff)
How to use
See: the post of Serverless Blog
Development
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Authors
Created and maintained by Masashi Terui (marcy9114@gmail.com)
License
MIT License (see LICENSE)