FAQ
Last updated
Last updated
pkgx
?Typically you want to upgrade pkgx
so either:
brew upgrade pkgx
; or
curl -LSsf pkgx.sh | sh
Unless otherwise instructed, pkgx
executes the latest version of packages thatare downloaded. The first time you run a package the latest version will be
downloaded, but after that updates will only be fetched if requested or required
by other packages.
For us neophiliacs we have written a [mash
] script to upgrade your pkgx
packages:
Use .
A package is:
A plain tarball containing a single project for a single platform and architecture compiled from that project’s sources
A bundle of metadata (package.yml
) from the [pantry]
Relative to some other packaging systems:
No scripts are executed post “install”
Packages must work from any location (we say our pkgs are “relocatable“)
The commonly used @
syntax would evaluate to v20.1.x (@20.1.3
).
Which will match node v20.1.3 up to but not including v21.
+pkg
syntax do?+pkg
syntax is a way to include additional pkgs in your environment. Typingpkgx +deno
dumps the environment to the terminal, if you add additional
commands then those commands are invoked in that environment.
We have created a [mash
] script to list everything pkgx
has downloaded:
All packages are encapsulated in individual, versioned folders in ~/.pkgx
just
like brew
so you can just browse them with a file browser.
Everything goes in ~/.pkgx
. eg. Deno v1.2.3 is an independent POSIX prefix at~/.pkgx/deno.land/v1.2.3
, thus the deno
executable is at~/.pkgx/deno.land/v1.2.3/bin/deno
.
We also create symlinks for majors, minors and latest:
Open source is vast and unregulated, thus we use fully-qualified naming scheme to ensure pkgs can be disambiguated.
~/.pkgx
into my distributable app?Yes! Our pkgs are relocatable.
You can also recommend our shell one-liner if you like:
This is neat because pkgx
is not installed and it runs your package from a
temporary location making this a very low friction way to try out your package.
Finally, you can have them try your package out via our Docker image:
pkgx
?Then there are a couple platform specific cache/data directories:
Though not a problem unique to pkgx
you should note that tools run with pkgx
may have polluted your system during use. Check directories like:
~/.local
~/.gem
~/.npm
~/.node
etc.
@
syntax?@3
→ ^3
@3.1
→ ~3.1
@3.1.2
→ >=3.1.2<3.1.3
@3.1.2.3
→ >=3.1.2.3<3.1.3.4
etc.
pkgx
store filesPackages are downloaded to $PKGX_DIR
if set. If not set:
macOS
~/Library/Packages
if the directory exists
~/.pkgx
otherwise
*nix
~/.pkgx
if the directory exists
${XDG_DATA_HOME:-$HOME/.local/share}/pkgx
otherwise
Some cache data is stored:
~/Library/Caches/pkgx
on Mac
${XDG_CACHE_HOME:-$HOME/.cache}/pkgx
on *nix
%LOCALAPPDATA%/pkgx
on Windows
We error with a method to disambiguation, eg:
man foo
won’t work since pkgx pkgs are not “installed”. Thus you have to first
create an environment that contains that package before invoking man
:
This uses pkgx’s man
tool. To use the system man
:
pkgx
GPG Public Key?Sorry about that. Open a asking for it and we’ll build it.
To provide more control we support the. So for the
given example we would use the caret (^
):
Open source is ever moving and somebody needs to keep up with it. You may need to contribute to the .
We would love to support all platforms. All that is holding is back from new platforms is expertise. Will you help? .
You need to add to the .
The rules for @
are complex, but more human. We convert them to the following syntax:
.