GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pkgxdev/setup: GitHub Action and `curl pkgx.sh | sh`

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

289 Commits
289 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
action.js
action.js
 
 
action.yml
action.yml
 
 
installer.ps1
installer.ps1
 
 
installer.sh
installer.sh
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

Repository files navigation

pkgx

  • This repository provides the pkgx GitHub Action.
  • It also hosts installer.sh; the result of curl pkgx.sh.

GitHub Action

- uses: pkgxdev/setup@v4

Installs the latest version of pkgx.

Note

  • v3 & v4 default to pkgx^2
  • v2 defaults to pkgx^1

See action.yml for all inputs and outputs, but here’s the usual ones:

- uses: pkgxdev/setup@v4
  with:
    +: [email protected]
       [email protected]   # we understand colloquial names, generally just type what you know
       clang       # versions aren’t necessary if you don’t care

The easiest way to know if it will work in the action is to try it locally on your computer:

$ pkgx +rust
# if there’s output, we got it

See @pkgxdev/dev to run the dev command in a GitHub Actions compatible manner

Should you Cache ~/.pkgx?

No. pkgx packages are just tarballs. Caching is just a tarball. You’ll likely just slow things down.

Version History

  • v5 defaults to pkgx^2, uses node^24 and doesn’t install any pre-reqs on Linux†
  • v4 defaults to pkgx^2, uses node^20 and doesn’t install any pre-reqs on Linux†
  • v3 defaults to pkgx^2 and uses node^20
  • v2 defaults to pkgx^1 and uses node^20
  • v1 defaults to pkgx@latest and uses node^16
  • v0 should not be used

† pkgx requires glibc>=2.28, libgcc, libstdc++ and libatomic. Generally images come installed with these. If you are building binaries you may need the -dev versions of these packages also.

 

The pkgx Installer

To install pkgx:

$ curl https://pkgx.sh | sh

# - installs `pkgx` & `pkgm` to `/usr/local/bin`
# - if both are already installed, does an update check

Or on Windows:

$ irm https://pkgx.sh | iex
# - installs `pkgx.exe` to `$env:ProgramFiles/pkgx`
# - adds it to your system PATH

Temporary Sandboxes

To use pkgx to run a command in a temporary sandbox:

$ curl -Ssf https://pkgx.sh | sh -s -- gum spin -- sleep 5

# - if pkgx is installed, uses that installation to run gum
# - if pkgx *isn’t* installed, downloads pkgx to a temporary location
# - if pkgx *isn’t* installed, packages are also cached to a temporary location

This usage of our installer can be useful for demonstrative purposes in READMEs and gists.

This syntax is easier to remember:

sh <(curl -L pkgx.sh) gum spin -- sleep 5

There is the notable caveat that the above easier syntax will not work with bash <4 which is the bash that comes with macOS. Even though macOS has defaulted to zsh for years it is still relatively easy for users to end up in a situation where bash is the shell interpreting your commands. Your call.

Additionally, use of -L is subject to man-in-the-middle attacks. Again your call.

About

GitHub Action and `curl pkgx.sh | sh`

Topics

github-actionsinstaller-script

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

144 stars

Watchers

7 watching

Forks

47 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.