Skip to content

basalt / cli/src / parseArgv

Function: parseArgv() ​

> parseArgv(argv): ParsedArgv

Defined in: cli/src/parse.ts:17

Minimal argv parser: first bare word is the command; --key=value and --flag become flags.

A bare --no-<name> is the conventional negation: it sets flags['<name>'] = false, not flags['no-<name>'] = true. That is what makes documented opt-outs like basalt dev --no-routes actually take effect — commands test flags['routes'] !== false. Only the bare form negates: --no-cache=x still parses as the literal key no-cache.

Parameters ​

argv ​

string[]

Returns ​

ParsedArgv

Released under the MIT License.