       exit "error authenticating" if err
       log 'connected'
       next user, db
- 
+
 exit = (msg) ->
   log msg if msg
   process.exit()

          # write to file
          name = "backup-#{slug}-#{Date.now()}.cson"
          fs.writeFileSync path.join(CWD, name), data
          
          # done
          exit "backup complete: #{name}"



  # check your authentication status
  when 'whoami'
    login ({user}) ->
      exit JSON.stringify user, null, 2 if user
      exit 'not logged in. try "dobi login"'

  # invalid command
