require "clamp" class Bash < Clamp::Command option ["-v", "--version"], :flag, "Show version" do require "wpb/version" puts "WordPress Bash #{WPB::VERSION} (c) James Birtles" exit 0 end self.default_subcommand = "console" subcommand ["c", "console"], "Start the wpb console" do def execute require "pry" require "wpb" WPB::App.run WPB.pry end end subcommand "init", "Commands to be run when first using WPB with your wordpress instance" do def execute require "wpb" WPB::App.connect WPB::AddTypeToWpPosts.up end end end