#!/usr/bin/env ruby require 'gli' begin # XXX: Remove this begin/rescue before distributing your app require 'detom' rescue LoadError => e STDERR.puts e.message STDERR.puts e.backtrace STDERR.puts "In development, you need to use `bundle exec bin/detom` to run your app" STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path" STDERR.puts "Feel free to remove this message from bin/detom now" exit 64 end class App extend GLI::App program_desc "Minimalistic project and client time tracking on the command line" version Detom::VERSION subcommand_option_handling :normal arguments :strict desc "List all clients currently being tracked" command :clients do |c| c.action do |global_options,options,args| begin Commands::Clients.new.call rescue StandardError => e STDERR.puts e.message STDERR.puts e.backtrace end end end desc "Record some time spent on a client. and