kosa8 docs

Commands / kosa8 explore

kosa8 explore

Fork a sandbox per approach, run each, and report which worked

Usage

kosa8 explore SANDBOX

Best-of-N exploration. Forks SANDBOX once per --variant, runs that variant's command in its own branch, and reports the exit code, duration and output of each.

Because branches resume with process state intact, expensive setup done once in the parent — dependencies installed, a server warm, a cache primed — is shared by every branch instead of repeated N times.

By default the winning branch is kept and the rest removed. Use --keep-all to inspect every branch, or --keep NAME to choose explicitly.

Options

FlagTypeWhat it doesDefault
--imagestringimage the variant runs inalpine:latest
--keepstringkeep this branch instead of the winner
--keep-allboolkeep every branch for inspection
--timeoutdurationper-branch time limit2m0s
--variantstringArraya command to try in its own branch (repeat; at least two)[]

Example

  kosa8 explore build \
    --variant 'npm test' \
    --variant 'npm test -- --experimental-vm-modules'