   parseOptions: =>
     commander
       .option '-s, --server <host[:port]>', 'Meshblu host'
+      .option '-t, --type <device:type>', 'Device type'
       .parse process.argv
 
   parseConfig: =>


    {hostname, port} = url.parse server
    port ?= 80
    {server: hostname, port: port}

  run: =>
    @parseOptions()

    @conn.on 'notReady', @onReady

  onReady: (credentials) =>
    @conn.register {type: @config.type}, (credentials) =>
      @config.uuid = credentials.uuid
      @config.token = credentials.token
      console.log JSON.stringify(@config, null, 2)
