# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

V__GLOBAL_PARSE_METADATA = Metadata(
    id="5342cfbbbd394a241af39de5bbec7346f14262c0.boutiques",
    name="@global_parse",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class VGlobalParseOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v__global_parse(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""


def v__global_parse(
    program_name: str,
    options: list[str] | None = None,
    runner: Runner | None = None,
) -> VGlobalParseOutputs:
    """
    Script to parse global help options for other scripts.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/@global_parse.html
    
    Args:
        program_name: The name of the program whose help output is sought.
        options: Options to be passed to the specified program.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `VGlobalParseOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V__GLOBAL_PARSE_METADATA)
    cargs = []
    cargs.append("global_parse")
    cargs.append(program_name)
    if options is not None:
        cargs.extend(options)
    ret = VGlobalParseOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "VGlobalParseOutputs",
    "V__GLOBAL_PARSE_METADATA",
    "v__global_parse",
]
