Manage Your Cookbooks With Librarian-chef

librarian-chef is like a bundler for cookbooks. Manage your cookbooks and dependencies in a single file.

Here is how

$ gem install librarian-chef
$ librarian-chef init
# edit the newly created Cheffile to add your cookbooks
$ librarian-chef install

Cookboks listed in the Cheffile will be downloaded to the cookbooks folder, you will also noticed a Cheffile.lock is created locking the versions.

Here is an example:

#!/usr/bin/env ruby
#^syntax detection

site 'http://community.opscode.com/api/v1'
cookbook 'apt'
cookbook 'git'
cookbook 'build-essential'
cookbook 'tmux'

# Include cookbooks from github 
cookbook 'ruby_build', 
          :git => 'https://github.com/fnichol/chef-ruby_build.git'
cookbook 'rbenv',
          :git => 'https://github.com/fnichol/chef-rbenv.git',
          :ref => 'v0.7.2'