Made a working one with only ruby and git as a dependency:
One liner to type in irb
:
def format(file); split = file.split('/'); return file unless split.size > 1; "│ " * (split.size - 2) + "└── " + split.last; end; def list(dir, start: true); puts dir if start; `git ls-tree master "#{dir}" --name-only`.split("\n").sort.each { |line| split = line.split('/'); puts format(line); list(line + '/', start: false) if File.directory?(line) }; end; list('.')
And as a more proper script: