Vinli CLI: /bin/bash your Connected Car

Since Vinli started shipping, we've seen a constant and sizable growth in developers interested in integrating their app or spinning up a new project that leverages the platform. Our docs and SDKs have stood the test thus far (thanks to everyone who's given feedback or reported issues!!), but we are always looking for ways to make getting started even easier and to get developer to the data faster.

That's why we're super excited to announce the launch of vinli-cli, our very own command line tool to help developers with:

  • Setting up Vinli developer accounts and managing their apps
  • Working with the Vinli Platform APIs directly
  • Testing with Virtual Vinli (instead of whipping around the block every time there's a new build)

Here's how to get started on Vinli CLI.

Installation

You will need Node.js (version 4 or greater) and npm.

> npm install -g vinli-cli

This will create a global command vinli which you can run from anywhere. To update in the future, just run the same command again.

Signup

Feel free to skip this if you already have a Vinli Developer account.

> vinli dev signup

You'll be prompted for some info (e.g., name, email, pw) and then you'll get a confirmation email. Make sure to confirm your account!

Create an app

You can create your app right from vinli-cli using:

> vinli app create

This will prompt you for all the details you need to create your app.

Set current app

app set-current can be used to specify which app (assuming you have more than 1) is active (either by name or by id).

> vinli app set-current --app "My App" - will ask for dev-portal email and password to find an app with the nearest name.

> vinli app set-current --app 6cbced16-d831-469c-898d-8b83f0f8fd5f - will ask for dev-portal email and password to find the app with the given ID.

> vinli app set current --app d0810cc9-3e78-4411-a6ff-4ebb4a4c0243 --secret xZmuKWEJrTUM66mxeEjan - will set the app credentials directly.

Get a list of your Vinli devices


> vinli device list
┌──────────────────────────────────────┬────────────────┬─────────────────────────────────────────┐
│ ID                                   │ Name           │ Created                                 │
├──────────────────────────────────────┼────────────────┼─────────────────────────────────────────┤
│ fd068ec4-f777-4047-8636-ab66be8a0de2 │ My Device      │ Wed Feb 12 2016 13:47:03 GMT-0600 (CST) │
│ 5310d204-b3ee-4f64-b6c9-3de5416e5b96 │ The Van        │ Thu Feb 17 2016 17:33:05 GMT-0600 (CST) │
└──────────────────────────────────────┴────────────────┴─────────────────────────────────────────┘
                                                                                 Showing 1 - 2 of 2 

Output for almost all commands can be formatted to using --output [format] or -o [format]. Support formats are table (default), json, yaml, or text. Let's use -o to get a list our device list in json format.

> vinli device list -o json
{
  "devices": [
    {
      "id": "fd068ec4-f777-4047-8636-ab66be8a0de2",
      "name": "My Device",
      "chipId": "4009613860F4",
      "createdAt": "2016-02-12T19:47:03.151Z",
      "icon": null
    },
    {
      "id": "5310d204-b3ee-4f64-b6c9-3de5416e5b96",
      "name": "The Van",
      "chipId": "7F473394C884",
      "createdAt": "2016-02-17T23:33:05.702Z",
      "icon": null
    }
  ],
  "meta": {
    "pagination": {
      "total": 2,
      "limit": 10,
      "offset": 0
    }

Keep going!

  • Check out the README
  • Read our blog post about testing your app with vinli-cli and Virtual Vinli