In this step, you will install Sam. Sam is a CLI (Command Line Interface) that you will be using to create, manage and deploy your assistants, to configure your hardware, to view the logs of your assistants on the Raspberry, as well as to run your application locally for quick prototyping.

This part of this tutorial is running from your computer, in the terminal. We assume that you have Node and NPM installed. You can get them from the Node.js website. You need at least Node v7.5.0, check your node version with node -v Your Raspberry Pi must be connected to your network.

Windows users need to additionnaly install Git. You can get it from Git's website.

From a command shell on your local machine, run the following command:

sudo npm install -g snips-sam

You'll be asked to fill your computer password first.

You are now able to run the sam command from your command shell.

Detecting your Raspberry Pi device on the network

Let's try to find nearby Raspberry Pi devices on your network, using the command sam devices:

sam devices
Scanning Raspberry Pi devices on the network...
Found 1 device:
- raspberrypi (192.168.9.2)

If Sam does not find any device, make sure the Raspberry Pi and your computer are on the same network. If you have any problems, check out our Network Setup Guide.

Connecting to your device

Connect to your device (you may use your device IP or hostname, and in the latter case, make sure to append .local to the hostname):

sam connect raspberrypi.local
? Enter username for the device: pi
? Enter password for the device: [hidden]
Connected to raspberrypi.local

You are now connected to your Snips device!

This is not mandantory but if you're curious, you may check at any time the device status with sam status:

sam status
Connected to device raspberrypi.local
OS version ................... Raspbian GNU/Linux 9 (stretch)
Status ....................... Snips Platform not installed
You may install the Snips Platform using sam init
To install specific components, check the help using sam init --help

In the next step, you will install the Snips Platform on the device.