module CrystalMcp::Utils

Overview

Helper utilities for common operations.

Defined in:

utils.cr

Class Method Summary

Class Method Detail

def self.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.

[View source]