Knife plugin for Chef to draw dependency graphs for roles. Cut through the spaghetti with a knife.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
features add RuboCop Aug 10, 2014
gemfiles address rubocop style Aug 10, 2014
lib add RuboCop Aug 10, 2014
.cane Add cane quality tasks and tests Aug 11, 2013
.gitignore adds Appraisals to testing suite Aug 11, 2013
.travis.yml update travis for ruby versions Aug 9, 2014
Gemfile address rubocop style Aug 10, 2014
LICENSE remove buildheroes, update readme Aug 9, 2014


Gem Version Dependency Status Build Status Code Climate

Knife plugin for Chef to draw dependency graphs for roles that have become spaghetti.



Ruby 1.9.3 and higher.

This plugin requires on Graphviz, and should be installed prior to installing the plugin.

Graphviz may be obtained through a variety of methods. On OSX an easy method is via Homebrew:

$ brew install graphviz

Gem install, via RubyGems:

$ gem install knife-role-spaghetti


NOTE: Ensure that your knife.rb has the role_path setting configured.

Since this is a Knife plugin, execution should be performed in your Chef repository.


$ knife role spaghetti

with no arguments should result in a new file named role-spaghetti.png in your repo root.

$ knife role spaghetti "/tmp/someotherfilename.png"

will place the file in the specified location.

Execute knife role spaghetti -h for more options.


From a sample role, courtesy of @jtimberman, along with one from the Opscode Wiki, plus one more cyclic role model, produces this image:

Sample Roles

(full resolution here)

Running through the neato renderer (with the -N switch) produces this image:

Sample Roles Neato

(full resolution here)


Author:: Mike Fiedler ( endorse Copyright:: Copyright (c) 2012-2013 Mike Fiedler License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.