In OSX there is a hidden utility called jsc, part of WebKit, that can be used to run JavaScript code on the command line. It can be used as a JavaScript console, like irb for Ruby.

I have the libwebkitgtk-3.0 and -3.0-dev libraries installed, but I cannot figure out how to find or build jsc. Is it even possible?

Note: I already know about alternatives like Rhino, SpiderMonkey, etc.

3 Answers 3


Install a link to install rhino and use rhino-jsc (see manpage)


Another solution is to install nodejs:

sudo apt-get install nodejs npm

The above will not always install the most recent version, in which case you can try:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

If you prefer to avoid Rhino and stick with the WebKitGTK+ packages, install a link to install libjavascriptcoregtk and use /usr/bin/jsc (manpage)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.