0.4.0 • Published 1 month ago

@wurk/cli v0.4.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

Wurk CLI

CLI argument parsing.

Getting Started

Install the package.

npm install --save @wurk/cli

Define a cli.

import { Cli } from '@wurk/cli';

const cli = Cli.create('my-cli')
  .description('This is my CLI.')
  .optionHelp() // Add -h|--help options which print usage and exit.
  .option('-f, --flag', 'named boolean option which accepts no value')
  .option('--named <value>', 'named option which requires a value')
  .option('<positional>', 'positional option which is required');

Use the CLI to parse command line arguments.

const result = async cli.parse();

result.options.flag; // boolean
result.options.named; // string
result.options.positional; // string
0.1.7

1 month ago

0.4.0

1 month ago

0.1.6

2 months ago

0.1.5

2 months ago

0.1.4

2 months ago

0.1.2

2 months ago

0.1.3

2 months ago

0.1.1

2 months ago

0.1.0

2 months ago