包详细信息

@fordi-org/get-options

fordi-org5ISC1.0.0

Quick lib to grab command line options

自述文件

getOptions

Quick library for grabbing command line options.

Usage

const { usage, read } = getOptions({
  description: 'My CLI app',
  A: {
    description: 'Do it to them all',
    trigger: () => ({ all: true }),
  },
});
type MyCLIOptions = {
  all?: boolean;
};

const { usage, read } = getOptions<MyCLIOptions>({
  description: 'My CLI app',
  A: {
    description: 'Do it to them all',
    trigger: () => ({ all: true }),
  },
});

See included types for details on the spec.