To use JS Beautifier as a command line tool, you need to install Node.js and npm on your system. Then you can run the following command to install JS Beautifier globally:
npm install -g js-beautify
After that, you can run the following command to beautify a file:
You can also pass some options to customize the output, such as:
js-beautify filename.js --indent-size 4 --brace-style collapse
To learn more about the available options and how to integrate JS Beautifier with your editor or IDE, you can visit the documentation page at Github.