Skip to content
Caleb Spare edited this page May 21, 2012 · 2 revisions

Barkeep comes with a simple command-line client that makes use of the REST API to allow for programmatic access to some of its functionality. You can find the code for the client inside client/. It is packaged as a gem that is easily installed from Rubygems:

$ gem install barkeep-client

You need to tell the client where your barkeep server is located by using a ~/.barkeeprc file. Populate that file with the following (find your API key and API secret by logging into Barkeep and going to 'settings'):

barkeep_server: <barkeep server hostname>
email: <your email address>
api_key: <api key>
api_secret: <api secret>

Barkeep takes a subcommand and then further arguments:

$ barkeep <command> [args]

The available commands are:

  • commit: Get information about a particular commit.
  • unapproved: Find unapproved commits from a list or commit range.
  • view: Open a Barkeep commit page in your browser.

Use barkeep <command> --help for more information about a particular command. Here are a few example usages:

  • Get info about a particular commit by its SHA:

      $ barkeep commit 43ef532a7
    
  • See if there are any unapproved commits since 43ef532a7:

      $ barkeep unapproved 43ef532a7..
    
  • See if there are unapproved commits since the last release

      $ barkeep unapproved old_release_branch..new_release_branch
    
  • See if there are unapproved commits since last week in the lib directory (note that we're passing off arbitrary arguments to git log here):

      $ barkeep unapproved -- --since='1 week ago' -- lib/
    
Clone this wiki locally