                                         mewbot.logger.error "#{mewbot.name} deploy error : target location [#{Options.deploy}] is not empty"
                                         process.exit 1
                                     else
-                                        mewbot.logger.info "#{mewbot.name} start to deploy at : #{Options.deploy}"
-                                        mewbot.deployer.deployTo Options.deploy,(err)->
-                                            if err
-                                                mewbot.logger.error "#{mewbot.name} deploy error : #{err}"
-                                            else
-                                                mewbot.logger.info "#{mewbot.name} deploy at : #{Options.deploy} success"
+                                        if Options.deployConfig
+                                            Fs.readFile Options.deployConfig,(err,data)->
+                                                if err
+                                                    mewbot.logger.error "#{mewbot.name} deploy at : #{Options.deploy} failed : #{err.toString()}"
+                                                else
+                                                    deployConfig = {}
+                                                    try
+                                                        switch Path.extname(Options.deployConfig)
+                                                            when ".coffee"
+                                                                deployConfig = Coffee.eval(data.toString())
+                                                            when ".js"
+                                                                deployConfig = eval(data.toString())
+                                                            when ".json"
+                                                                deployConfig = JSON.parse(data.toString())
+                                                            else
+                                                                throw new Error("type not supported")
+                                                    catch e
+                                                        mewbot.logger.error "#{mewbot.name} deploy at : #{Options.deploy} failed : #{e.toString()}"
+                                                        process.exit(1)
+                                                    mewbot.logger.info "#{mewbot.name} start to deploy at : #{Options.deploy} , with config : #{JSON.stringify(deployConfig,null,4)}"
+                                                    mewbot.deployer.deployTo Options.deploy,deployConfig,(err)->
+                                                        if err
+                                                            mewbot.logger.error "#{mewbot.name} deploy error : #{err}"
+                                                        else
+                                                            mewbot.logger.info "#{mewbot.name} deploy at : #{Options.deploy} success"
+                                        else
+                                            mewbot.logger.info "#{mewbot.name} start to deploy at : #{Options.deploy}"
+                                            mewbot.deployer.deployTo Options.deploy,(err)->
+                                                if err
+                                                    mewbot.logger.error "#{mewbot.name} deploy error : #{err}"
+                                                else
+                                                    mewbot.logger.info "#{mewbot.name} deploy at : #{Options.deploy} success"
                             else
                                 mewbot.logger.error "#{mewbot.name} deploy error : target location [#{Options.deploy}] is not a directory"
                                 process.exit 1

Parser.on "profile",(opt,value)->
    if value and value.length and /^[a-zA-Z0-9]+$/.test(value)
        Options.profile = value

Parser.on "role",(opt,value)->
    if value and value.length

    build             :     false
    port              :     0
    deploy            :     ""
    deployConfig      :     ""

Parser = new OptParse.OptionParser(Switches)
Parser.banner = "Usage mewbot [options]"
