v0.2.0
Second release. The core is unchanged; everything new is opt-in.
Switches - settable as a flag OR in the # /// scriptbox frontmatter (flag wins):
--argv0 <rewrite|source|off>- how$0is set. Newsourcemode dot-sources
the script so$0is the real path on every POSIX shell (dash/ksh included),
at the cost of sourced-mode semantics.--subscripts <report|wrap|freeze-tree>- analyze/rewrite a script's child
invocations so the whole tree is frozen, not just the top file:wraproutes shell children (bash child.sh,./x.sh) through scriptbox and
freezes resolvablesource ./lib.shincludes into an inherited immutable fd
(a real fix - zsh'ssourcestreams).freeze-treeadds a launch-scoped, read-only, pin-on-copy snapshot cache so
every invocation of a script in the tree sees the same bytes even against
mid-run edits, plus a depth cap against runaway recursion.
The analyzer is included in these prebuilt binaries.scriptbox gcreaps the
freeze-tree caches.
Checksum pinning now excludes the whole frontmatter block, so switches are
frontmatter-flippable without re-pinning.
POSIX only (macOS + Linux). See the README.
Install
brew install jhheider/tap/scriptbox
curl -fsSL https://heider.cc/scriptbox.sh | sh