     @fork @atomNpmPath, publishArgs, (code, stderr='', stdout='') ->
       if code is 0
         process.stdout.write '\u2713\n'.green
-        options.callback()
+        callback()
       else
         process.stdout.write '\u2717\n'.red
-        options.callback("#{stdout}\n#{stderr}".red)
+        callback("#{stdout}\n#{stderr}".red)
 
   run: (options) ->
-    version = options.commandArgs.shift()
-    if version
+    {callback} = options
+    options = @parseOptions(options)
+
+    if version = options.argv._[0]
       @versionPackage version, (error) =>
         if error?
-          options.callback(error)
+          callback(error)
         else
-          @publishPackage(options)
+          @publishPackage(options, callback)
     else
-      @publishPackage(options)
+      @publishPackage(options, callback)

path = require 'path'
colors = require 'colors'
CSON = require 'season'
config = require './config'
Command = require './command'


        process.stdout.write '\u2717\n'.red
        callback("#{stdout}\n#{stderr}".red)

  publishPackage: (options, callback) ->
    process.stdout.write 'Publishing '
    try
      {name, version} = CSON.readFileSync(CSON.resolve('package')) ? {}
