Search code examples
linuxgoogle-chromeremote-control

How do I programatically control a Chrome instance from the command line?


How do I control a running Google Chrome instance from the command line? I'm hoping there's something like a -remote flag that will allow me to send in some javascript or somesuch. In particular, I would like to reload the topmost document on the foremost window.

I'm especially interested in Linux/MacOS solutions.


Solution

  • You can use this command line tool if you're on a Mac - it uses the Chrome Scripting API, I guess

    https://github.com/prasmussen/chrome-cli