Or, if you prefer to read, then read on...
To install it as a command line tool, you'll want to go to their Github page and clone their repo
git clone https://github.com/einars/js-beautify.git
Then go into the
js-beautify/python directory, and do
python setup.py install
This should install the
js-beautify executable. Try executing
js-beautify to see that it worked.
To use js-beautify inside of Textmate, first ensure
js-beautify is in the
PATH variable for the environment that's setup for Textmate. To do that, open up Preferences -> Advanced -> Shell Variables, and edit the
PATH variable. You can do
which js-beautify on your command line to find out where it was installed.