Skip to main content
Module

x/flags/mod.ts>CommandOptions

Command line argument parser for deno and node.js
Latest
interface CommandOptions
import { type CommandOptions } from "https://deno.land/x/flags@0.0.3/mod.ts";

Command definition options

Properties

readonly
use: string

Command name

readonly
optional
short: string

Short description of the command

readonly
optional
long: string

Detailed description of the command

optional
run: (args: Array<string>, cmd: Command) => void

Called when the user specifies to execute this command/subcommand

readonly
optional
prepare: (flags: Flags, cmd: Command) => undefined | ((args: Array<string>, cmd: Command) => void)

If you want to define flags for a command, you should not specify the 'run' attribute but the 'prepare' attribute