Skip to content

A better node-open. Opens stuff like websites, files, executables. Cross-platform.

License

Notifications You must be signed in to change notification settings

cancerberoSgx/opn-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opn-cli Build Status

A better node-open. Opens stuff like websites, files, executables. Cross-platform.

Install

$ npm install --global opn-cli

Usage

$ opn --help

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

  Options
    --wait  Wait for the app to exit
    --ext   File extension for when stdin file type can't be detected

  Examples
    $ opn http://sindresorhus.com
    $ opn http://sindresorhus.com -- firefox
    $ opn http://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

  • opn - API for this module

License

MIT © Sindre Sorhus

About

A better node-open. Opens stuff like websites, files, executables. Cross-platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%