https://github.com/skierkowski/alexa-skill
A Ruby based DSL to create new Alexa Skills
https://github.com/skierkowski/alexa-skill
Last synced: about 1 year ago
JSON representation
A Ruby based DSL to create new Alexa Skills
- Host: GitHub
- URL: https://github.com/skierkowski/alexa-skill
- Owner: skierkowski
- Created: 2016-06-29T00:09:51.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-11T07:18:57.000Z (about 10 years ago)
- Last Synced: 2025-07-14T11:01:10.491Z (about 1 year ago)
- Language: Ruby
- Size: 8.79 KB
- Stars: 8
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://codeclimate.com/github/skierkowski/alexa-skill)
[](https://gemnasium.com/github.com/skierkowski/alexa-skill)
# Alexa Skill
A Ruby based DSL to create new Alexa Skills
First, install the gem
```bash
gem install alexa-skill
```
Now we'll create a simple hello world app
**app.rb**
```ruby
require 'alexa-skill/app'
intent 'MyApp' do
utterance 'my name is {name}'
slot 'name', ['michelle', 'rich', 'stacie', 'tim', 'emma']
respond do |slots|
"Hi, #{slots['name']}"
end
end
```
This sets up Rackup to run the app, just like running a Sinatra app
**config.ru**
```ruby
require './app'
require 'alexa-skill/server'
run AlexaSkill::Server
```
Now we can start the server
```bash
rackup
```
Now we can configure the server in the Alexa Developer Portal.
```bash
curl http://localhost:9292/utterances.txt
curl http://localhost:9292/schema.json
curl http://localhost:9292/types.txt?type=LIST_OF_NAME
```