8000 GitHub - sindresorhus/open-cli at v4.1.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

License

Notifications You must be signed in to change notification settings

sindresorhus/open-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opn-cli Build Status

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

Install

$ npm install --global opn-cli

Usage

$ opn --help

  Usage
    $ opn <file|url> [--wait] [--background] [-- <app> [args]]
    $ cat <file> | opn [--ext] [--wait] [--background] [-- <app> [args]]

  Options
    --wait         Wait for the app to exit
    --background   Do not bring the app to the foreground (macOS only)
    --ext          File extension for when stdin file type can't be detected

  Examples
    $ opn https://sindresorhus.com
    $ opn https://sindresorhus.com -- firefox
    $ opn https://sindresorhus.com -- 'google chrome' --incognito
    $ opn unicorn.png
    $ cat unicorn.png | opn
    $ echo '<h1>Unicorns!</h1>' | opn --ext=html

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

Related

  • open - API for this module

License

MIT © Sindre Sorhus

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

0