     msg.send "Checking #{server} for uptime..."
     execCommand msg, command
 
+  robot.respond /knife search long (.*)$/i, (msg) ->
+    query = msg.match[1]
+    command = "knife search #{query}"
+
+    msg.send "Running knife search #{query}"
+    execCommand msg, command
+
+  robot.respond /knife search (.*)$/i, (msg) ->
+    query = msg.match[1]
+    command = "knife search -i #{query}"
+
+    msg.send "Running knife search -i #{query}"
+    execCommand msg, command
+
   robot.respond /converge (.*)$/i, (msg) ->
     server = msg.match[1]
     command = "knife ssh --attribute ipaddress --no-color name:#{server} 'sudo chef-client'"

exec  = require('child_process').exec

execCommand = (msg, cmd) ->
  exec cmd, (error, stdout, stderr) ->
    msg.send error if error
    msg.send stdout
    msg.send stderr if stderr

#   hubot knife node show <name> - chef: Display node run_list et al
#   hubot knife role show <name> - chef: Display role configurations et al
#   hubot knife status - chef: Display status for all nodes
#   hubot knife search <query> - chef: run a knife search with given query
#   hubot knife search long <query> - chef: run a knife search with given query and return ALL attributes
#   hubot node list - chef: Lists all nodes on chef server
#   hubot node show <node> - chef: Get knife status of all nodes
#   hubot uptime <server> - chef: Prints uptime per node
