Manage the Container
container system start/stop/status
Start a machine container
container machine set --home-mount rw(default)/ro/none {machine-name}
container machine run -n {machine-name}
container machine stop {machine-name}
Example of Pi Sandboxing
function ,sandbox() {
bwrap \
--ro-bind / / \
--bind "$PWD" "$PWD" \
--bind "$HOME/.pi/" "$HOME/.pi/" \
--bind "/tmp" "/tmp" \
--chdir "$PWD" \
--share-net \
--dev /dev \
--proc /proc \
--die-with-parent \
--setenv PS1 "sandbox:\w\$ " \
bash --norc
}
Start Pi (disabling built-in clipboard handler)
pi --tui-mode regular
Configure Z.ai key
export ZAI_API_KEY={key}
macos