-
Notifications
You must be signed in to change notification settings - Fork 321
build(choco): add Chocolatey package definition for Windows install #1056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Maestro Chocolatey package | ||
|
|
||
| Packaging definition that lets Windows users install Maestro via | ||
| [Chocolatey](https://chocolatey.org/): | ||
|
|
||
| ```powershell | ||
| choco install maestro-ai | ||
| ``` | ||
|
|
||
| The package downloads the official signed NSIS installer | ||
| (`Maestro-Setup-<version>-x64.exe`) from | ||
| [GitHub Releases](https://github.com/RunMaestro/Maestro/releases) and installs it | ||
| silently. The installer binary is never bundled or modified — see | ||
| [`tools/VERIFICATION.txt`](tools/VERIFICATION.txt). | ||
|
|
||
| > **Status:** this provides the package definition. Listing `maestro-ai` on the | ||
| > [Chocolatey Community Repository](https://community.chocolatey.org/packages) | ||
| > is a one-time maintainer step (requires a chocolatey.org account + API key) — | ||
| > see [Publishing](#publishing) below. | ||
|
|
||
| ## Contents | ||
|
|
||
| | File | Purpose | | ||
| | ------------------------------- | ----------------------------------------------------------- | | ||
| | `maestro-ai.nuspec` | Package metadata (id, version, description, links) | | ||
| | `tools/chocolateyinstall.ps1` | Downloads + verifies + silently installs the NSIS installer | | ||
| | `tools/chocolateyuninstall.ps1` | Silently uninstalls via the registry uninstall entry | | ||
| | `tools/VERIFICATION.txt` | How moderators/users verify the downloaded binary | | ||
|
|
||
| ## Build & test locally | ||
|
|
||
| Requires Chocolatey on a Windows machine. | ||
|
|
||
| ```powershell | ||
| cd chocolatey | ||
|
|
||
| # Build the .nupkg | ||
| choco pack | ||
|
|
||
| # Install from the local package to test | ||
| choco install maestro-ai --source . --yes | ||
|
|
||
| # Test uninstall | ||
| choco uninstall maestro-ai --yes | ||
| ``` | ||
|
|
||
| ## Updating for a new release | ||
|
|
||
| 1. Bump `<version>` in `maestro-ai.nuspec` to match the release. | ||
| 2. Update `$url64` and `$checksum64` in `tools/chocolateyinstall.ps1` (and the | ||
| matching url/checksum in `tools/VERIFICATION.txt`). | ||
|
|
||
| Grab the checksum without downloading the 100+ MB installer using GitHub's | ||
| published asset digest: | ||
|
|
||
| ```bash | ||
| gh api repos/RunMaestro/Maestro/releases/tags/<tag> \ | ||
| --jq '.assets[] | select(.name|test("Setup.*exe")) | {name, digest}' | ||
| ``` | ||
|
|
||
| The `digest` field is `sha256:<hash>`; use the `<hash>` portion. | ||
|
|
||
| ## Publishing | ||
|
|
||
| One-time maintainer step (not done by this PR): | ||
|
|
||
| ```powershell | ||
| choco apikey --key <YOUR_API_KEY> --source https://push.chocolatey.org/ | ||
| choco push maestro-ai.<version>.nupkg --source https://push.chocolatey.org/ | ||
| ``` | ||
|
|
||
| New community packages go through Chocolatey's moderation review before they | ||
| appear in search. After the initial listing, this can be wired into the release | ||
| pipeline (`.github/workflows/release.yml`) to push automatically on each tag. | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||||
| <?xml version="1.0" encoding="utf-8"?> | ||||||||||
| <!-- Chocolatey package definition for Maestro. See chocolatey/README.md for build/publish steps. --> | ||||||||||
| <package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd"> | ||||||||||
| <metadata> | ||||||||||
| <id>maestro-ai</id> | ||||||||||
| <!-- Keep in sync with the GitHub release pinned in tools/chocolateyinstall.ps1. --> | ||||||||||
| <version>0.15.4</version> | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align package version with the referenced release tag. Line 7 ( Also applies to: 45-45 🤖 Prompt for AI Agents
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| <packageSourceUrl>https://github.com/RunMaestro/Maestro/tree/main/chocolatey</packageSourceUrl> | ||||||||||
| <owners>RunMaestro</owners> | ||||||||||
|
|
||||||||||
| <title>Maestro</title> | ||||||||||
| <authors>Pedram Amini, RunMaestro</authors> | ||||||||||
| <projectUrl>https://runmaestro.ai</projectUrl> | ||||||||||
| <iconUrl>https://raw.githubusercontent.com/RunMaestro/Maestro/main/build/icon.png</iconUrl> | ||||||||||
| <copyright>RunMaestro</copyright> | ||||||||||
| <licenseUrl>https://github.com/RunMaestro/Maestro/blob/main/LICENSE</licenseUrl> | ||||||||||
| <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||||||||||
| <projectSourceUrl>https://github.com/RunMaestro/Maestro</projectSourceUrl> | ||||||||||
| <docsUrl>https://docs.runmaestro.ai</docsUrl> | ||||||||||
| <bugTrackerUrl>https://github.com/RunMaestro/Maestro/issues</bugTrackerUrl> | ||||||||||
| <tags>maestro maestro-ai ai coding-assistant claude-code codex opencode electron developer-tools cross-platform admin</tags> | ||||||||||
| <summary>Maestro hones fractured attention into focused intent.</summary> | ||||||||||
| <description>< page. | ||||||||||
|
|
||||||||||
| ## Notes | ||||||||||
|
|
||||||||||
| Maestro is licensed under the GNU Affero General Public License v3.0. | ||||||||||
| ]]></description> | ||||||||||
| <releaseNotes>https://github.com/RunMaestro/Maestro/releases/tag/v0.15.4-RC</releaseNotes> | ||||||||||
| </metadata> | ||||||||||
| <files> | ||||||||||
| <file src="tools\**" target="tools" /> | ||||||||||
| </files> | ||||||||||
| </package> | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| VERIFICATION | ||
|
|
||
| Verification is intended to assist the Chocolatey moderators and community in | ||
| verifying that this package's contents are trustworthy. | ||
|
|
||
| This package downloads the official Maestro Windows installer directly from the | ||
| project's GitHub Releases. The binary is NOT bundled inside this package and is | ||
| not modified or repackaged in any way. | ||
|
|
||
| Package binary source: | ||
| https://github.com/RunMaestro/Maestro/releases | ||
|
|
||
| The installer downloaded by tools/chocolateyinstall.ps1: | ||
| url: https://github.com/RunMaestro/Maestro/releases/download/v0.15.4-RC/Maestro-Setup-0.15.4-RC-x64.exe | ||
| checksum: 38903F98B940D46E562A37A6659044AC16A6D43361304E57656A727A18123346 (SHA256) | ||
|
|
||
| To verify the checksum yourself: | ||
|
|
||
| PowerShell: | ||
| Get-FileHash .\Maestro-Setup-0.15.4-RC-x64.exe -Algorithm SHA256 | ||
|
|
||
| Or read GitHub's published digest for the asset (no download required): | ||
| gh api repos/RunMaestro/Maestro/releases/tags/v0.15.4-RC \ | ||
| --jq '.assets[] | select(.name|test("Setup.*exe")) | .digest' | ||
|
|
||
| The hash printed must match the checksum listed above and in | ||
| tools/chocolateyinstall.ps1. | ||
|
|
||
| Maestro is licensed under the GNU Affero General Public License v3.0: | ||
| https://github.com/RunMaestro/Maestro/blob/main/LICENSE |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # To update this package for a new Maestro release: | ||
| # 1. Bump <version> in ../maestro-ai.nuspec to the release version. | ||
| # 2. Update $url64 below to the new Maestro-Setup-<version>-x64.exe asset. | ||
| # 3. Update $checksum64 below. Grab it without downloading the installer via: | ||
| # gh api repos/RunMaestro/Maestro/releases/tags/<tag> \ | ||
| # --jq '.assets[] | select(.name|test("Setup.*exe")) | .digest' | ||
| # (returns "sha256:<hash>"), or locally: Get-FileHash <installer> -Algorithm SHA256 | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
| $packageName = 'maestro-ai' | ||
| $softwareName = 'Maestro*' | ||
|
|
||
| # Official NSIS installer published on GitHub Releases. | ||
| $url64 = 'https://github.com/RunMaestro/Maestro/releases/download/v0.15.4-RC/Maestro-Setup-0.15.4-RC-x64.exe' | ||
| $checksum64 = '38903F98B940D46E562A37A6659044AC16A6D43361304E57656A727A18123346' | ||
|
|
||
| $packageArgs = @{ | ||
| packageName = $packageName | ||
| softwareName = $softwareName | ||
| fileType = 'exe' | ||
| url64bit = $url64 | ||
| checksum64 = $checksum64 | ||
| checksumType64 = 'sha256' | ||
| # electron-builder NSIS installer: '/S' performs a silent install. | ||
| silentArgs = '/S' | ||
| validExitCodes = @(0) | ||
| } | ||
|
|
||
| Install-ChocolateyPackage @packageArgs |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||
| $ErrorActionPreference = 'Stop' | ||||||
|
|
||||||
| $packageName = 'maestro-ai' | ||||||
| $softwareName = 'Maestro*' | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||
|
|
||||||
| [array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName | ||||||
|
|
||||||
| if ($key.Count -eq 1) { | ||||||
| $key | ForEach-Object { | ||||||
| $packageArgs = @{ | ||||||
| packageName = $packageName | ||||||
| fileType = 'exe' | ||||||
| # electron-builder NSIS uninstaller: '/S' performs a silent uninstall. | ||||||
| silentArgs = '/S' | ||||||
| validExitCodes = @(0) | ||||||
| file = "$($_.UninstallString)" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
|
|
||||||
| Uninstall-ChocolateyPackage @packageArgs | ||||||
| } | ||||||
| } | ||||||
| elseif ($key.Count -eq 0) { | ||||||
| Write-Warning "$packageName has already been uninstalled by other means." | ||||||
| } | ||||||
| elseif ($key.Count -gt 1) { | ||||||
| Write-Warning "$($key.Count) matches found!" | ||||||
| Write-Warning "To prevent accidental data loss, no programs will be uninstalled." | ||||||
| Write-Warning "Please alert package maintainer the following keys were matched:" | ||||||
| $key | ForEach-Object { Write-Warning "- $($_.DisplayName)" } | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix product name capitalization in docs.
Line 74 should use
GitHub(capital H) for correct platform naming.🧰 Tools
🪛 LanguageTool
[uncategorized] ~74-~74: The official name of this software platform is spelled with a capital “H”.
Context: ...can be wired into the release pipeline (
.github/workflows/release.yml) to push automat...(GITHUB)
🤖 Prompt for AI Agents