Skip to main content
Nowa Zhu

chit - cheat sheets

··1 min

chit是今天财帮子Robin Lu放出的一款基于git的cheat sheets工具。在这之前,我一度架设过wiki、blog、bbs等等用来存放各种精巧的命令或代码,不过最终都放弃了。理想中的这个工具应该具备以下几点:

  1. 极易于安装和配置,不需要像wiki等的那么繁琐
  2. 专注,不需要多余的功能
  3. 访问速度快,最好是command line的
  4. 是分布的存储,多个节点可以任意同步

chit恰好完全符合我的这些期望,所以我在第一时间尝试了它。和robin一样我也是一个ruby fans,所以也第一时间从github checkout了代码,并尝试加上了任意repository的支持,可以创建无限多个的respostory来存放不同的sheets。你可以在这里找到: http://github.com/nowa/chit/

当然你也可以直接安装:

 sudo gem install nowa-chit -s http://gems.github.com

相比与原版,增加的功能有:

添加一个repository

 chit --config repos new_repos_name.clone-from=http://xxx.com/xxxx.git
 chit --config repos new_repos_name.push-to=http://xxx.com/xxxx.git

或者一行搞定

 chit --config repos new_repos_name.clone-from=http://xxx.com/xxxx.git \
 new_repos_name.push-to=http://xxx.com/xxxx.git

如果要删除一个repository

 chit --config repos rm repos_name

对指定的repository操作sheets:

默认从main里存取,如果要指定的话,可以这样

 chit @repos_name sheet_name
 chit @repos_name sheet_name --add
 chit @repos_name sheet_name --edit
 chit @repos_name all

感谢robin分享了这样好的工具,也希望大家都来使用它,分享各自的cheat sheets。