Skip to content

CLIOptions ​

Options for the cli({...}) factory form.

This form is useful when the displayed CLI name should be inferred from the current runtime invocation instead of always being hard-coded.

Signatures ​

ts
interface CLIOptions {}

Members ​

Properties ​

flags ​

Flag-parsing behavior settings (e.g. { caseParity: false } to accept only declared flag spellings). Shares the ParseOptions contract used by parse() and RunOptions.flags.

ts
flags?: ParseOptions;

inherit ​

Replace name with the invoked program basename during .run().

Examples:

  • node ./bin/mycli.ts → mycli.ts
  • /usr/local/bin/mycli → mycli
ts
inherit?: boolean;

name ​

Explicit fallback CLI name.

Used by .execute(), and by .run() when runtime name inheritance is disabled or the invocation name cannot be inferred.

ts
name?: string;

See Also ​

Released under the MIT License.