require 'formula'
deps_graph = Formula.get_used_by
formulas = HOMEBREW_CELLAR.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
formulas.each do |name|
  deps = deps_graph[name] || []
  puts name if !deps.any? { |dep| formulas.include?(dep) }
end

Add function to get homebrew installed leaves
Add function to get homebrew installed leaves

Leaves are formula without a dependent parent
