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

import typing
import pathlib
from styxdefs import *
import dataclasses

LISTSUBJ_METADATA = Metadata(
    id="e9369381138405e14a70273bc76d2a91dd2f8045.boutiques",
    name="listsubj",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


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


def listsubj(
    subject_dir: str,
    runner: Runner | None = None,
) -> ListsubjOutputs:
    """
    List subject IDs in SUBJECT_DIR.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        subject_dir: Directory where subjects are stored.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `ListsubjOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(LISTSUBJ_METADATA)
    cargs = []
    cargs.append("listsubj")
    cargs.append("[OPTIONS]")
    cargs.append(subject_dir)
    ret = ListsubjOutputs(
        root=execution.output_file("."),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "LISTSUBJ_METADATA",
    "ListsubjOutputs",
    "listsubj",
]
