-
Notifications
You must be signed in to change notification settings - Fork 7
User's Guide
Chit is a command line cheat sheet utility based on git.
Chit was inspired by ‘cheat’ by Chris Wanstrath. You can use chit to access and manage your cheat sheets easily.
There are several differences between ‘cheat’ and ‘chit’. By using chit, besides the wonderful features of ‘cheat’, you get:
- Git powered cheat sheet repository. You can specify where you get the sheets and where to share them.
- Your own private cheat sheets. Everybody has some project related or smoe cheat sheets which are not mean to public. You can also put them into chit
- Directory support. You can group cheat sheets by directory now.
- One less letter to type.
To initialize chit repositories
$ chit --initThis will be run automatically when you run chit for the first time.
To get a cheat sheet:
$ chit [cheatsheet]If it does not exist, a new one will be created and waiting for your editing. Leave it blank and quit the editor if you don’t want to add a new one.
To edit a cheat sheet, use the —edit switch.
$ chit [cheatsheet] --editTo add a cheat sheet, use the —add switch.
$ chit [cheatsheet] --addDuring editing a cheat sheet, empty the content will get the cheat sheet removed.
A prefix ‘@’ indicates the cheat sheet is in private mode. A private cheat sheet is kept in another repository.
To get a private cheat sheet:
$ chit @[cheatsheet]The prefix ‘@’ works the same for both —edit and —add.
The cheat sheet can be in a path. For example:
$ chit mysql/selectwill get the cheat sheet ‘select’ under mysql.
To show all the cheat sheets:
$ chit [all|sheets]To show all the private cheat sheets:
$ chit @[all|sheets]To find cheat sheets begin with ‘name’, use the —find/-f switch
$ chit name --findTo search cheat sheets content with ‘text’, use the —search/-s switch
$ chit text --searchTo move or rename a sheet, use ‘—mv/-m’ switch
$ chit zsh_if zsh/if -m
sudo gem install robin-chit -s http://gems.github.com
chit --init
Before run ‘chit’, you may want to config ~/.chitrc which is a YAML file.
- root: local path to store the cheat sheet. By default, it is ~/.chit
- main:
- clone-from: where to get the public cheat sheets. You can use git://github.com/robin/chitsheet.git, which is a snap shoot of http://cheat.errtheblog.com/.
- private:
- clone-from: where to get the private cheat sheets. If not specified, a new git repository will be init for private cheat sheets.
- rubygems
- git