Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-open

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.

Installation

From source

Requires Go 1.21 or later.

go install github.com/unsubble/url-open/cmd/url-open@latest

The binary will be installed to your Go binary directory.

Make sure your Go binary directory is in your PATH.

Build from source

git clone https://github.com/unsubble/url-open.git
cd url-open

go build -o url-open ./cmd/url-open

Usage

Open URLs from a file:

url-open urls.txt

Open URLs directly:

url-open https://example.com https://example.org

Read URLs from stdin:

cat urls.txt | url-open

Use with xargs:

cat urls.txt | xargs url-open

Options

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

opens URLs with indexes 10 through 19.

To open URLs in batches:

url-open -batch 5 urls.txt

Supported Platforms

  • Linux
  • FreeBSD
  • macOS
  • Windows

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A CLI tool for opening URLs in your default browser.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages