Command (a description of what to run), ProcessHandle (a live process), and Pipeline (composed execution).
Command
Command describes a single executable invocation with arguments, environment, and working directory. The constructor is internal — use the factory functions or the companion method instead.
Creating commands
Factory functions
Command builder methods (return Command for chaining)
Stdin values
Stdio values
Command execution methods
Companion method
Command that executes script via sh -c.
ProcessHandle
AProcessHandle represents a running process. It is obtained from Command.spawn() or Command.pipeTo().
ProcessHandle properties
ProcessHandle methods
Collecting output
Pipeline
Pipeline allows composing multiple processes where stdout of one feeds stdin of the next. The constructor is internal — build via Command.pipe() infix.
Creating a pipeline
Pipeline methods
Awaiting pipeline completion
Streaming extensions
Thecom.klyx.api.system package provides many extension functions for convenient process handling:
Process utilities
Extension functions onProcess: