Require Nushell as the host shell for tailored CLIs (validate + optional relaunch/install).
Report Bug
·
Request Feature
CLI helper library: require Nushell as the host shell for tailored tools.
Nushell-tailored CLIs call validate() near process start:
import{validate}from"@openshellorg/nu-require";awaitvalidate({offerInstall: true});Behavior:
Already under Nushell → continue normally.
Not under Nushell, but
nuis on PATH → relaunch inside Nushell vianu -c.numissing → clear error, link to https://www.nushell.sh/, optionally offer install whenofferInstall: true.
Pass relaunch: false only when you want hard-fail instead of auto-relaunch.
Early scaffold. Loop guard: NU_REQUIRE_RELAUNCHED prevents infinite relaunch.
pnpm add @openshellorg/nu-requireSee packages/nu-require/ for the implementation.
https://github.com/openshellorg/shell-architecture — architecture thesis
https://github.com/openshellorg/docs — SOS flag syntax / certification
https://www.nushell.sh/ — Nushell homepage
MIT — see LICENSE.
Open Shell Org — openshell@devcentr.org