@anscho/hive

Library that supports constructing CLIs with nested command structures

Usage no npm install needed!

<script type="module">
  import anschoHive from 'https://cdn.skypack.dev/@anscho/hive';
</script>

README

Hive

Hive provides simple tools built on minimist to help nest commands within a CLI.

Testing

You can test Hive using the example:

> node example/example.js
Usage: example [OPTIONS] COMMAND [ARGS]...

  Hive example CLI

Commands:
  one  First command
  two  Second command

> node example/example.js one
Usage: one [OPTIONS] COMMAND [ARGS]...

  First command

Commands:
  a    Another command
  foo  Classic foobar

> node example/example.js one foo -h
Usage: foo [-b --baz]

  Classic foobar

> node example/example.js one foo
bar

> node example/example.js one foo -b
baz