https://github.com/guiprav/blastoise-shell
Async shell-like child process pipelines for NodeJS
https://github.com/guiprav/blastoise-shell
nodejs unix-commands unix-philosophy unix-pipes
Last synced: 3 months ago
JSON representation
Async shell-like child process pipelines for NodeJS
- Host: GitHub
- URL: https://github.com/guiprav/blastoise-shell
- Owner: guiprav
- License: mit
- Created: 2017-11-29T03:44:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-12T18:44:00.000Z (over 7 years ago)
- Last Synced: 2025-03-11T23:36:01.968Z (3 months ago)
- Topics: nodejs, unix-commands, unix-philosophy, unix-pipes
- Language: JavaScript
- Homepage:
- Size: 57.6 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Blastoise Shell
Blastoise Shell is an easy way to setup child process
pipelines, execute them, and easily interact with their
standard streams. A lot like Bash, but using Node.Installation:
```
$ npm install --save blastoise-shell
```Quick example:
```js
let { cat, echo, rm, vim } = require('blastoise-shell');async function main() {
let fileName = 'hello.txt';await echo(`Hello, world!`)
.map(x => x.replace('Hello', 'Hi'))
.sed('s/world/folks/')
.writeTo(fileName);await vim(fileName);
await echo(`File contents after editing:`);
await cat(fileName);await rm(fileName);
}main().catch(console.error);
```For a more complete example, check out
[example.js](example.js).For a netcat HTTP web server monstrosity, see
[evil-example.js](evil-example.js).For the complete API reference, check out the
[documentation](https://github.com/n2liquid/blastoise-shell/wiki/Where-is-the-documentation%3F).## License
Blastoise Shell is free software: you can redistribute it and/or modify it under the terms of the [MIT license](COPYING).
## Exclusion of warranty
Blastoise Shell is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [COPYING](COPYING) for more details.