+TITLE: OctoKiTTY +SUBTITLE: Like busybox for the GitHub API

+LATEX: pagebreak

OctoKiTTY is a GitHub API Client written in Ruby.

+BEGIN_SRC shell

$ gem install octokitty

+END_SRC

How to use OctoKiTTY depends on the API call you wish to make. Calling it with no parameters will give you proper usage for the interface you invoked.

** Examples

*** To list all available functions

For this example, we'll filter this down to the first 3 functions matching ~list~ +BEGIN_SRC shell

$ octokitty --list | grep list | head -n 3

list_statuses
list_repositories
list_repos

+END_SRC

*** To call a function with an argument

If invoked as ~octokitty~, the first argument is treated as the function to call.

+BEGIN_SRC shell

$ octokitty create_status

  usage: create_status <repo> <sha> <state> [options]

+END_SRC

*** To call a function implicitly

As a convenience for scripting with OctoKiTTY, invoking it with any other name will treat that name as the function to call, similar to how ~busybox~ works. You can rename it, or create symbolic links.

+BEGIN_SRC shell

$ ln -s $(which octokitty) /usr/local/bin/pull_requests

$ pull_requests

  usage: pull_requests <repo> [options]

+END_SRC

** Environment

OctoKiTTY expects to find ~GITHUB_ACCESS_TOKEN~ in the environment.

In keeping with the spirit of GitHub, OctoKiTTY is released under the [[tldrlegal.com/license/mit-license][MIT License]]. See ~LICENSE.txt~ for the full text.