For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/lynxtron/api/@lynx-js/lynxtron/Class.CommandLine.md.
  • English
  • @lynx-js/lynxtron / CommandLine

    CommandLine

    Constructors

    new CommandLine()

    new CommandLine(): CommandLine

    Returns

    CommandLine

    Methods

    appendArgument()

    appendArgument(value: string): void

    Append an argument to the command line. The argument will be quoted correctly. Switches will precede arguments regardless of appending order.

    If you're appending an argument like --switch=value, consider using appendSwitch('switch', 'value') instead.

    [!NOTE] This will not affect process.argv. The intended usage of this function is to control command-line behavior.

    Parameters

    ParameterType
    valuestring

    Returns

    void

    Defined in

    apis/api/command-line.d.ts:16


    appendSwitch()

    appendSwitch(the_switch: string, value?: string): void

    Append a switch (with optional value) to the command line.

    [!NOTE] This will not affect process.argv. The intended usage of this function is to control command-line behavior.

    Parameters

    ParameterType
    the_switchstring
    value?string

    Returns

    void

    Defined in

    apis/api/command-line.d.ts:23


    getSwitchValue()

    getSwitchValue(the_switch: string): string

    The command-line switch value.

    This function is meant to obtain command-line switches. It is not meant to be used for application-specific command line arguments. For the latter, please use process.argv.

    NOTE

    When the switch is not present or has no value, it returns empty string.

    Parameters

    ParameterType
    the_switchstring

    Returns

    string

    Defined in

    apis/api/command-line.d.ts:34


    hasSwitch()

    hasSwitch(the_switch: string): boolean

    Whether the command-line switch is present.

    Parameters

    ParameterType
    the_switchstring

    Returns

    boolean

    Defined in

    apis/api/command-line.d.ts:38


    removeSwitch()

    removeSwitch(the_switch: string): void

    Removes the specified switch from the command line.

    NOTE

    This will not affect process.argv. The intended usage of this function is to control command-line behavior.

    Parameters

    ParameterType
    the_switchstring

    Returns

    void

    Defined in

    apis/api/command-line.d.ts:45

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.