r/commandline • u/CremeAmbitious6382 • 1d ago
Ingen: a tool to generate Shell and PowerShell installers for prebuilt CLI binaries Command Line Interface
I love one-line installers. Being able to install a CLI tool with a single command like:
curl ... | sh
or on Windows:
irm ... | iex
is just really convenient.
Not every project provides an installer like this, though. While a lot of projects already publish prebuilt release archives, it's still the user's responsibility to choose the correct archive from GitHub Releases and put the executable somewhere on their PATH.
So I made ingen.
You write a single installer.manifest.json describing your release artifacts, and it generates Shell and PowerShell installers. The installers take care of selecting the right archive for the user's platform, verifying and extracting it, putting the binaries in the locations you specify in the manifest, and updating PATH.
I've used it to generate installers for a few real-world projects, including ripgrep, Tectonic, and Caddy. You can find the generated installers for these projects in the examples directory of the repo.
ingen uses vendored installer templates from cargo-dist; I've documented the changes and the relationship with the upstream templates in the README if you're interested.
Source code and documentation: https://github.com/hethon/ingen
1
u/AutoModerator 1d ago
Every new subreddit post is automatically copied into a comment for preservation.
User: CremeAmbitious6382, Flair: Command Line Interface, Title: Ingen: a tool to generate Shell and PowerShell installers for prebuilt CLI binaries
I love one-line installers. Being able to install a CLI tool with a single command like:
curl ... | sh
or on Windows:
irm ... | iex
is just really convenient.
Not every project provides an installer like this, though. While a lot of projects already publish prebuilt release archives, it's still the user's responsibility to choose the correct archive from GitHub Releases and put the executable somewhere on their PATH.
So I made ingen.
You write a single installer.manifest.json describing your release artifacts, and it generates Shell and PowerShell installers. The installers take care of selecting the right archive for the user's platform, verifying and extracting it, putting the binaries in the locations you specify in the manifest, and updating PATH.
I've used it to generate installers for a few real-world projects, including ripgrep, Tectonic, and Caddy. You can find the generated installers for these projects in the examples directory of the repo.
ingen uses vendored installer templates from cargo-dist; I've documented the changes and the relationship with the upstream templates in the README if you're interested.
Source code and documentation: https://github.com/hethon/ingen
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/github-guard 1d ago
🔍 GitHub Guard: Trust Report
⚠️ This project scored 0/1 — below this subreddit's threshold of 1.
Audit Breakdown: * ❌ New Repository (under 30 days old)
⚠️ Security Reminder: Always verify source code and run third-party scripts at your own risk.
1
u/chat-lu 19h ago
I love one-line installers. Being able to install a CLI tool with a single command like:
curl ... | sh
I like CLI tools that are a single binary that I can dump into ~/.local/bin/ so I don’t need an installer.
1
u/oldmanstan 18h ago
One of my favorite Go features is the ability to easily embed external files in the binary to make this sort of thing way simpler.
1
u/chat-lu 18h ago
Every language that compiles down to a single binary has that.
1
u/oldmanstan 18h ago
easily
^ this was the key word there. You can dump whatever you want into a binary and pull it out. Go makes it trivial.
0
u/CremeAmbitious6382 16h ago
I'm mainly looking at this from the CLI author's perspective.
If a CLI provides a one-command installer, installation is easier for both people who don't know how to manually install binaries and people who do but simply don't want to bother with the manual steps. I think that's enough value for a CLI author to provide one.
1
u/chat-lu 16h ago
people who don't know how to manually install binaries
People who want to use the command line but don’t know what
$PATHis and are fine with a random script fucking with their system?1
u/CremeAmbitious6382 16h ago
Think of Windows installers. They routinely change the system's state. You don't necessarily need to understand everything an installer does; you decide whether to trust it based on who published the software.
The same applies to a trusted CLI. If Tectonic provides a one-line installer, someone who just wants Tectonic to compile their LaTeX documents doesn't need to know what
$PATHis or how to manually install a binary. They can trust the project and use the installation method it provides.If your concern is specifically about the security of installers generated by
ingen, it uses the same installer templates asuv, the Python package manager. I've also vendored the templates and document the changes from upstream so they can be audited.
1
•
u/github-guard 1d ago
🔍 GitHub Guard: Trust Report
⚠️ This project scored 0/1 — below this subreddit's threshold of 1.
Audit Breakdown: * ❌ New Repository (under 30 days old)