Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shellblazer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shellblazer

Simple module for executing shell commands with less boilerplate.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

shellblazer

A Node.js module for executing shell commands with less boilerplate.

Installation

To install the module, run the following command in your terminal:

npm i shellblazer

Usage

The module will provide you with a function. Just pass the commands as arrays of strings.

let sh = require('shellblazer')

sh(['mkdir', 'foo'])

The commands are executed with spawn() with {shell: false}, so you cannot pipe output from one command to another.

You can change directory by passing a cwd option to the .configure() method. The method will return a new shellblazer function, that will have the required working directory set:

sh = sh.configure({ cwd: './foo' })
sh(['touch', 'a.txt'])
//this will create the file a.txt inside the foo directory

Shellblazer can execute commands in sequence with a single function call, by taking any number of arrays as arguments

let sh = require ('./index')

sh(['mkdir', 'alpha'], ['mkdir', 'beta'])

FAQs

Package last updated on 15 Apr 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc