Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Console
open Axial.FileSystem
open Axial.PlatformService
open Axial.Process

Processes

Install Axial.Process and open the two namespaces used below:

dotnet add package Axial.Process
Show page setup
open Axial.Process
open Axial.Process.DSL
let shouldEqual expected actual =
    if actual <> expected then failwithf "Expected %A but got %A" expected actual
Verified
open Axial.Process
open Axial.Process.DSL

The checked examples on these pages run native commands such as printf, sh, wc, cat, and sleep, so they assume a Unix-like toolchain. On Windows, run them from WSL, Git Bash, or another POSIX shell, or adapt the commands to pwsh/cmd equivalents; the DSL and failure model are unchanged.

A command is a description, not a running process. Configure it, connect commands into a pipeline if needed, then choose where to run it:

Verified
let command = cmd $"printf hello"
Verified
command |> Process.run |> _.StdOut |> shouldEqual "hello"

For scripts, Process.run returns a successful value and raises ProcessRunException on failure. Use Process.tryRun when the caller needs to inspect the full Exit. In an application, convert a command to a lazy Flow with toFlow and bind it into the surrounding flow { } instead.

Command construction does no I/O; execution does. Axial owns the child processes it starts, including their cancellation and cleanup. It does not invoke a shell unless you explicitly choose one.

Guides

  1. Commands and composition — arguments, settings, pipelines, and plans.
  2. Run a process in an application Flow — provide the process service and compose with application work.
  3. Worked examples — complete process workflows.

How-to

Reference

The Axial.Process API reference lists the public types and members. Authored API introductions to Process and the DSL explain how the main groups fit together. Use the reference when you know the name and need its signature or exact contract. The guides cover when to use each operation.