[HN Gopher] Pkgx - "Run anything" from the creator of brew
       ___________________________________________________________________
        
       Pkgx - "Run anything" from the creator of brew
        
       Author : cowjan
       Score  : 56 points
       Date   : 2023-10-04 17:10 UTC (5 hours ago)
        
 (HTM) web link (pkgx.sh)
 (TXT) w3m dump (pkgx.sh)
        
       | mdeeks wrote:
       | I literally don't understand the first example. What just
       | happened here? Did pkgx see that I failed to run bun and then
       | just like... installed it and ran it for me? Does that mean on my
       | next prompt I should run `bun` or should I run `pkgx` again?
       | $ bun       command not found: bun       ^^ type `pkgx` to run
       | that              $ pkgx       running `bun`...              Bun:
       | a fast JavaScript runtime, package manager, bundler and test
       | runner.       # ...
        
         | mpalmer wrote:
         | Based on the examples that follow, it seems like pkgx tracks
         | shell history so it can default to the last command if and only
         | if it doesn't exist on $PATH.
        
       | justinclift wrote:
       | Wonder if this is on the wrong side of the convenience vs
       | security balance?
        
       | pineapple_sauce wrote:
       | >"blazingly fast"
       | 
       | > written by homebrew author (brew is notoriously slow)
       | 
       | > written in typescript
       | 
       | hmmm... I have my doubts on that claim, especially when there is
       | no evidence to support it.
        
       | pxc wrote:
       | Looks like this is the same thing as we used to find here:
       | https://tea.xyz/
       | 
       | Which has been turned into some kind of system aimed at
       | generating/distributing F/OSS revenue based on usage via crypto.
       | Pkgx is the package manager that drives it, which used to be
       | called 'tea'.
       | 
       | Here's a previous discussion:
       | https://news.ycombinator.com/item?id=30778924
       | 
       | And a more recent one:
       | https://news.ycombinator.com/item?id=33681216
        
       | mdaniel wrote:
       | fascinating that the "creator of brew" didn't go ahead and shard
       | the package names since it's almost inevitable that GitHub's
       | /tree/ is going to start :sad-trombone: since it is not designed
       | for viewing thousands of directories:
       | https://github.com/pkgxdev/pantry/tree/main/projects
       | 
       | I'm also genuinely surprised they abandoned the sha256 from brew
       | (e.g. "welp, it is what it is"
       | https://github.com/pkgxdev/pantry/blob/main/projects/httpie....
       | ). Ah, it's an _implied_ .sha256 path from their magic
       | distribution something something:
       | https://dist.pkgx.dev/?prefix=httpie.io/
        
       | ar_lan wrote:
       | I know I'm a Nix elitist but I really don't understand why people
       | don't just use Nix for all their package management.
        
         | c7DJTLrn wrote:
         | Because I don't want to learn another complex DSL just to
         | install some packages. Whether Nix is the promised land or not,
         | Brew works just fine 99% of the time and I have stuff to do.
        
           | andrei_says_ wrote:
           | Me, too, and also I already have a bunch of brew packages
           | which I know are well maintained. So, switch to using both?
           | Uninstall brew packages and install nix versions, verifying
           | they are all maintained over there?
           | 
           | Sorry, no.
        
           | turboponyy wrote:
           | You don't need to learn the DSL to use Nix as a package
           | manager.
        
         | rkeene2 wrote:
         | Or AppFS (which I wrote), which gives you all the same benefits
         | of Nix but with less work, though currently has way less
         | packages.
        
         | lreeves wrote:
         | Probably the EVE Online-like learning curve.
        
           | Kinrany wrote:
           | The docs could be better, but it's as easy as:
           | 
           | 1. Install Nix from https://nixos.org/download.html
           | 
           | 2. Find the package from https://search.nixos.org/packages
           | 
           | 3. Start a shell with `nix-shell -p <name>`, have the package
           | available in it
        
           | arp242 wrote:
           | Last time I tried it I couldn't even get it to work. I think
           | I may have hit a bug, but to be honest I'm not sure: I also
           | could have done something wrong.
           | 
           | This was at the "let's download the package repository to get
           | started" step. So, meh...
        
         | paddim8 wrote:
         | Bevause nix is complex. I don't want a complex system, I want a
         | simple system.
        
         | dpc_01234 wrote:
         | `nix run nixpkgs#pkgx -- ...` :D ?
        
       | gorenb wrote:
       | oh my god this is amazing
        
       ___________________________________________________________________
       (page generated 2023-10-04 23:02 UTC)