#!/usr/bin/env ruby require_relative '../lib/nin' config = { integrated_client: ENV['NIN_INTEGRATION_CLIENT'], integrated_client_token: ENV['NIN_INTEGRATION_CLIENT_TOKEN'] } begin Nin::Command.new(ARGV[0], ARGV[1..-1], config).call rescue Nin::ItemNotFoundError puts "Todo item does not exist" rescue Nin::EmptyCommandArgumentError puts "Command argument cannot be empty\nRun nin to view the USAGE message" end