-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Eugene Lazutkin edited this page Sep 5, 2024
·
15 revisions
The dollar-shell is a micro-library for running shell commands and using them in streams with ease in Node, Deno, Bun. It is a tiny, simple, no dependency package with TypeScript typings.
All streams are created using web streams.
The dollar-shell package can be used together with stream-chain
and stream-json to create efficient pipelines.
npm i --save dollar-shellimport $, {$sh} from 'dollar-shell';The package exports the following names:
-
$— spawns a process using a template string. It includes the following helpers, which all spawn a process using a template string:-
$.from— returns itsstdoutas a source stream. -
$.to— returns itsstdinas a sink stream. -
$.ioAKA$.through— returns a readable/writeable pair, which can be used as a transformation step in a pipeline.
-
-
$sh— spawns a shell process using a template string. It includes the following helpers, which all spawn a shell process using a template string:-
$sh.from— returns itsstdoutas a source stream. -
$sh.to— returns itsstdinas a sink stream. -
$sh.ioAKA$sh.through— returns a readable/writeable pair, which can be used as a transformation step in a pipeline.
-
- spawn() — spawns a process with advanced ways to configure and control it.
-
$$— spawns a process using a template string based onspawn(). -
shell AKA
sh— a helper to spawn a shell command using a template string. - Various internal utilities:
- Template string helpers:
-
spawn()and shell helpers: - Shell command builders:
$ is used as the default export.