               open "http://www.lessthan3.com/#{slug}?dev=1"
             ), 3000
 
-  # authenticate your user
-  when 'login'
-    login true, (config) ->
-      exit JSON.stringify user, null, 2 if config.user
-      exit 'not logged in. try "dobi login"'
-
-  # open a site
-  when 'open'
-    url = 'http://www.lessthan3.com'
-    url += "/#{arg}" for arg in args
-    open url
-    exit()
-
-  # run a development server
-  when 'run'
-    workspace = getWorkspacePathSync()
-    exit 'must be in a workspace to run the server' unless workspace
-
-    # dependencies
-    connect = require 'connect'
-    express = require 'express'
-    dobi = require './server'
-    pkg = require path.join '..', 'package'
-
-    # configuration
-    app = express()
-    app.use express.logger '[:date] :status :method :url'
-    app.use connect.urlencoded()
-    app.use connect.json()
-    app.use express.methodOverride()
-    app.use express.cookieParser()
-    app.use dobi {
-      pkg_dir: path.join workspace, 'pkg'
-    }
-    app.use app.router
-    app.use express.errorHandler {dumpExceptions: true, showStack: true}
-
-    # listen
-    app.listen pkg.config.port
-    log "listening: #{pkg.config.port}"
 
   # daemonize a development server
   when 'start'

      user = config?.user
      exit "please login first: 'dobi login'" unless user

      # bootstrap the project
      source = path.join __dirname, '..', 'bootstrap', type
      workspace = getWorkspacePathSync()
      exit 'must be in a workspace to create a package' unless workspace

        exit 'failed to create pkg directory' if err
        exit "workspace successfully created at: #{CWD}"

  # authenticate your user
  when 'login'
    login true, (config) ->
      exit JSON.stringify user, null, 2 if config.user
      exit 'not logged in. try "dobi login"'

  # open a site
  when 'open'
    url = 'http://www.lessthan3.com'
    url += "/#{arg}" for arg in args
    open url
    exit()

  # run a development server
  when 'run'
    workspace = getWorkspacePathSync()
    exit 'must be in a workspace to run the server' unless workspace

    # dependencies
    connect = require 'connect'
    express = require 'express'
    dobi = require './server'
    pkg = require path.join '..', 'package'

    # configuration
    app = express()
    app.use express.logger '[:date] :status :method :url'
    app.use connect.urlencoded()
    app.use connect.json()
    app.use express.methodOverride()
    app.use express.cookieParser()
    app.use dobi {
      pkg_dir: path.join workspace, 'pkg'
    }
    app.use app.router
    app.use express.errorHandler {dumpExceptions: true, showStack: true}

    # listen
    app.listen pkg.config.port
    log "listening: #{pkg.config.port}"

  # setup a site using your app
  when 'setup'
    [id, version] = args[0].split '@'
    slug = args[1]

