Skip to content

toolbx

Run commands or block-scoped operations inside a Toolbx container.

Functions

run cmd *args … -> nil

Runs a command inside a toolbox container.

Parameters

NameTypeDescription
cmd (Str | fs.Path) Program to run.
:name? Str Toolbox container. Defaults to the default toolbox.
:cd? (Str | fs.Path) Working directory in the container.
:env? BaseDict[Str | Sym, Value] Environment overrides. nil unsets a variable, and :INHERIT: copies it from the calling context.
*args Value Arguments passed verbatim to cmd.
< Iter[Value]
> Sink[Str]

Example

toolbx.run dnf list --installed name: fedora-toolbox-41

with[R] block … -> R

Runs block inside a toolbox container.

Filesystem access, spawned programs, and environment use the toolbox for the duration of the block.

Parameters

NameTypeDescription
block (() -> R) Block to run.
:name? Str Toolbox container. Defaults to the default toolbox.
:cd? (Str | fs.Path) Initial working directory in the container.
:env? BaseDict[Str | Sym, Value] Initial environment overrides. nil unsets a variable, and :INHERIT: copies it from the calling context.

Example

toolbx.with do run dnf list --installed