close
Skip to main content
This release is versions behind 1.0.30 — the latest version of @std/cli.

@std/cli@1.0.29
Built and signed on GitHub Actions

Works with
This package works with DenoIt is unknown whether this package works with Bun
This package works with Deno
It is unknown whether this package works with Bun
JSR Score94%
License
MIT
Downloads22,477/wk
Publisheda month ago (1.0.29)

Tools for creating interactive command line tools

Functions

f
parseArgs<
TArgs extends Values<
TBooleans,
TStrings,
TCollectable,
TNegatable,
TDefaults,
TAliases
>
,
TDoubleDash extends boolean | undefined = undefined,
TBooleans extends BooleanType = undefined,
TStrings extends StringType = undefined,
TCollectable extends Collectable = undefined,
TNegatable extends Negatable = undefined,
TDefaults extends Record<string, unknown> | undefined = undefined,
TAliases extends Aliases<TAliasArgNames, TAliasNames> | undefined = undefined,
TAliasArgNames extends string = string,
TAliasNames extends string = string
>
(
args: readonly string[],
options?: ParseOptions<
TBooleans,
TStrings,
TCollectable,
TNegatable,
TDefaults,
TAliases,
TDoubleDash
>
): Args<TArgs, TDoubleDash>

Take a set of command line arguments, optionally with a set of options, and return an object representing the flags found in the passed arguments.

Interfaces

I

Options for parseArgs.

  • --: TDoubleDash

    When true, populate the result _ with everything before the -- and the result ['--'] with everything after the --.