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

import typing
import pathlib
from styxdefs import *
import dataclasses

MKIMA_INDEX_TCL_METADATA = Metadata(
    id="c105809b402206036812e673c076cf9989e47ed5.boutiques",
    name="mkima_index.tcl",
    package="freesurfer",
    container_image_tag="freesurfer/freesurfer:7.4.1",
)


class MkimaIndexTclOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mkima_index_tcl(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_file: OutputPathType
    """Output file resulting from mkima index operations."""


def mkima_index_tcl(
    input_file: InputPathType,
    output_flag: bool = False,
    runner: Runner | None = None,
) -> MkimaIndexTclOutputs:
    """
    A command-line tool for handling mkima index operations.
    
    Author: FreeSurfer Developers
    
    URL: https://github.com/freesurfer/freesurfer
    
    Args:
        input_file: Input file for mkima index operations.
        output_flag: Flag to specify output for mkima index operation.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MkimaIndexTclOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MKIMA_INDEX_TCL_METADATA)
    cargs = []
    cargs.append("mkima_index.tcl")
    cargs.append(execution.input_file(input_file))
    if output_flag:
        cargs.append("-o")
    ret = MkimaIndexTclOutputs(
        root=execution.output_file("."),
        output_file=execution.output_file(pathlib.Path(input_file).name + "_index_output"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MKIMA_INDEX_TCL_METADATA",
    "MkimaIndexTclOutputs",
    "mkima_index_tcl",
]
