clyops Node API
    Preparing search index...

    Interface RunOptions

    Environment, working directory, input/output handling, timeout, and cancellation for an executable.

    interface RunOptions {
        cwd?: string;
        env?: ProcessEnv;
        maxOutput?: number;
        onStderr?: (chunk: string) => void;
        onStdout?: (chunk: string) => void;
        signal?: AbortSignal;
        stdin?: string | Readable | Buffer<ArrayBufferLike>;
        stdout?: "text" | "buffer" | "stream";
        timeoutMs?: number;
    }

    Hierarchy (View Summary)

    Index
    cwd?: string

    Working directory used to resolve command-line paths and execute tools.

    env?: ProcessEnv

    Environment supplied to the process or read for option defaults.

    maxOutput?: number

    Keep at most this many bytes of stdout and of stderr (0 or unset: all); the rest is dropped and truncated set.

    onStderr?: (chunk: string) => void

    Called for each decoded stderr chunk.

    onStdout?: (chunk: string) => void

    Called for each decoded stdout chunk.

    signal?: AbortSignal

    Abort the process tree (SIGTERM, then SIGKILL after a short grace period).

    stdin?: string | Readable | Buffer<ArrayBufferLike>

    Fed to the tool's stdin, which is closed otherwise.

    stdout?: "text" | "buffer" | "stream"

    How stdout is kept: 'text' (default) as a string, 'buffer' as bytes in stdoutBuffer for binary output, or 'stream' not at all: read it from start()'s stdout as the tool writes it.

    timeoutMs?: number

    Kill the tool and its process tree after this long; 0 or unset waits forever.