/** * Argument parsing and output shared by every `nexus` command, so each one reads its flags the same * way and every command's `--json` output can be piped into something else. */ export type Flags = Record; export interface ParsedArgs { positionals: string[]; flags: Flags; } /** Flags that never take a value, so `--json file.json` keeps `file.json` as a positional. */ export declare const BOOLEAN_FLAGS: Set; export declare function parseArgs(args: string[]): ParsedArgs; export declare function flagBool(flags: Flags, name: string): boolean; export declare function stringFlag(flags: Flags, name: string): string | undefined; export declare function numberFlag(flags: Flags, name: string): number | undefined; /** A comma-separated flag, as a list. `--tags a,b` and `--tags a --tags b` are not both supported; the first is. */ export declare function listFlag(flags: Flags, name: string): string[] | undefined; export declare function isRecord(value: unknown): value is Record; export declare function writeJson(value: unknown): void; export declare function printTable(rows: Array>, columns: string[]): void; /** Imports a user's module by path, relative to the working directory. */ export declare function loadModule(file: string): Promise>; /** An error the user can act on, printed without a stack trace. */ export declare class CliUsageError extends Error { constructor(message: string); }