   DATA.read
 end
 
+#########
+# Main. #
+#########
+
+require File.expand_path('../../lib/terminal.com', __FILE__)
+require 'json'
+
+begin
+  require 'coderay'
+rescue LoadError
+  log "CodeRay is not installed. Syntax highlighting won't be available."
+end
+
 # -h | --help
 if ARGV.include?('-h') || ARGV.include?('--help')
   puts usage; exit

    ")\n"
end

def print_as_json(data)
  json = JSON.pretty_generate(data)
  puts CodeRay.scan(json, :json).term
end

def api_call(command, arguments, options)

#!/usr/bin/env ruby

# TODO (later): Don't force tokens for methods that don't need them.
# TODO (maybe): DBG=ruby/curl/off. Curl would output curl commands.

############
# Helpers. #
############

def log(message)
  STDERR.puts("\x1B[1;30m~ #{message}\x1B[0m") unless ENV['DBG'] == 'off'
