Skip to main content

safari-bookmarks-cli

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.

Installation

You can install safari-bookmarks-cli via pip:

pip3 install safari-bookmarks-cli

# verify installation
safari-bookmarks --version

Or install via Homebrew on macOS:

brew tap evilmarty/tap
brew trust --formula evilmarty/tap/safari-bookmarks-cli
brew install evilmarty/tap/safari-bookmarks-cli

Usage

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

To list all bookmarks run

safari-bookmarks list

To list all bookmarks in the menubar

safari-bookmarks list "BookmarksMenu"

Add a new bookmark to the menubar

safari-bookmarks add --title "New bookmark" --url "http://example.com" "BookmarksMenu"

Add a new bookmark to the menu

safari-bookmarks add --title "New folder" --list "BookmarksBar"

Move a bookmark to a different folder

safari-bookmarks move "BookmarksMenu" "New bookmark" --to "BookmarksBar" "New folder"

Remove a bookmark or folder

Note removing a folder will also remove all bookmarks and folders within it.

safari-bookmarks remove "BookmarksBar" "New folder"

Empty a folder

safari-bookmarks empty "BookmarksBar" "New folder"

Testing

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

Metadata

Release files for safari-bookmarks-cli 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for safari-bookmarks-cli 0.6.3
File Size Uploaded Provenance Actions
safari_bookmarks_cli-0.6.3.tar.gz 12.3 kB Without provenance Details for safari_bookmarks_cli-0.6.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for safari-bookmarks-cli 0.6.3
File Interpreter ABI Platform Actions
safari_bookmarks_cli-0.6.3-py3-none-any.whl Python 3 none any Details for safari_bookmarks_cli-0.6.3-py3-none-any.whl

Total release size: 25.4 kB

Release files / safari_bookmarks_cli-0.6.3.tar.gz

Download URL safari_bookmarks_cli-0.6.3.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e252c7e457e791d44a460b6d8cc2d41479d6ba4ccd1c257239e75c3b970c3af
BLAKE2b-256 checksum
How to use checksums
1b5c10d45655a195a8fa7fa8a6744c09e3eb362d2b41172bae38c53cf7bf46c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / safari_bookmarks_cli-0.6.3-py3-none-any.whl

Download URL safari_bookmarks_cli-0.6.3-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d4de8c9a7b3f8993d60eda0c36eeea48787e2198708885505314fccf166e0c9
BLAKE2b-256 checksum
How to use checksums
5f7aa4bc9afa52a7d8aef3e4dc2d06f5f997c25c086cc15806a0c858dda4df81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for safari-bookmarks-cli 0.6.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page