
A contributor’s guide to scaffolding, implementing, and verifying new cross-platform components within the LibScript ecosystem.
You don’t need to learn a complex DSL or a new programming language. If you can write a basic shell script, you can write a LibScript component. The framework abstracts away argument parsing, OS detection, help-text generation, and testing harnesses, letting you focus entirely on the core installation logic.
_lib/_toolchain/my_tool).cli.sh and
cli.cmd from the _common directory to
automatically gain CLI routing and JSON schema parsing.vars.schema.json. Define your variables, defaults, and
descriptions. The framework will automatically generate
--help documentation and wire these up as environment
variables.
nodejs or postgres), add
"is_libscript_dependency": true to the variable property.
cli.sh and cli.cmd will automatically invoke
the installation of the specified component, honoring the generated
_STRATEGY properties, before setup.sh
begins.setup.sh:
. "$SCRIPT_DIR/../../_common/os_info.sh"depends curl unzipsetup_win.ps1 for PowerShell logic.test.sh to compile
a Hello World or ping a service.setup.sh must be
safe to run multiple times. Always check if a config line exists before
appending it.$PREFIX variable. Components should be capable of
installing globally (e.g., /usr/local) or locally (e.g.,
./my_env).setup.sh. All inputs must be passed via CLI
arguments defined in vars.schema.json.pkg_mgr.sh for universal dependency installation.LIBSCRIPT_CACHE_DIR).