isotope|eleven


About_adam_gamble

Isotope11 releases command line interface to Xrono

by: Adam Gamble

February 2nd, 2012 14:10

CLI Interface to Xrono

Isotope11 has just released a command line interface to the Xrono time tracking app. It allows you to manage tickets and enter time straight from the command line. Its still in the very early stages, but I wanted to get a post out about it early.

You will most likely want to put this in your global gemset if you're using rvm.

rvm use 1.9.2@global
gem install xcli

You can repeat this step for all your rubies that you use.

xcli uses the .xronorc file in your home directory to figure out what xrono to use and what your credentials are. Here is a sample.

---
  url: http://www.xrono.org
  email: dev@xrono.org
  password: '123456'

Once that is in place, you need to specify a git repo url per project in xrono. Xcli currently checks origin's git repo url to relate to a project in xrono. Type git remote -v and copy the git url next to origin. Paste this into the git repo url field on the project edit page in xrono and save.

Your project is now setup to use xcli.

To get a list of commands type

xcli

Tasks:
  xcli clients      # list clients
  xcli enter_time   # enter time to current ticket based on git repo and branch
  xcli new_ticket   # create new ticket based on git repo and branch
  xcli projects     # list projects
  xcli status       # show information about the current user
  xcli ticket       # show current ticket based on git repo and branch

Once you are in a feature branch you will want to check and see if there is a ticket in xrono associated with that branch.

xcli ticket

If no ticket is listed we need to add one

xcli new_ticket --estimated_hours=0 --description="some ticket" --name="some ticket"

Now use xcli ticket to make sure it worked

xcli ticket

To enter time against that ticket

xcli enter_time --hours=5 --message="I did lots of awesome things"
Adam has been a professional developer for almost 10 years. Adam is lead developer on projects for 2 different fortune 500 companies. In his spare time he's writing "Beginning Rails 4" which is published by Apress and will be released in October 2013.

View All Posts