Skip to content

Repository files navigation

Ingen (Installer Generator)

Generate curl | sh and irm | iex installers for your project's binary releases.

ingen takes a small JSON manifest describing your release artifacts and generates portable shell and PowerShell installers.

Installation

npm install --global ingen-cli

Why?

One-line installers (curl | sh and irm | iex) provide a great installation experience for users, but writing and maintaining portable shell and PowerShell installers is surprisingly involved.

While exploring how to add this kind of installer to a project, I discovered dist, a distribution automation tool that generates high-quality shell and PowerShell installers while also building, packaging, and publishing software.

dist solves a broader problem than the one I was trying to solve. It provides an opinionated, end-to-end release pipeline that automates building, packaging, publishing, and installer generation. For many projects, that's exactly the right solution.

ingen is for the cases where you only want installer generation. You describe the release artifacts you already produce, and ingen generates the same style of shell and PowerShell installers without taking over the rest of your release process.

Quick start

Initialize a new manifest:

ingen init

This creates an installer.manifest.json with valid placeholders and a $schema reference. Most editors will automatically pick up the schema and provide validation, field suggestions, and documentation as you edit.

Edit the manifest to describe your project's release artifacts.

If you publish releases on GitHub, you can leave checksum fields out of the manifest and let ingen sync fill them in from the release assets:

ingen sync installer.manifest.json

ingen sync fetches the checksums published by GitHub for each release asset and updates the manifest accordingly.

Once your manifest is ready, generate the installers:

ingen generate installer.manifest.json ./dist

This produces:

  • dist/installer.sh
  • dist/installer.ps1

Upload both files to any location accessible over HTTPS (for example, as assets on a GitHub release), then link to them from your documentation:

curl --proto '=https' --tlsv1.2 -LsSf https://example.com/installer.sh | sh
powershell -ExecutionPolicy Bypass -c "irm https://example.com/installer.ps1 | iex"

Updating Installers for New Releases

When you release a new version of your project, you can update your ingen manifest and regenerate the installers as part of your release process.

The fields that usually change are app_version and the archives[].checksum fields.

If your release artifacts are hosted on GitHub, ingen sync can update both app_version and checksum fields from the new release's assets:

ingen sync installer.manifest.json --app-version <new-version>

Whether you manually updated the manifest or used ingen sync, the next step is to regenerate the installers using the updated manifest:

ingen generate installer.manifest.json ./dist

Examples

The examples/ directory contains complete manifests for real-world projects.

In particular, examples/caddy demonstrates how a Go project maps its release artifacts to Rust target triples, which ingen uses to identify supported platforms.

Acknowledgements

ingen builds on ideas and engineering from the dist project.

In particular, it vendors dist's installer templates and ports its platform compatibility logic.

About

Generate Shell and Powershell installers for your project's binary releases.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages