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.ProcessProcesses
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 actualThe 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:
let command = cmd $"printf hello"
command: ProcessCommandcmd: FormattableString -> ProcessCommandcommand |> Process.run |> _.StdOut |> shouldEqual "hello"
command: ProcessCommand(|>): 'T1 -> ('T1 -> 'U) -> 'UApply a function to a value, the value being on the left, the function on the right The argument. The function. The function result. let doubleIt x = x * 2 3 |> doubleIt // Evaluates to 6
Axial.Process.Processrun: ^source -> ^resultRuns with live services and returns the value; raises ProcessRunException on failure.
_arg1: ProcessResultStdOut: stringshouldEqual: 'a -> 'a -> unitFor 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
- Commands and composition — arguments, settings, pipelines, and plans.
- Run a process in an application Flow — provide the process service and compose with application work.
- Worked examples — complete process workflows.
How-to
- Capture output or send it elsewhere
- Consume output as it arrives
- Integrate process streams with FlowStream
- Handle failures and inspect results
- Write a script or use shell syntax
- Use stdin, routes, fan-in, or parallel commands
- Use Axial.Process from Fable
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.

