opn-cli
    Overview
    Documentation
    Tutorials
    Insights
    Code
    Dependencies
    Contributors
    Jobs

opn-cli

Open stuff like URLs, files, executables. Cross-platform.

5.0.0  •  Updated 1 years ago  •  by Sindre Sorhus  •  MIT License

open-cli Build Status

Open stuff like URLs, files, executables. Cross-platform.

Install

$ npm install --global open-cli

Usage

$ 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 '<h2>Unicorns!</h2>' | open-cli --extension=html

The following file types are automagically detected when using stdin mode.

Related

  • open - API for this module

License

MIT © Sindre Sorhus

Popularity

Weekly Downloads
46.7K
Stars
247

Maintenance

Development

Last ver 1 year ago
Created 5 years ago
Last commit 10 months ago
2 months between commits

Technology

Node version: 8.16.0
4.8K unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

4 contributors
Sindre Sorhus
Maintainer, 17 commits, 2 merges
Sam Verschueren
Maintainer, 3 commits, 1 PRs
Sonny Piers
1 commits, 3 PRs
Sebastián Gurin
1 commits, 1 PRs
Works at home
Arthur Verschaeve
Maintainer
Vsevolod Strukchinsky
Maintainer
Works at Yandex

Tags

cli-app
cli
app
open
opener
opens
launch
start
xdg-open
xdg
default
cmd
browser
editor
executable
exe
url
urls
arguments
spawn
exec
child
process
website
file
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookTwitterLinkedIn
© 2020 Devstore, Inc.