Documentation for Simbo's Packages
    Preparing search index...

    Interface ClirkContext

    The context for the clirk CLI.

    interface ClirkContext {
        args: ParsedArgs;
        argsOptions: {
            alias: Record<string, string[]>;
            boolean: string[];
            default: Record<string, any>;
            string: string[];
        };
        commandName: string;
        description: string[];
        examples: string[];
        getHelpMessage: () => string;
        getVersionMessage: () => string;
        icon?: string;
        importPath: string;
        name: string;
        options: Map<string, CliOption>;
        optionsLabel: string;
        package: PackageNormalized;
        parameters: Map<string, CliParameter>;
        parametersLabel: string;
        sigintHandler: false | SigIntHandler;
        sigintMessage: string;
        title: string;
        usage: string[];
        usageLabel: string;
    }
    Index

    Properties

    The parsed command line arguments from minimist.

    argsOptions: {
        alias: Record<string, string[]>;
        boolean: string[];
        default: Record<string, any>;
        string: string[];
    }

    The parsed options that were passed to minimist.

    commandName: string

    The actual command name extracted from process.argv.

    description: string[]

    The description of the CLI.

    examples: string[]

    Usage examples for the CLI.

    getHelpMessage: () => string

    Generates a help message for the CLI. This includes the title, description, usage, examples, parameters, and options.

    getVersionMessage: () => string

    Generates a version message for the CLI. This includes the package name and version.

    icon?: string

    An optional icon for the CLI.

    importPath: string

    The absolute path to the directory containing the CLI's package.json.

    name: string

    The command name of the CLI.

    options: Map<string, CliOption>

    The options for the CLI. This is a map of option names to their descriptions and properties.

    optionsLabel: string

    A label for the options section. This is used in the help message to indicate the options section.

    package: PackageNormalized

    The package information of the CLI. This is derived from the package.json file in the CLI's directory.

    parameters: Map<string, CliParameter>

    The parameters for the CLI. This is a map of parameter names to their descriptions.

    parametersLabel: string

    A label for the parameters section. This is used in the help message to indicate the parameters section.

    sigintHandler: false | SigIntHandler

    The function to handle the SIGINT signal (Ctrl+C). If undefined, clirk will not handle the SIGINT signal.

    sigintMessage: string

    The message to display when the SIGINT signal (CTRL+C) is received. This is either a custom message provided by the user or a default message.

    title: string

    The printable title of the CLI.

    usage: string[]

    Usage instructions for the CLI.

    usageLabel: string

    A label for the usage section. This is used in the help message to indicate the usage section.