Socket
Socket
Sign inDemoInstall

opn-cli

Package Overview
Dependencies
63
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    opn-cli

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


Version published
Maintainers
1
Install size
750 kB
Created

Readme

Source

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.

  • open - API for this module

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 07 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc