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

import typing
import pathlib
from styxdefs import *
import dataclasses

FS_LIB_CHECK_METADATA = Metadata(
    id="f37fc790fdaf3a4bfa36c3a6d4c66c5bcc752a3c.boutiques",
    name="fs_lib_check",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def fs_lib_check(
    use_ldconfig: bool = False,
    use_rpm: bool = False,
    show_help: bool = False,
    show_version: bool = False,
    runner: Runner | None = None,
) -> FsLibCheckOutputs:
    """
    Checks if the operating system has the necessary system libraries required to
    run FreeSurfer.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        use_ldconfig: Force use of 'ldconfig' to check for instances of\
            required system libraries. This is useful on rpm systems if system\
            libraries were installed from source code, and are thus not known to\
            the system rpm database.
        use_rpm: Force use of 'rpm -qa' to check for installed library\
            packages. If -r and -l are both specified concurrently, then behavior\
            is unspecified.
        show_help: Show this synopsis and exit.
        show_version: Show a version number and exit.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `FsLibCheckOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(FS_LIB_CHECK_METADATA)
    cargs = []
    cargs.append("fs_lib_check")
    if use_ldconfig:
        cargs.append("-l")
    if use_rpm:
        cargs.append("-r")
    if show_help:
        cargs.append("-h")
    if show_version:
        cargs.append("-v")
    ret = FsLibCheckOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "FS_LIB_CHECK_METADATA",
    "FsLibCheckOutputs",
    "fs_lib_check",
]
