@winkgroup/cmd
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

cmd

Helper library to manage long running shell commands

Install

npm install @winkgroup/cmd

Usage

import Cmd from '@winkgroup/cmd'

async function go() {
    const ls = await Cmd.run('ls')
    console.log(ls)
    process.exit()
}

go()

this will run ls command on the shell and return the output in ls variable

you can check if a command exists using exists method:

    ...
    const exists = Cmd.exists('ls')
    if (exists) console.log('mongo is a command')
        else console.error('command not found')

Maintainers

Package Sidebar

Install

npm i @winkgroup/cmd

Weekly Downloads

19

Version

3.0.2

License

MIT

Unpacked Size

15.6 kB

Total Files

7

Last publish

Collaborators

  • oxcened
  • alexsp84
  • fairsayan
  • winksrl