     return msg.send {room: msg.message.user.name}, "Key destroyed!"
 
   robot.respond /tf clone ([^\s]+) ([^\s]+)$/i, (msg) ->
-    unless robot.auth.isAdmin(msg.envelope.user) or robot.auth.hasRole(msg.envelope.user,'tf')
-      return msg.send {room: msg.message.user.name}, "Not authorized.  Missing 'tf' role."
+    unless robot.auth.isAdmin(msg.envelope.user) or robot.auth.hasRole(msg.envelope.user,tfRole)
+      return msg.send {room: msg.message.user.name}, "Not authorized.  Missing #{tfRole} role."
 
     url = msg.match[1]
     projname = msg.match[2].replace /\//, "_"

        msg.send {room: msg.message.user.name}, "stdout:\n```\n#{stdout}\n```"

  robot.respond /tf list(\sprojects)?$/i, (msg) ->
    unless robot.auth.isAdmin(msg.envelope.user) or robot.auth.hasRole(msg.envelope.user,'tf')
      return msg.send {room: msg.message.user.name}, "Not authorized.  Missing 'tf' role."

    dir = []
    for fn in fs.readdirSync(basepath)
      stat = fs.statSync("#{basepath}/#{fn}")
      dir.push fn if stat.isDirectory()

    msg.reply dir.join "\n"

basepath = process.env.HUBOT_TF_BASEPATH || ''
privatekey = basepath + "/hubot-tf.key"
publickey = privatekey + ".pub"
tfName = tfRole = 'tf'

module.exports = (robot) ->

  robot.respond /tf help$/, (msg) ->
    cmds = []
    arr = [
      "#{tfName} create key - create rsa key, for git operations"
      "#{tfName} destroy key - erase key"
      "#{tfName} show key - display public key"
      "#{tfName} clone <repourl> <projectname>"
      "#{tfName} (plan|apply|destroy) <projectname> - tf operations"
    ]

    for str in arr
