Class CliProcessRunner
Executes external processes with timeout support and output capture. Used by CLI commands (bump, commit, release) for git, claude, and other tools.
public class CliProcessRunner
- Inheritance
-
CliProcessRunner
- Inherited Members
Methods
RunAsync(string, string, string?, int, string?, bool)
Runs a process and captures its output.
public virtual Task<CliProcessRunner.ProcessResult> RunAsync(string fileName, string arguments, string? stdin = null, int timeoutMs = 60000, string? workingDirectory = null, bool streamOutput = false)
Parameters
fileNamestringThe executable to run.
argumentsstringCommand-line arguments.
stdinstringOptional input to write to stdin.
timeoutMsintTimeout in milliseconds (default: 60 seconds).
workingDirectorystringWorking directory (default: current directory).
streamOutputboolIf true, streams output to console in real-time.
Returns
- Task<CliProcessRunner.ProcessResult>
ProcessResult with exit code and captured output.
RunClaudeAsync(string, int, bool)
Runs Claude CLI with a prompt and returns the response. Uses --dangerously-skip-permissions to avoid interactive prompts.
public virtual Task<string> RunClaudeAsync(string prompt, int timeoutMs = 120000, bool streamOutput = false)
Parameters
promptstringThe prompt to send to Claude.
timeoutMsintTimeout in milliseconds (default: 2 minutes).
streamOutputboolIf true, streams output to console in real-time.
Returns
Exceptions
- Exception
Thrown if Claude CLI fails.