cli-specs
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

cli-specs

cli-specs is a utility for defining CLI executables that should be called from JavaScript.

Usage

Install cli-specs using your favorite package manager:

npm install cli-specs

Then, import and use cli-specs in your project like in the following example:

import { defineCliExecutable } from 'cli-specs'
import { outdent } from 'outdent'

const git = defineCliExecutable({
  executableName: 'git',
  executablePath: '/usr/bin/git',
  description: outdent`
    \`git\` is the version control system that is needed
    for development.
  `,
  defaultExecaOptions: {
    stdout: 'inherit',
    stderr: 'inherit'
  }
})

await git(['add', '.'])

Readme

Keywords

none

Package Sidebar

Install

npm i cli-specs

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

152 kB

Total Files

11

Last publish

Collaborators

  • leondreamed