package
Open stuff like URLs, files, executables. Cross-platform.
npm install opn-cliGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Open stuff like URLs, files, executables. Cross-platform.
$ npm install --global open-cli$ open-cli --help
Usage
$ open-cli <file|url> [--wait] [--background] [-- <app> [args]]
$ cat <file> | open-cli [--extension] [--wait] [--background] [-- <app> [args]]
Options
--wait Wait for the app to exit
--background Do not bring the app to the foreground (macOS only)
--extension File extension for when stdin file type can't be detected
Examples
$ open-cli https://sindresorhus.com
$ open-cli https://sindresorhus.com -- firefox
$ open-cli https://sindresorhus.com -- 'google chrome' --incognito
$ open-cli unicorn.png
$ cat unicorn.png | open-cli
$ echo '<h1>Unicorns!</h1>' | open-cli --extension=htmlThe following file types are automagically detected when using stdin mode.
MIT © Sindre Sorhus
Estimated unpacked size across 27 packages.
1014.0 kB
Includes dependencies.
5 direct · 5 outdated
^5.0.0
14.1.0
^6.3.0
11.0.4
^11.0.0
22.3.0
^7.0.0
10.0.0
^4.0.0
6.0.1