Getting to know the Chef shell
The Chef shell, previously called
shef, provides an interactive tool or read-eval-print-loop (REPL) to work with Chef resources. Much in the same way IRB or any other language's REPL shell works,
chef-shell is a way to interact with
knife. This is handy for experimenting with resources while writing recipes so that you can see what happens interactively rather than having to upload your cookbook to a server and then executing the chef-client on a target node. Additionally, the Chef shell provides a resource to add breakpoints to recipe execution so that it can be used to debug recipe execution, which is a very handy feature.
Using the Chef shell
As of 11.x,
shef has been replaced with
chef-shell and can be used in ...