Get the default browser
MIT License
Works on macOS and Linux.
npm install --global default-browser-cli
$ default-browser --help Example $ default-browser Safari
Get the path of the current directory in Finder (macOS) and Explorer (Windows)
Get the path to an app (macOS)
Get bundle name from a bundle identifier (macOS): com.apple.Safari → Safari
Get the latest version of an npm package
Get user info of an npm user
Open stuff like URLs, files, executables. Cross-platform.
The Sindre Sorhus CLI
Get the bundle identifier of the default browser (macOS). Example: com.apple.Safari
Get the name of the current operating system
Get bundle identifier from a bundle name (macOS): Safari → com.apple.Safari
Open the URL from a web shortcut file in the browser
Get the system default UID
Get the user's default shell