Skip to content

Instantly share code, notes, and snippets.

@tajidyakub
Last active October 20, 2017 09:01
Show Gist options
  • Save tajidyakub/5d803201d9cbd7204f7ef35bef2d992d to your computer and use it in GitHub Desktop.
Save tajidyakub/5d803201d9cbd7204f7ef35bef2d992d to your computer and use it in GitHub Desktop.
Open URL in Firefox from MacOS CLI

Open URL in Firefox Internet Browser from MacOS CLI

Firefox provide a set of Command Line Options to configured the browser before we execute them. Ref. URL https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options

Objectives

  • Open http://localhost:3000 in a new Firefox Instance for local development purposes
  • Use a spesific Firefox profile prepared for development purposes
  • Can integrate into automation workflow as in Alfred3 App

Don't forget to create a new profile for local development, use Firefox Profile Manager in order to do this.

$ /Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager

Firefox Profile Manager

Command to run

Execute Firefox to open a new instance of Firefox browser with the LocalDev Profile, and start with Development Tools enabled.

  • Open specific URL http://localhost:3000
  • Open New Firefox Browser Instance -new-instance
  • Use a spesific profile -P "LocalDev"
  • With Development Tools enabled -devtools
$ /Applications/Firefox.app/Contents/MacOS/firefox http://localhost:3000 -new-instance -P "LocalDev" -devtools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment