unabashed
v1.0.3
Published
Launch (almost) any application or browser tab from a JSON file. This is a wrapper for `sindresorhus/open`.
Downloads
6
Readme
unabashed
Launch (almost) any application or browser tab from a JSON file. This is a wrapper for sindresorhus/open
.
Install
Make sure you have at least node v18 installed
To install locally in your project:
npm install -D unabashed
To install globally to be used anywhere:
npm install -g unabashed
Single file OS specific executables are not currently available since all packaging tools do not support ESM and bundling CJS breaks things. These might be available in the future. Use node to install locally or globally.
Usage
By default unabashed looks for a unabashed.json
file in the same directory as the command is run in.
unabashed
If you need to use a custom file name then you can add an optional argument as the filename.
Note: the file must be in the same folder as the command is run and must not contain a relative or full path.
unabashed open.json
JSON
The JSON file must meet certain criteria from unabashed's dependencies. If you need help then please refer to the source code of unabashed or the sindresorhus/open
readme.
Note: The JSON file must be an array of items to open
Application
Open applications or run commands with the app
type. You can pass additional arguments to open the application or run the command
[
{
"type": "app",
"path": "wt",
"options": {
"arguments": [
"-d",
"path\\to\\laravel\\homestead",
"cmd",
"/k",
"vagrant up && vagrant ssh"
]
}
},
]
Browser
Open browser links in tabs with the browser
type and an array of urls
. If no options are included then the links will open in your default browser.
Note: this might not work for all browsers and when specifying a certain browser then the only options are
chrome
,edge
, andfirefox
. This is a limitation ofsindresorhus/open
[
{
"type": "browser",
"options": {
"app": {
"name": "firefox",
"arguments": [
"-private"
]
}
},
"urls": [
"https://github.com/skulls-dot-codes/unabashed"
]
},
]
File
Open a file with the file
type. The file opens with whatever the default application is to view/edit it.
[
{
"type": "file",
"path": "unabashed.png"
},
]