Menuist Bookmarks
June 4, 2026 · View on GitHub
Menuist Bookmarks
This project provides organized bookmark data and a small bkm command for turning the bookmarks directory into a static navigation website. It can also be used with Menuist v4.1+ by adding the bookmarks folder to Menuist's common directories for quick access to frequently used websites.

The bookmarks in this project are stored using macOS and iOS system's .webloc file format, where each .webloc file is a shortcut pointing to a specific URL. Websites can be organized with folders, used directly in Menuist, or generated as a static HTML navigation page with icons and optional GitHub Pages publishing.

Directory Structure
├── bookmarks/ # Store .webloc files (supports subfolders)
│ ├── menuist.ini # ⚠️ Menuist configuration
│ ├── GitHub.webloc
│ ├── Gmail.webloc
│ ├── AI/ # Supports subfolders
│ │ ├── ChatGPT.webloc
│ │ ├── Claude.webloc
│ │ └── ...
│ └── ...
├── icons/ # Store icon files
│ ├── github.com.icns
│ ├── google.com.icns
│ ├── chatgpt.com.icns
│ └── ...
├── bkm.swift # Swift source code
└── bkm # Compiled binary file
Add a new bookmark
1️⃣ In the bookmarks/ directory, create a text file named Apple.webloc (with the .webloc extension). Paste the following XML content into it, and edit the URL as needed.
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://www.apple.com/</string>
</dict>
</plist>

2️⃣ Add a Bookmark Icon
Place the downloaded .icns icon file into the icons directory and name it after the website, for example apple.com.icns.
Then run the ./bkm command to automatically apply the icon to the Apple.webloc file.
You can obtain or create .icns icon files in the following ways:
- Download ready-made icons from macOSicons
- Create custom app icons using Iconed
- Create folder icons and export them as
.icnsusing Iconize Folder
Setting Icons for webloc Files
The script can automatically set icons for .webloc files by matching corresponding icon files from the icons directory based on the domain name of the URL.
1️⃣ Method 1: Run Swift script directly (requires Swift installation)
swift bkm.swift
2️⃣ Method 2: Compile to binary file (recommended)
If you don't have a Swift environment to run the Swift script, you can directly run the ./bkm command file to set file icons.
# Manual compilation to generate a binary file
swiftc -o bkm bkm.swift
# Make the command executable
chmod +x bkm
# Run
./bkm
Available command options:
# Set icons for .webloc files. This is the default behavior.
./bkm --set-icons
# Generate a static bookmark navigation page at .html/index.html.
# Web icons are exported to .html/icons/.
./bkm --generate-html
# Generate the static page and include the current GitHub repository link.
./bkm --generate-html --include-github-link
# Commit existing .html contents to the gh-pages branch root.
# The command also writes .nojekyll on gh-pages for GitHub Pages.
./bkm --publish-gh-pages
If you see zsh: bad CPU type in executable: ./bkm on an Intel Mac, the existing binary was built for a different CPU architecture. Rebuild an Intel binary:
swiftc -target x86_64-apple-macosx13.0 -o bkm bkm.swift
chmod +x bkm
To generate a universal binary that supports both Apple Silicon and Intel Macs, compile the two architecture-specific binaries first, then merge them with lipo:
swiftc -target arm64-apple-macosx13.0 -o bkm_arm64 bkm.swift && \
swiftc -target x86_64-apple-macosx13.0 -o bkm_x86_64 bkm.swift && \
lipo -create -output bkm bkm_arm64 bkm_x86_64 && \
chmod +x bkm
The lipo command cannot compile source code by itself. If bkm_arm64 or bkm_x86_64 does not exist yet, run the full command block above instead of running only the lipo line.
Configuration
Place a menuist.ini configuration file in the root of your bookmarks directory to hide certain menu items and keep the bookmarks menu tidy. Alternatively, you can use a hidden file .menuist.ini as the configuration.
[options]
; Show file extensions
showFileExtension = false
; Show frequently used apps menu
showCommonAppMenu = false
; Show "Open in Finder" menu
showOpenInFinderMenu = false
; Show parent folder menu
showParentFolderMenu = false
License
MIT © Kenny Wong