🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More
Socket
Book a DemoInstallSign in
Socket

shellraiser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shellraiser

😈

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

😈 Shellraiser

Raise shell in node, inspired by shellblazer but gives you access to the process itself.

Install

npm i --save shellraiser

Usage

Node

const sh = require('shellraiser')
await sh('ls')
await sh('npm', ['i -S shhh'])
await sh('curl', ['https://github.com'], { stdio: 'inherit' })

CLI

shhh ls
shhh npm i -S shhh

API

const sh = require('shellraiser')

The sh function spawns a process, it is essentially a thin wrapper around const { spawn } = require('child_process')

const shell = sh(cmd, [args], [opts])

Spawn a process that executes cmd with args given opts.

The arguments to sh are the same as spawn.

Optionally, you can await completion of the process with await sh(cmd, args, opts).

shell.then([fn])

Just like Promise's .then().

shell.catch([fn])

Just like Promise's .catch().

shell.resolve([any])

Forcibly resolve the underlying promise with an arbitrary value, automatically cleans up the underlying process.

shell.reject([any])

Forcibly reject the underlying promise with an arbitrary value, automatically cleans up the underlying process.

const { process } = sh(cmd, [args], [opts])

The underlying process object.

const { promise } = sh(cmd, [args], [opts])

The underlying promise.

FAQs

Package last updated on 20 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts