An open API service indexing awesome lists of open source software.

https://github.com/oliveroneill/webbrowser

Small Swift Library for opening URLs in default browser
https://github.com/oliveroneill/webbrowser

browser linux script swift

Last synced: 6 months ago
JSON representation

Small Swift Library for opening URLs in default browser

Awesome Lists containing this project

README

          

# WebBrowser

A small Swift library for opening URLs in the web browser from command line.

This was built for desktop Swift scripts and is compatible with Linux and
macOS.
I have not tested it on Linux yet.

## Installation
Add this to your Package.swift:
```swift
.package(url: "https://github.com/oliveroneill/WebBrowser.git", .upToNextMajor(from: "1.0.0")),
```

## Usage
```swift
import WebBrowser

do {
try WebBrowser.open(url: URL(string: "http://google.com/")!)
} catch {
// handle error
}
```