Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/args/index.ts>commands.Command

Extensible CLI arguments parser for Deno with intelligent TypeScript inference
Go to Latest
interface commands.Command
import { type commands } from "https://deno.land/x/args@2.1.0/index.ts";
const { Command } = commands;

Interface of a command parser

Type Parameters

Return extends CommandReturn<any, any, any>

Type of parsing result

ErrList extends readonly ParseError[]

Possible types of list of errors

Methods

extract(args: readonly ArgvItem[]): Return | ParseFailure<ErrList>

Convert a list of classified arguments to parsing result

describe(): Iterable<string>

Describe the command in --help

help(cmdPath: readonly string[]): Iterable<CommandHelp>

All components to construct help message so far