Scripting
You can use pkgx
as the shebang for your scripts:
Using env
to invoke pkgx
is typical for tools that have no POSIX location.
The -S
parameter is required to pass multiple arguments.
Including Additional pkgs
Scripts are the glue that allows open source to be composed into powerful new tools. With our +pkg
syntax you make anything in open source available to your script.
Robustness requires precisely specifying your environment:
Scripting for Various Languages & Their Dependencies
Python
Use uv
to import PyPi dependencies:
Ruby
Use Bundler:
JavaScript & TypeScript
Use Deno:
Rust, Go, C, C++, etc
Use Scriptisto:
Mash
We think pkgx
scripting is so powerful that we made a whole package manager to show it off.
Other Examples
We make use of pkgx
scripting all over our repositories. Check them out!
Last updated