Chrome CLI is a shell binary application designed to help smooth out your development workflow using Google Chrome.
Designed for macOS (OS X) and Linux based operating systems.
If you would like to modify the default home page URL coded into these commands, open the desired file and modify the HOME_URL
variable to suit your liking.
- Add the Chrome CLI binary file to your path. On macOS (OS X), this folder is located at
/usr/local/bin
. - Before using, be sure to update the binary file permissions to
755
to allow it to execute.
Add the code outlined in bash_profile.md to your ~/.bash_profile
file and run source ~/.bash_profile
.
In your terminal of choice, run the following commands to achieve the described results:
chrome
If browser is already open, creates a new tab at the coded default home page URL. If browser not open, opens browser to your browser default home page.chrome .
Opens a new browser tab at your current folder location.chrome /some/folder
Opens a new browser tab at the specified folder location.chrome /some/file.html
Opens a new browser tab at the specified file.