Unix
constUnix: () =>RuntimeAwareBuilder&object=UnixFn
Defined in: packages/runtime/src/root/builder.ts:387
Create a runtime-aware Unix builder with batteries included.
Type Declaration
Section titled “Type Declaration”bare()
Section titled “bare()”bare():
RuntimeAwareBuilder
Same chaining surface as Unix, but without stdSystem(), container management, or TTY auto-detect.
Returns
Section titled “Returns”Remarks
Section titled “Remarks”This is the “one import, one line” entry point for @fishnet/runtime.
Unlike core’s UnixBuilder — which produces an image and hands it
to a runtime (runtime.boot(image)) — this builder auto-detects the
host platform (detectRuntime), auto-wires the TTY on Node.js
(autoTty), and bundles the stdSystem() + container-management
presets by default. Reach for Unix.bare() when you want the same
chaining surface without any defaults.
Every method returns a new builder — state is never mutated.
Returns
Section titled “Returns”A fresh RuntimeAwareBuilder pre-loaded with the standard system preset, container management, and platform / TTY auto-detection.
Examples
Section titled “Examples”import { Unix } from '@fishnet/runtime'
// One import, one line — a full shell on the host TTY:await Unix().boot()Compose extra extensions, then drive a container programmatically:
import { Unix } from '@fishnet/runtime'import { pkgManager } from '@fishnet/core'
const root = await Unix() .use(pkgManager({ sources: ['https://registry.example/'] })) .env('PS1', '\\w $ ') .start()
await root.spawn('sh', ['-c', 'pkg install jq && jq --version'])- RuntimeAwareBuilder
- the core
Unix()factory in@fishnet/core— same chaining shape minus the runtime/TTY/defaults layer - detectRuntime
- autoTty