title: Access browser console from a terminal?
body: <p>Is it possible to access Developer Tools (Chrome/Firefox) console from a Linux terminal for scripting purposes?</p>
  
  <p>I am trying to access an AngularJS application's variables from my browser so that I can quickly navigate across files. For example, I could ask for the <code>state</code>, and its related <code>partial</code>, <code>controller</code> etc; once I find the result, I would open that file in my editor.</p>
  
  <p>The other alternatives I am exploring is to use some kind of <a href="https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md" rel="noreferrer">headless browser</a>. There is also <a href="https://chromedevtools.github.io/devtools-protocol/" rel="noreferrer">devtools-protocol</a> which is used by tools like <a href="https://github.com/GoogleChrome/puppeteer" rel="noreferrer">puppeteer</a> for programmatic access to Chrome Developer Tools.</p>
  
  <p>A simple Node REPL would have been enough, but the problem is that I will have to figure a lot of stuff manually if I have load my site's JavaScript files in to REPL.</p>
  
  <p>Does anyone have some good suggestions?</p>