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

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.2

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.2
File Size Uploaded Provenance Actions
safari_bookmarks_cli-0.6.2.tar.gz 12.2 kB Without provenance Details for safari_bookmarks_cli-0.6.2.tar.gz

Built distribution (wheel)

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

Total release size: 25.3 kB

Release files / safari_bookmarks_cli-0.6.2.tar.gz

Download URL safari_bookmarks_cli-0.6.2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
11cf2d8fcb7ba74f311eccdd5837b9db95eb2163c3a24182f00fc7996a5a1aab
BLAKE2b-256 checksum
How to use checksums
b6594a017fa9f078b4b47f21fe1619272c31eff98033cad25e0f72e476f11a88
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.2-py3-none-any.whl

Download URL safari_bookmarks_cli-0.6.2-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4372a10ac58f04bb8165a6bd7ac94f156c2a4a3a859f7065b9bbf886f2bede94
BLAKE2b-256 checksum
How to use checksums
c20c6a0734dddbdf4c7d7fa49ff684f8b07f138f2ce486573845a6f5326ef32f
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.2

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