Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/open-cli
Open stuff like URLs, files, executables. Cross-platform.
https://github.com/sindresorhus/open-cli
Last synced: 1 day ago
JSON representation
Open stuff like URLs, files, executables. Cross-platform.
- Host: GitHub
- URL: https://github.com/sindresorhus/open-cli
- Owner: sindresorhus
- License: mit
- Created: 2015-06-29T18:15:59.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T02:14:56.000Z (about 1 year ago)
- Last Synced: 2025-01-10T15:22:26.678Z (9 days ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 422
- Watchers: 11
- Forks: 26
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- jimsghstars - sindresorhus/open-cli - Open stuff like URLs, files, executables. Cross-platform. (JavaScript)
README
# open-cli
> Open stuff like URLs, files, executables. Cross-platform.
## Install
```sh
npm install --global open-cli
```## Usage
```
$ open-cli --helpUsage
$ open-cli [--wait] [--background] [-- [args]]
$ cat | open-cli [--extension] [--wait] [--background] [-- [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 cannot be detectedExamples
$ 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 'Unicorns!
' | 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