🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

shell-tools

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-tools

Functions for easy shell handling

1.1.9
latest
Source
npm
Version published
Maintainers
1
Created
Source

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");

Keywords

command

FAQs

Package last updated on 25 Mar 2024

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