defaultbrowser

April 19, 2023 ยท View on GitHub

Command line tool for setting the default browser (HTTP handler) in macOS X.

Install

Build it:

make

Install it into your executable path:

make install

Usage

Set the default browser with, e.g.:

defaultbrowser chrome

Running defaultbrowser without arguments lists available HTTP handlers and shows the current setting.

How does it work?

The code uses the macOS Launch Services API.

Additional Resources

  • Bash completion for defaultbrowser

License

MIT

Contents

  1. 1Install
  2. 2Usage
  3. 3How does it work?
  4. 4Additional Resources
  5. 5License