https://github.com/create3000/shell-tools
Functions for easy shell handling
https://github.com/create3000/shell-tools
Last synced: 12 months ago
JSON representation
Functions for easy shell handling
- Host: GitHub
- URL: https://github.com/create3000/shell-tools
- Owner: create3000
- License: gpl-3.0
- Created: 2023-11-27T13:42:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T12:39:07.000Z (almost 2 years ago)
- Last Synced: 2025-03-08T12:43:37.304Z (about 1 year ago)
- Language: JavaScript
- Size: 11.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shell-tools
[](https://www.npmjs.com/package/shell-tools)
[](https://npmtrends.com/shell-tools)
[](https://deepscan.io/dashboard#view=project&tid=23540&pid=26818&bid=855452)
Functions for easy shell handling
## Installation
```sh
npm i -D shell-tools
```
## Usage
It can be used both as ES module (import) or CommonJS (require).
```js
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");
```