shell-tools

Functions for easy shell handling

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
shell-tools
001.1.92 months ago6 months agoMinified + gzip package size for shell-tools in KB

Readme

shell-tools
NPM Version NPM Downloads DeepScan grade
Functions for easy shell handling

Installation

npm i -D shell-tools

Usage

It can be used both as ES module (import) or CommonJS (require).
import { sh, system, systemSync } from "shell-tools";

// You can use only one argument.
const output   = sh ("ls -la");
const exitCode = await system ("ls -la");
const exitCode = systemSync ("ls -la");

// Or you can use multiple arguments, which is safer.
const output   = sh ("ls", "-la");
const exitCode = await system ("ls", "-la");
const exitCode = systemSync ("ls", "-la");