Read-only access to Safari bookmarks, Reading List and history, plus live interaction with windows and tabs.
Originally created by Dean Jackson in 2016 for use with Alfred. Other contributors include Troels Thomsen. John-Mason Shackelford made minor updates after Dean archived the project in 2020.
To install the command-line utility:
brew install go
go install github.com/jpshackelford/go-safari/cmd/safari@latest
The executabile will be installed in $GOBIN or in $HOME/go/bin.
$GOBIN/safari help
To search history use the domain of the site of interest. For example:
safari history google.com
Once you've cloned the repo, download dependencies and run the tests.
cd go-safari
go install github.com/cortesi/modd/cmd/modd@latest
modd
Check out the modd docs for more. Tests will run automatically on touched files as you make changes.
To install the development version
go build -v ./cmd/safari && go install -v ./cmd/safari
John-Mason won't be of much use for questions as he is both a go newb and hasn't worked much with this code base either. Fork away.
This code is released under the MIT License.