Chocolatey Package Builder is an early-stage .NET project for generating Chocolatey packages from Windows installer files and saved custom installer projects. It currently includes a shared packaging core, a Spectre.Console-based CLI, an Avalonia GUI, and a launcher executable that chooses between them.
This project is very early in development. Expect rough edges and changing command/UI behavior. Generated scripts should be reviewed before distribution.
- Detects common installer types:
- MSI
- Inno Setup
- NSIS
- Generates
tools/chocolateyInstall.ps1with installer-specific silent arguments. - Builds
.nupkgpackages directly when the installer type is known. - Creates scaffolded package templates when the installer type is unknown or when manual review is preferred.
- Packs a reviewed scaffold directory into a
.nupkg. - Saves
.cpbprojcustom installer projects containing package metadata, bundled files, and ordered install actions. - Builds custom project packages with generated scripts for copying files and starting files with arguments.
- Provides one launcher executable: starts the GUI with no arguments, or routes arguments to the CLI.
- .NET 10 SDK
- Chocolatey knowledge for reviewing generated package scripts before distribution
From the repository root:
dotnet build ChocolateyPackageBuilder.slnxThe ChocolateyPackageBuilder launcher is the main entry point. It starts the GUI when run without arguments and runs the CLI when arguments are provided.
Start the GUI:
dotnet run --project ChocolateyPackageBuilderRun a CLI command through the launcher:
dotnet run --project ChocolateyPackageBuilder -- build path/to/installer.exe \
--name example-package \
--version 1.0.0 \
--maintainer "Your Name" \
--description "Chocolatey package for Example." \
--output ./artifactsIf you run the launcher with build but omit the installer path, the CLI starts an interactive prompt.
By default, build uses automatic detection:
dotnet run --project ChocolateyPackageBuilder -- build path/to/installer.exe --type autoSupported values:
automsiinnonsisscaffold
Use scaffold when you want a template directory instead of a direct package build:
dotnet run --project ChocolateyPackageBuilder -- build path/to/installer.exe --type scaffoldReview the generated tools/chocolateyInstall.ps1, then pack the scaffold:
dotnet run --project ChocolateyPackageBuilder -- pack path/to/package-template --output ./artifactsThe GUI's New custom project wizard creates .cpbproj files, then opens a dedicated workspace for adding bundled files, stacking install components such as copy/run actions, previewing the generated script, saving, and building the project package.
Saved projects are portable: GUI-added files are copied under the project files/ directory, while literal action paths such as %ProgramFiles%\Vendor\app.exe are evaluated on the installing computer.
Pack a saved project from the CLI:
dotnet run --project ChocolateyPackageBuilder -- pack path/to/project.cpbproj --output ./artifactsThe GUI opens on a quick installer wizard for selecting an installer, detecting its type, entering metadata, choosing output, reviewing the generated script, and building a package or scaffold. Custom projects use the same wizard pattern for creation and a separate IDE-like workspace with a collapsible file sidebar, component stacker, script preview, settings drawer, and global bottom status bar.
ChocolateyPackageBuilder/ Launcher executable; GUI with no args, CLI with args
ChocolateyPackageBuilder.Core/ Shared package generation and installer detection logic
ChocolateyPackageBuilder.Cli/ Command-line interface
ChocolateyPackageBuilder.Gui/ Avalonia desktop interface
This repository is under active, early development. Generated scripts should be reviewed before use. Expect additional installer support, packaging options, and UI improvements in future updates.
This project is licensed under the terms in LICENSE.