Skip to content

A tiny spawn wrapper for Node.js

License

Notifications You must be signed in to change notification settings

antonmedv/tinysh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinysh

A tiny spawn wrapper for Node.js.

const {ls, curl} = require('tinysh')

const list = ls('-la').trim().split('\n')

const resp = curl('https://medv.io')

Usage

npm i tinysh

Import any binary you would like to call. Use it like a function.

const {cat} = require('tinysh')

const content = cat('README.md')

To get exit code or stderr, use .status or .stderr.

const {git} = require('tinysh')

console.log(git('pull').status)

To pass options to the spawn, bind to an options object.

const {tee} = require('tinysh')

tee.call({input: 'Hello, world!'}, 'file.txt')

License

MIT

About

A tiny spawn wrapper for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published