13 ms·
Ask HN: What's the best CLI installation experience you've ever seen?
Imagine any application, server, or system that requires installation from a command line.
It could use shell scripts, custom programs, or whatever. What's the best experience and tooling you've ever seen?
- pnocera 3y agoTailscale
- nektro 3y agogetting it from linux package manager
- bin_bash 3y agocan't beat homebrew imo
- bagels 3y agoIsn't homebrew the one that always wants to update everything all the time?
- cglong 3y agoYep. Especially fun when Homebrew doesn't provide binaries for your OS anymore and you have to compile the latest version of Rust from source just to get ripgrep.
- cpach 3y agoMacPorts might be a better fit for older versions of macOS.
- hnarayanan 3y agoAlso current
- dagw 3y agoOr when it replaces an old version of a library with a new, not backwards compatible version, behind your back and breaks stuff.
- wwalexander 3y agoYou can! It’s called MacPorts and it was created by an ex-Apple employee and the creator of the original FreeBSD ports system. It’s better in almost every way, plus it has more packages.
- Cloudef 3y agoat breaking your system?
- mikewarot 3y agoWindows Portable Applications... copy them into a folder, and run them. No installation required. Because there isn't a stable system interface table in Linux (i.e. INT 21, AH=9 prints a $ delimited string in MS-DOS, and has since the 1980s), you can't just run an executable. The closest you're likely to get is Justine's APE - Actually Portable Executable[1] to get something you can distribute and just run. [1] https://justine.lol/ape.html https://justine.lol/ape.html
- turtlebits 3y agoThat's pretty much how most Mac apps are installed.
- archargelod 3y agoI have a gripe with Portable Windows Apps or more precisely with a way they are distributed. Web is filled with scams, malware, phishing or just insecure web pages.Even when a source code of a program is public and download page is genuine, how could I ever trust the binary? I can't, but I can verify the source code (or take a risk that someone already examined it) and trust transparent CI chain. So even if it comes from the respected developer I won't run a notavirus.exe, unless it was compiled automatically in a public docker container. P.S. Another option for more portable linux executables is musl C library + appimage.
- self_awareness 3y agoThere is AppImage[1], which packs a lot of stuff into a SquashFS filesystem, appends it to the executable, so everything is in one file. [1] https://appimage.org https://appimage.org
- pjc50 3y ago> you can't just run an executable. Yes you can! You can run unmodified Win32 executables from the late 90s on present-day Windows systems and they work just fine. Windows has a great reputation for continuity. There is a stable system interface, it's user32.dll and friends. You might experience a bit more pain relating to the Visual Studio runtime (vcredist) or use of COM components, but those are work-aroundable. APE is something rather different: it's portable across different operating systems with different executable formats! Quite the technological achievement.
- alexjplant 3y agoThis probably isn't in the spirit of what you're asking but watching my Dad install Red Hat using Anaconda in the late 90s was pretty sweet. I seem to recall Debian having a similar TUI that I used to load it on my long-obsolete iMac G3 back in college. Good times.
- oweiler 3y agocurl https://whatever.it.is https://whatever.it.is | bash
- websap 3y agoYIKES!
- isopede 3y agocurl https://what.could.possibly.go.wrong/totally.not/a/virus.exe | sudo bash
- leokennis 3y agoPersonally I just contact the maintainer of the package and give them SSH and root access to my machine.
- xyzwave 3y ago“curl | sudo bash” ;-)
- joshxyz 3y agothis is my favourite. it just works. this is the utopian world i am living in. ignorance is bliss. it really is.
- 1vuio0pswjnm7 3y agoStatic binary. Compile, move to folder, set permmissions, done. Outside of that, NetBSD. Download "install kernel", write to media, boot, compile an entire system. FreeBSD is also good. Pet peeve: I see lots of tiny system projects that look very cool but only boot from qemu.
- hosteur 3y agoAnything packaged for Debian. apt install whatever.
- cozzyd 3y agodnf
- mdwalters 3y agopnpm. Really fast, and user-friendly. Too bad it's not backwards-compatible with npm. I use it for all of my Node.js projects, but I sadly have to use npm when jumping into the frontend of project I volunteer on. Another one would be Nala, I used this as my day-to-day apt frontend before I switched to Fedora. It makes the UX much more better than apt for daily usage.
- im_lince 3y agoOne-line installations: I usually don't like running multiple commands for installing a CLI tool. curl/wget the setup file and execute it. Single command -> single step -> no friction.
- ukuina 3y agoThe best installation experience is no installation. My favorite: Single binary Hashicorp Nomad, the same binary for client and server! Runs without sudo, straight out of /tmp.
- fuzztester 3y agoBetter than the best: No installation, but everyone runs the same single binary straight from the shared local area network drive. :) Naysayers: don't worry, bandwidth isn't an issue, it's a high-speed LAN, and the wire won't catch fire, even if it is FireWire. https://en.m.wikipedia.org/wiki/IEEE_1394 https://en.m.wikipedia.org/wiki/IEEE_1394
- fuzztester 3y agoBetter than the better than the best: JNLP https://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jnlp.html https://docs.oracle.com/javase/tutorial/deployment/deploymen...
- smashed 3y agoYou are trolling. JNLP still sends shivers down my back. It is still in use to this day. Hugh.. It sucked when it was new and still does just as bad.
- fuzztester 3y agoNo, I was not trolling. Joking, about the LAN suggestion (although the method does work, it was there from Novell Netware days), but not trolling about the JNLP suggestion. I genuinely thought it would work. I stopped using Java probably a bit before JNLP came out, so never checked it out. What sucked about JNLP? I can google, but what was your experience with it?
- psd1 3y agoIME, managing runtimes. Not GP, but: Oh, JRE too old? Link to download the latest? Now it accepts the JRE, but the JRE refuses it with security errors. So you turn those checks off and the jnlp runs but crashes with an obscure error. So you try another JRE until you find a version that works. While doing this, you interact with Oracle, at all times with the fear of their lawyers, until you decide to use a foss runtime. Now you are managing runtimes from different vendors with different configs and locations. Write once, troubleshoot everywhere.
- Cloudef 3y agosudo nixos-rebuild --flake .#nixos-linux switch
- lrvick 3y agoAs long as your threat model does not care about supply chain attacks, nix is great.
- Twey 3y agoNix caches are signed — what additional supply-chain attacks are you thinking of? I think if the attacker gets hold of a distribution machine + a trusted private key you're in trouble no matter your distribution model — even if you download every single package you use as source, carefully read it, and then build it yourself (which of course we all do) you're still vulnerable to ‘trusting trust’–style attacks.
- lrvick 3y agoSigned by a central server. Not by the actual authors. One stolen Github account or one compromised build server and the whole thing comes crashing down. Mature operating systems that have supply chain risks in their threat model like Debian, Arch, or FreeBSD, each author or maintainer signs every contribution which are verified end to end. Even a compromised Github or cloud provider employee can easily disrupt supply chains structured this way. In recent distributions like Nix and Alpine, contributors complained that generating a PGP key is too hard, so they just decided to yolo it as though NPM security was something to aspire to. Even proprietary operating systems like MacOS require code signing. Not mandating this is crazy. IMO anyone unwilling to learn how to maintain a personal identity key of some kind has no business maintaining packages for widely used operating system.
- earthling8118 3y agoYou've got it backwards. If you are worried about supply chain attacks, you may want to consider something like nix.
- thiscatis 3y agoThe symfony-cli is pretty sweet to setup new projects and add dependencies.
- jiffygist 3y agomake -j5 sudo make install also it's really great when `sudo make uninstall` works
- xyzwave 3y ago./configure && make && sudo make install
- joshxyz 3y agozerotier cli url to shell also npm packages that can be executed with npx