@@ -11,21 +11,19 @@ Install `pkgx` packages to `/usr/local`.
1111
1212``` sh
1313$ pkgm install node
14- # ^^ installs latest git to ~/.local. ie. you get ~/.local/bin/git
14+ # ^^ installs latest node to ~/.local. ie. you get ~/.local/bin/node
1515
1616$ pkgm install node@20.1
17- # ^^ installs git^2.41 or switches out the installed git to 2.41
17+ # ^^ installs node^20.1 or switches out the installed node to 20.1
1818
1919$ pkgm uninstall node
2020
2121$ sudo pkgm install node
22- # ^^ installs git to /usr/local. ie. you get /usr/local/bin/git
22+ # ^^ installs node to /usr/local. ie. you get /usr/local/bin/node
2323
2424$ pkgm shim node
25- # ^^ creates a shim for git in ~/.local/bin
26- # these shims mimic the pkgx v1 lazy-loading shims, and are desirable for
27- # certain types of self-healing and dev-setup containers, among other things
28- # requires pkgx^2.4.0 for --shebang option
25+ # ^^ creates a shim for node at ~/.local/bin/node
26+ # see the docs below for details about shims
2927
3028$ pkgm list
3129# ^^ lists what’s installed
@@ -51,9 +49,20 @@ $ sudo pkgm update
5149>
5250> You should probably ` sudo pkgm install ` rather than install to ` ~/.local ` .
5351> This is because many other tools will not look in ` ~/.local ` for packages
54- > _ even_ if it’s in ` PATH ` .
52+ > _ even_ if it’s in ` PATH ` . Having said this—by all means—see how it goes!
53+
54+ > ### Shims
55+ >
56+ > Shims are files with a single line, eg ` #!/usr/bin/env -S pkgx -q! node@22 ` .
57+ >
58+ > Thus using the shell to reinvoke the file via ` pkgx ` . You get all the benefits
59+ > of an installed package without actually having to install it. Desirable
60+ > traits for certain types of self-healing, devops containers and plenty more
61+ > one-off or ephemeral tasks.
5562>
56- > Having said this, by all means see how it goes!
63+ > Shims are pretty great—but have caveats. Some software might be surprised that
64+ > a package is not fully “installed” and lead to errors. In practice we have
65+ > seen issues only rarely and for more complex package combinations.
5766
5867## Installation
5968
0 commit comments