CrystalMcp::Utils
Helper utilities for common operations.
Constants
Log = ::Log.for("utils")
Class methods
run_command(command : String, args : Array(String), dir : String | Nil = nil, timeout : Time::Span = 30.seconds) : CommandResult
Executes an external command and captures its output.
Returns a CommandResult containing stdout, stderr, and exit code.
Parameters:
command: The executable to run.args: An array of arguments to pass to the command.dir: Optional working directory for the command.timeout: Maximum time to wait for the command to complete.