# Gist on starting a cookbook with ChefDK and TK

**URL:** <https://discourse.chef.io/t/gist-on-starting-a-cookbook-with-chefdk-and-tk/5593>\
**Category:** Chef Infra (archive)\
**Created:** [July 7, 2014, 5:54pm UTC](https://discourse.chef.io/t/gist-on-starting-a-cookbook-with-chefdk-and-tk/5593 "2014-07-07T17:54:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lamont\_Granquist\_OLD](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lamont\_Granquist\_OLD](https://discourse.chef.io/u/Lamont_Granquist_OLD)\
**Post date:** [July 7, 2014, 5:54pm UTC](https://discourse.chef.io/t/gist-on-starting-a-cookbook-with-chefdk-and-tk/5593/1 "2014-07-07T17:54:19Z")

</div>

Over the weekend I wrote up a gist on how to go from zero to writing a  
cookbook using ChefDK and TK which went kinda viral on my twitters (10  
RTs and 17 favorites, which is like 20% of my followers, so that’s viral  
for me… I have no idea what I’m doing on twitter…)

I should clean this up a little bit (probably stop using /tmp) and turn  
it into a Chef Blog, but thought I’d post it here in case I get busy and  
drop that.

This might be stealing a bit of learnchef’s ChefDK thunder, but its  
quite usable now to point a newbie at it and start doing work:

> <https://gist.github.com/lamont-granquist/40d26b6fa8178212594f>

The advantage of starting with this way of learning things is that you  
won’t have to relearn anything as you go on. You can layer TDD on top  
of this, you can add travis, add all your Rakefiles and Thorfiles and  
rubucop and everything goes right on top of this. But it doesn’t start  
out by having to setup a chef server. There’s no direct touching of  
berkshelf at all, no direct touching of test kitchen configs. Most of  
the focus _is_ on writing cookbook code (recipe, attribute, template),  
but its the modern way of going from zero to writing code.
