This directory contains two Bash scripts for opening lists of URLs in Safari, one at a time, waiting for each window to be closed before proceeding to the next.
These tools are designed for workflows where you must manually inspect many pages without overloading history, CPU, or open tabs.
Opens each URL in a normal Safari window.
Opens each URL in a Safari Private Window using UI scripting.
Both scripts behave identically except for window mode.
- Accepts a file path of URLs or reads from stdin.
- Ignores blank lines and comment lines beginning with
#. - Opens one URL per window.
- Waits until the user closes that window before opening the next one.
- Safe, predictable, and works with arbitrarily long URL lists.
- Fully compatible with Safari on macOS.
./open-urls-sequential.sh urls.txt
./open-urls-sequential-private.sh urls.txtcat urls.txt | ./open-urls-sequential.shprintf '%s\n' \
"https://example.com" \
"https://apple.com" \
| ./open-urls-sequential.shA valid list looks like:
# new leads
https://example.com
https://doc.rust-lang.org/cargo/index.html
# skip this section
# https://news.ycombinator.com
https://graphemica.com
- Blank lines = skipped
- Lines starting with
#= skipped - Everything else must be a URL
- macOS
- Safari
- Terminal/iTerm allowed under: System Preferences → Security & Privacy → Accessibility (Required for “New Private Window” UI automation)
These scripts are built for workflows where:
- You need to process long sequences of URLs.
- You want windows to open one at a time, not all at once.
- You want Safari windows to auto-block navigation until you close them.
- You prefer private-history browsing when reviewing many pages.
They are straightforward, robust, and tuned for high-volume sequential browsing.
Prefer
open-urls-sequential.shsince it doesn't require accessibility permissions (although it can overload your browsing history).