Xeon – Node.js tool for creating modular, reusable shell scripts
I&#x27;ve not played with node.js since the very early days, and never really used NPM. However, I do see the need for modular, composable shell scripts.<p>Personally, I&#x27;ve been using Nix in a similar way, since it also has nice features like caching, laziness, splicing into indented strings, dependency management, etc. For example, if you have a Nix expression stored in &quot;my-script.nix&quot; you can use the following (e.g. in &quot;my-script.sh&quot;) to invoke it:<p><pre><code>    nix-instantiate --read-write-mode --show-trace --eval -E &#x27;import .&#x2F;my-script.nix&#x27;
</code></pre>
The `--eval` tells Nix to evaluate an expression, rather than build a package. `-E` is the expression to evaluate (in this case, importing our &quot;script&quot; file). `--read-write-mode` allows the script to add things to the Nix store. `--show-trace` is to aid debugging.