require "json_pp/version" require 'json' require 'awesome_print' require 'optparse' module JsonPp def self.usage() end def self.run() if STDIN.tty? puts 'your_command | json [--no-color]' else data = JSON.parse(STDIN.read) if ARGV.include?('--no-color') puts JSON.pretty_generate(data) else require 'ap' ap data end end end end