open-in-browser-cli
v1.0.0
Published
Open URLs or local files in your default browser — cross-platform
Downloads
5
Maintainers
Readme
open-in-browser-cli
Open URLs or local files in your default browser — cross-platform.
Install
npm install --global open-in-browser-cliUsage
$ open-in-browser --help
Usage
$ open-in-browser <url|path> [options]
Options
--chrome Open in Google Chrome
--firefox Open in Mozilla Firefox
--edge Open in Microsoft Edge
--quiet Suppress output
Examples
$ open-in-browser https://github.com
$ open-in-browser ./index.html
$ open-in-browser https://localhost:3000 --chromeFeatures
- Cross-platform support (macOS, Windows, Linux, WSL)
- Optional browser selection (
--chrome,--firefox,--edge) - Silent mode (
--quietto suppress logs) - Open multiple URLs (
open-in-browser https://a.com https://b.com) - Integration-friendly (exit code 0/1 based on success)
Examples
Open a URL in the default browser:
open-in-browser https://github.comOpen a local file:
open-in-browser ./docs/index.htmlOpen in a specific browser:
open-in-browser https://localhost:3000 --chromeOpen multiple URLs:
open-in-browser https://github.com https://npmjs.comLicense
MIT © Paulo Cardoso
