 	permission: 'user'
 	primary: true
 	action: (params, options, done) ->
-		resin = require('resin-sdk-preconfigured')
+		resin = require('resin-sdk').fromSharedOptions()
 		visuals = require('resin-cli-visuals')
 
 		resin.models.application.get(params.name).then (application) ->

	permission: 'user'
	primary: true
	action: (params, options, done) ->
		resin = require('resin-sdk-preconfigured')
		visuals = require('resin-cli-visuals')

		resin.models.application.getAll().then (applications) ->

		.then ->
			return options.type or patterns.selectDeviceType()
		.then (deviceType) ->
			return resin.models.application.create({
				name: params.name
				deviceType
			})
		.then (application) ->
			console.info("Application created: #{application.app_name} (#{application.device_type}, id #{application.id})")
		.nodeify(done)
