crconsole
is a remote Javascript console for Chrome/Webkit that runs in your terminal:
With node.js and the npm package manager:
npm install crconsole -g
You can now use crconsole
from the command line.
Start chrome with remote protocol enabled:
google-chrome --remote-debugging-port=9222
$> crconsole
google.com> 1+1
2
There are two extra REPL commands available beyond the standard node.js commands. .tabs
lists the open tabs. .switch 2
switches to evaluating in a tab. The argument is the index of the tab to switch to.
- fxconsole - remote Javascript console for Firefox
- firefox-client - client for Firefox Remote Debugging Protocol
- chrome-remote-interface - client for Chrome DevTools Remote Debugging Protocol, also features simple REPL.
- crmux - multiplex DevTools connections, allows you to connect multiple debugging clients to a single target
Parts of the code taken from fxconsole. Uses chrome-remote-interface to communicate with Chrome.