Command line tool for setting the default browser (HTTP handler) in macOS X.
Build it:
make
Install it into your executable path:
make install
Set the default browser with, e.g.:
defaultbrowser chrome
Running defaultbrowser
without arguments lists available HTTP handlers and shows the current setting.
The code uses the macOS Launch Services API.
MIT