For example views in rails app is located at app/views, now we need beautify all those files in one command.
First we need htmlbeautifier gem, so :
gem install htmlbeautifier
After that we can use tree and xargs command :
tree app/views -f -i | xargs htmlbeautifier
Now all your erb files, have well format of html.