opn-cli

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

Renamed to `open-cli`.
Last updated a year ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install opn-cli 
SYNC missed versions from official npm registry.

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 '<h1>Unicorns!</h1>' | 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

Current Tags

  • 5.0.0                                ...           latest (a year ago)

8 Versions

  • 5.0.0 [deprecated]           ...           a year ago
  • 4.1.0                                ...           a year ago
  • 4.0.0                                ...           2 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |