# opn-cli

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

Latest version **5.0.0** (published 2019-05-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install opn-cli
pnpm add opn-cli
yarn add opn-cli
bun add opn-cli
```

Provides the command `open-cli`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2019-05-13 |
| First published | 2015-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 5 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 451 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | 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 |

## Links

- npm: https://www.npmjs.com/package/opn-cli
- Repository: https://github.com/sindresorhus/open-cli
- Homepage: https://github.com/sindresorhus/open-cli#readme
- Issues: https://github.com/sindresorhus/open-cli/issues
- npm.io page: https://npm.io/package/opn-cli

## Dependencies (5)

- [meow](https://npm.io/package/meow.md) ^5.0.0
- [open](https://npm.io/package/open.md) ^6.3.0
- [file-type](https://npm.io/package/file-type.md) ^11.0.0
- [get-stdin](https://npm.io/package/get-stdin.md) ^7.0.0
- [temp-write](https://npm.io/package/temp-write.md) ^4.0.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 5.0.0 (latest) — 2019-05-13
- 4.1.0 — 2019-04-07
- 4.0.0 — 2018-11-09
- 3.1.0 — 2016-02-10
- 3.0.1 — 2016-01-19
- 3.0.0 — 2016-01-18
- 2.0.0 — 2016-01-16
- 1.0.0 — 2015-06-29

## README

# open-cli [![Build Status](https://travis-ci.org/sindresorhus/open-cli.svg?branch=master)](https://travis-ci.org/sindresorhus/open-cli)

> 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](https://github.com/sindresorhus/file-type#supported-file-types) are automagically detected when using stdin mode.


## Related

- [open](https://github.com/sindresorhus/open) - API for this module


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)

---
_Source: https://npm.io/package/opn-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
