1. open-cli
Open stuff like URLs, files, executables. Cross-platform.
open-cli
Package: open-cli
Created by: sindresorhus
Last modified: Tue, 19 Dec 2023 02:14:55 GMT
Version: 8.0.0
License: MIT
Downloads: 416,399
Repository: https://github.com/sindresorhus/open-cli

Install

npm install open-cli
yarn add open-cli

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 cannot 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.

  • open - API for this module

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code