 
     latestVersion
 
+  getHostedGitInfo: (name) ->
+    hostedGitInfo.fromUrl(name)
+
+  clone: (url, targetDir, callback) =>
+    @spawn 'git', ['clone', url, targetDir], {streaming: true}, callback
+
+  installGitPackage: (packageInfo, targetDir, callback) =>
+    if packageInfo.default is 'sshurl'
+      url = packageInfo.toString()
+      @clone url, targetDir, callback
+    else if packageInfo.default is 'https'
+      @clone name, targetDir, callback
+    else if packageInfo.default is 'shortcut'
+      url = packageInfo.https().replace(/^git\+https:/, "https:")
+      @clone url, targetDir, (error) =>
+        if error
+          # more error checking to make sure failure is because of protocol
+          url = packageInfo.sshurl()
+          @clone url, targetDir, callback
+        else
+          callback()
+
   run: (options) ->
     {callback} = options
     options = @parseOptions(options.commandArgs)

  constructor: ->
    @atomDirectory = config.getAtomDirectory()
    @atomPackagesDirectory = path.join(@atomDirectory, 'packages')
    @atomNodeDirectory = path.join(@atomDirectory, '.node-gyp')
    @atomNpmPath = require.resolve('npm/bin/npm-cli')
    @atomNodeGypPath = require.resolve('npm/node_modules/node-gyp/bin/node-gyp')

      else
        callback("#{stdout}\n#{stderr}")

  installModule: (options, pack, modulePath, destination=@atomPackagesDirectory, callback) ->
    installArgs = ['--globalconfig', config.getGlobalConfigPath(), '--userconfig', config.getUserConfigPath(), 'install']
    installArgs.push(modulePath)
    installArgs.push("--target=#{@electronVersion}")
