Ensures the repo has a standard root setup.sh: installs zz-use + the
common zz-* bundle from tomgrv/scripts,
then execs the repo's package.json "main" field (falling back to a root
main.sh, or just stopping if neither exists), forwarding any args
through. This is the same setup.sh pattern used by
perspikapps/vps.
setup.sh is checked (and deployed or repaired if missing/stale) on every
container start, so a hand-edited or accidentally deleted setup.sh
self-heals back to the standard.
"features": {
"ghcr.io/tomgrv/devcontainer-features/scripting:11": {}
}npx tomgrv/devcontainer-features -- add scripting
# or, without node/npm:
curl -fsSL https://raw.githubusercontent.com/tomgrv/devcontainer-features/develop/setup.sh | sh -s -- add scriptingnpm install --save-dev @tomgrv/devcontainer-features-scriptingsetup.sh on its own only bootstraps zz-use; to have it run your repo's
own entrypoint, add a "main" field to your root package.json:
{
"main": "dispatch.sh"
}or drop a root main.sh. Without either, setup.sh installs zz-use and
stops - which is a valid end state for a plain scripts library (see
tomgrv/scripts's own setup.sh).