I spend a lot of my computing time in the terminal, so the tree utility is very useful. Unfortunately, it’s not as useful in node projects or other projects that include supporting packages, because it isn’t aware of .gitignore files. When you run tree in a node project folder the listing includes all of the files for the node modules that your project uses, build artifacts, etc.
I’ve written a small node based version of tree build called node-tree-fiddy that honors the gitignore file. It’s in a very alpha state at the moment, but I’m already getting use out of it. I’ll keep improving it as time allows and hopefully it’ll end up being a drop in replacement for the real tree utility.
I’m also planning on writing a version of it in C, but who knows when that’ll happen.
Here’s a screencast that shows the difference between tree and node-tree-fiddy in a node project folder.
Assuming you’ve already got node, installing it is as simple as running
npm install -g tree-fiddy
On my machine I setup a zsh alias to replace the real tree with tree-fiddy: