Snips Manager
Project description
# Snips Manager
[![Build Status](https://travis-ci.org/snipsco/snipsmanager.svg)](https://travis-ci.org/snipsco/snipsmanager)
[![PyPi](https://img.shields.io/pypi/v/snipsmanager.svg)](https://pypi.python.org/pypi/snipsmanager)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/snipsco/snipsmanager/master/LICENSE.txt)
The Snips Manager is a tool for easily setting up and managing a [Snips](https://www.snips.ai) assistant.
A single configuration file, the [Snipsfile](https://github.com/snipsco/snipsmanager/wiki/The-Snipsfile), is required to create a Snips assistant. In it, you specify:
- The URL of your assistant model, as created in the [Snips Console](https://console.snips.ai)
- The [lambdas](https://github.com/snipsco/snipsmanager/wiki/Creating-a-Lambda) you want to install
- Bindings between intents and lambdas
- If required, additional parameters for your lambdas, such as an API key or the address of a lamp
- Various configuration parameters, such as language and logging preferences.
Check out [Awesome Snips](https://github.com/snipsco/awesome-snips), a curated list of Snips assistants, lambdas and other resources to get you started.
## Installation
### Debian package
Snips Manager is available as an `apt-get` package. To install it, run the following:
```sh
$ sudo apt-get update
$ sudo apt-get install -y dirmngr
$ sudo bash -c 'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
$ sudo apt-get update
$ sudo apt-get install -y snipsmanager
```
### Python package
Snips Manager also comes as a `pip` package. This however requires installing a few dependencies beforehand. Start by running:
```sh
$ sudo apt-get update
$ sudo apt-get install python-pip libsdl-mixer1.2 libusb-1.0 \
python-pyaudio libsdl1.2-dev cython cython3 libudev-dev \
python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev \
libsdl-ttf2.0-dev libsmpeg-dev python-numpy libportmidi-dev \
libswscale-dev libavformat-dev libavcodec-dev \
portaudio19-dev nodejs build-essential -y
```
Next, create a Python virtual environment to avoid conflicts with existing dependencies, and to be able to run Snips Manager without root privileges:
```sh
$ sudo pip install --upgrade virtualenv
$ virtualenv --python=/usr/bin/python2.7 snips
$ source snips/bin/activate
(snips) $ pip install pip --upgrade
```
You may replace `snips` with any name for your virtual environment.
We are ready to install the `snipsmanager` package:
```sh
(snips) $ pip install snipsmanager
```
## macOS
On macOS, Snips Manager is also available as a `pip` package. To install, Portaudio, Pyaudio and SDL are needed:
```sh
$ sudo easy_install pip
$ brew install portaudio
$ brew install sdl
$ pip install --global-option='build_ext' \
--global-option='-I/usr/local/include' \
--global-option='-L/usr/local/lib' pyaudio
```
Next, like with Raspbian, we create a Python virtual environment in which Snips Manager will be run:
```sh
$ sudo pip install --upgrade virtualenv
$ virtualenv --python=/usr/bin/python2.7 snips
$ source snips/bin/activate
(snips) $ pip install pip --upgrade
```
Snips Manager can now be installed:
```sh
(snips) $ pip install snipsmanager
```
## Usage
### Creating the Snipsfile
Start your project by creating a `Snipsfile`, which is where all the configuration is set. This is a simple text file, adhering to the [YAML](https://en.wikipedia.org/wiki/YAML) format. Here is a basic configuration:
```yaml
assistant_url: <YOUR ASSISTANT URL>
default_location: Paris,fr
skills:
- package_name: snipshue
class_name: SnipsHue
url: https://github.com/snipsco/snips-skill-hue
params:
hostname: <PHILIPS HUE IP>
username: <PHILIPS HUE USERNAME>
light_ids: [1, 2, 3, 4, 5, 6]
intents:
- intent: ActivateLightColor
action: "turn_on"
- intent: DeactivateObject
action: "turn_off"
```
For further explanations and examples, check out our [Snipsfile Wiki](https://github.com/snipsco/snipsmanager/wiki/The-Snipsfile).
### Installing the lambdas
Next, setup the assistant by running the `install` command:
```sh
$ snipsmanager install
```
The `snipsmanager` service will automatically start on boot. You can also start it manually by running:
```sh
$ snipsmanager run
```
## Contributing
Please see the [Contribution Guidelines](https://github.com/snipsco/snipsmanager/blob/master/CONTRIBUTING.md).
## Copyright
This skill is provided by [Snips](https://www.snips.ai) as Open Source software. See [LICENSE.txt](https://github.com/snipsco/snipsmanager/blob/master/LICENSE.txt) for more information.
[![Build Status](https://travis-ci.org/snipsco/snipsmanager.svg)](https://travis-ci.org/snipsco/snipsmanager)
[![PyPi](https://img.shields.io/pypi/v/snipsmanager.svg)](https://pypi.python.org/pypi/snipsmanager)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/snipsco/snipsmanager/master/LICENSE.txt)
The Snips Manager is a tool for easily setting up and managing a [Snips](https://www.snips.ai) assistant.
A single configuration file, the [Snipsfile](https://github.com/snipsco/snipsmanager/wiki/The-Snipsfile), is required to create a Snips assistant. In it, you specify:
- The URL of your assistant model, as created in the [Snips Console](https://console.snips.ai)
- The [lambdas](https://github.com/snipsco/snipsmanager/wiki/Creating-a-Lambda) you want to install
- Bindings between intents and lambdas
- If required, additional parameters for your lambdas, such as an API key or the address of a lamp
- Various configuration parameters, such as language and logging preferences.
Check out [Awesome Snips](https://github.com/snipsco/awesome-snips), a curated list of Snips assistants, lambdas and other resources to get you started.
## Installation
### Debian package
Snips Manager is available as an `apt-get` package. To install it, run the following:
```sh
$ sudo apt-get update
$ sudo apt-get install -y dirmngr
$ sudo bash -c 'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
$ sudo apt-get update
$ sudo apt-get install -y snipsmanager
```
### Python package
Snips Manager also comes as a `pip` package. This however requires installing a few dependencies beforehand. Start by running:
```sh
$ sudo apt-get update
$ sudo apt-get install python-pip libsdl-mixer1.2 libusb-1.0 \
python-pyaudio libsdl1.2-dev cython cython3 libudev-dev \
python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev \
libsdl-ttf2.0-dev libsmpeg-dev python-numpy libportmidi-dev \
libswscale-dev libavformat-dev libavcodec-dev \
portaudio19-dev nodejs build-essential -y
```
Next, create a Python virtual environment to avoid conflicts with existing dependencies, and to be able to run Snips Manager without root privileges:
```sh
$ sudo pip install --upgrade virtualenv
$ virtualenv --python=/usr/bin/python2.7 snips
$ source snips/bin/activate
(snips) $ pip install pip --upgrade
```
You may replace `snips` with any name for your virtual environment.
We are ready to install the `snipsmanager` package:
```sh
(snips) $ pip install snipsmanager
```
## macOS
On macOS, Snips Manager is also available as a `pip` package. To install, Portaudio, Pyaudio and SDL are needed:
```sh
$ sudo easy_install pip
$ brew install portaudio
$ brew install sdl
$ pip install --global-option='build_ext' \
--global-option='-I/usr/local/include' \
--global-option='-L/usr/local/lib' pyaudio
```
Next, like with Raspbian, we create a Python virtual environment in which Snips Manager will be run:
```sh
$ sudo pip install --upgrade virtualenv
$ virtualenv --python=/usr/bin/python2.7 snips
$ source snips/bin/activate
(snips) $ pip install pip --upgrade
```
Snips Manager can now be installed:
```sh
(snips) $ pip install snipsmanager
```
## Usage
### Creating the Snipsfile
Start your project by creating a `Snipsfile`, which is where all the configuration is set. This is a simple text file, adhering to the [YAML](https://en.wikipedia.org/wiki/YAML) format. Here is a basic configuration:
```yaml
assistant_url: <YOUR ASSISTANT URL>
default_location: Paris,fr
skills:
- package_name: snipshue
class_name: SnipsHue
url: https://github.com/snipsco/snips-skill-hue
params:
hostname: <PHILIPS HUE IP>
username: <PHILIPS HUE USERNAME>
light_ids: [1, 2, 3, 4, 5, 6]
intents:
- intent: ActivateLightColor
action: "turn_on"
- intent: DeactivateObject
action: "turn_off"
```
For further explanations and examples, check out our [Snipsfile Wiki](https://github.com/snipsco/snipsmanager/wiki/The-Snipsfile).
### Installing the lambdas
Next, setup the assistant by running the `install` command:
```sh
$ snipsmanager install
```
The `snipsmanager` service will automatically start on boot. You can also start it manually by running:
```sh
$ snipsmanager run
```
## Contributing
Please see the [Contribution Guidelines](https://github.com/snipsco/snipsmanager/blob/master/CONTRIBUTING.md).
## Copyright
This skill is provided by [Snips](https://www.snips.ai) as Open Source software. See [LICENSE.txt](https://github.com/snipsco/snipsmanager/blob/master/LICENSE.txt) for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snipsmanager-0.1.6.42.tar.gz
(34.7 kB
view details)
Built Distributions
snipsmanager-0.1.6.42-py2.7.egg
(118.9 kB
view details)
File details
Details for the file snipsmanager-0.1.6.42.tar.gz
.
File metadata
- Download URL: snipsmanager-0.1.6.42.tar.gz
- Upload date:
- Size: 34.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b00fe9aea645791d8fe3978de139dc7b391378784699a78d9f7e4c5889e2351 |
|
MD5 | 403d34c2df23b2c982409aa5e1bfede6 |
|
BLAKE2b-256 | 2b154fa49e4f676aa1c34f36a16974e1ee2eb1c7a821e4cb8f7856f59ee2b12c |
File details
Details for the file snipsmanager-0.1.6.42-py2.py3-none-any.whl
.
File metadata
- Download URL: snipsmanager-0.1.6.42-py2.py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e3e3b5df312c3fedbd821e1d88c389e985d115ecf36e7a57d6247e6dd1cc5b6 |
|
MD5 | 2e2e8805c32621ab4d4896d61cba6aa8 |
|
BLAKE2b-256 | 955bb078940621bd9fc9a50bff33ca3bffb4c753e653f8165af17aef91acb613 |
File details
Details for the file snipsmanager-0.1.6.42-py2.7.egg
.
File metadata
- Download URL: snipsmanager-0.1.6.42-py2.7.egg
- Upload date:
- Size: 118.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 583eb2e246541a49ebe6a06ba11734279f81df9075c7221cd9f5693f9a620010 |
|
MD5 | 962f94ef2f5d3f1f5e228a6ae50330d0 |
|
BLAKE2b-256 | a96111bba140afda3a0305fa4b8969c3c6595f2feea7dd4dd095d4ab86cea246 |