https://github.com/techgaun/kattu
Run commands quietly unless the command fails
https://github.com/techgaun/kattu
Last synced: 7 months ago
JSON representation
Run commands quietly unless the command fails
- Host: GitHub
- URL: https://github.com/techgaun/kattu
- Owner: techgaun
- License: mit
- Created: 2015-11-04T02:56:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-07T16:54:36.000Z (over 10 years ago)
- Last Synced: 2025-03-11T23:36:58.577Z (about 1 year ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# kattu [](https://travis-ci.org/techgaun/kattu)
> Run commands quietly unless the command fails
## Usage
I often wish to run commands but hide the output unless the command fails. In such cases, I would love to see both stdout and stderr so that I can analyze the issues. Mostly I use this while doing sysadmin stuffs.
## Install
```
$ npm install --save kattu
```
## Usage
```js
const kattu = require('kattu');
kattu('ls /tmp');
//=>
kattu('ls /tmp/does/not/exist');
//prints => ls: cannot access /tmp/does/not/exist: No such file or directory
```
## API
### kattu(cmd)
#### cmd
Type: `string`
Pass the command you wish to run.
## CLI
```
$ npm install --global kattu
```
```
$ kattu --help
Usage
kattu [cmd]
Examples
$ kattu ls /tmp
$ kattu ls /tmp/does/not/exist
ls: cannot access /tmp/abc: No such file or directory
```
## License
MIT © [techgaun](http://samar.techgaun.com)