url-open is a small command-line utility that opens URLs in your system's default web browser.
URLs can be provided directly as command-line arguments, read from a file, or streamed through stdin. This makes it convenient to use with Unix pipelines and tools such as xargs.
Requires Go 1.21 or later.
go install github.com/unsubble/url-open/cmd/url-open@latestThe binary will be installed to your Go binary directory.
Make sure your Go binary directory is in your PATH.
git clone https://github.com/unsubble/url-open.git
cd url-open
go build -o url-open ./cmd/url-openOpen URLs from a file:
url-open urls.txtOpen URLs directly:
url-open https://example.com https://example.orgRead URLs from stdin:
cat urls.txt | url-openUse with xargs:
cat urls.txt | xargs url-open-start
Start index (inclusive). Default: 0.
-end
End index (exclusive). Values <= 0 mean the end of the input.
Default: -1.
-batch
Number of URLs to open in each batch. Default: 1.
For example:
url-open -start 10 -end 20 urls.txtopens URLs with indexes 10 through 19.
To open URLs in batches:
url-open -batch 5 urls.txt- Linux
- FreeBSD
- macOS
- Windows
This project is licensed under the MIT License. See the LICENSE file for details.