A cli to manage bookmarks in the Safari web browser.
This utility interacts with Safari's Bookmarks.plist
file. When it detects changes it is reloaded without intervention.
Note macOS 10.14+ requires Full Disk Access for the application being used. ie. Terminal, iTerm, etc.
You can install safari-bookmarks-cli via pip:
pip3 install safari-bookmarks-cli
# verify installation
safari-bookmarks --version
The following assumes the default location for Safari's bookmarks, which is ~/Library/Safari/Bookmarks.plist
. If this is not the case you can specify an alternate location by passing the arguments -f <elsewhere>
.
For a full list of commands and options just run:
safari-bookmarks --help
safari-bookmarks list
safari-bookmarks list "BookmarksMenu"
safari-bookmarks add --title "New bookmark" --url "http://example.com" "BookmarksMenu"
safari-bookmarks add --title "New folder" --list "BookmarksBar"
safari-bookmarks move "BookmarksMenu" "New bookmark" --to "BookmarksBar" "New folder"
Note removing a folder will also remove all bookmarks and folders within it.
safari-bookmarks remove "BookmarksBar" "New folder"
safari-bookmarks empty "BookmarksBar" "New folder"
Clone the repository:
git clone https://github.com/evilmarty/safari-bookmarks-cli.git
Install pytest and flake8
pip3 install pytest flake8
Run them
pytest && flake8