Skip to content

Conversation

@lvyuemeng
Copy link
Contributor

@lvyuemeng lvyuemeng commented Jan 13, 2026

Closes: #7526

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • Chores
    • Added a package manifest for Proto v0.54.1 enabling 64‑bit Windows distribution.
    • Provides installer/uninstaller with PROTO_HOME and PATH/shim handling.
    • Adds upstream version check and auto-update rules for 64‑bit builds, including integrity (SHA256) verification.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Walkthrough

Adds a new package manifest bucket/proto.json for Proto v0.54.1 containing metadata, a Windows x64 build artifact (URL + SHA256), pre/post install PowerShell scripts, binary entries, PROTO_HOME/PATH handling, GitHub checkver, and autoupdate rules fetching a hash.

Changes

Cohort / File(s) Summary
Proto Package Manifest
bucket/proto.json
New manifest for Proto v0.54.1: metadata (description, homepage, license), Windows x64 asset with download URL and SHA256, binaries (proto.exe, proto-shim.exe), pre-install and installer/uninstaller PowerShell scripts for PROTO_HOME and PATH/shims, GitHub-based checkver, and autoupdate rules with remote hash retrieval.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped to the repo, a small file to plant,
Proto v0.54.1 — checksum and chant.
Binaries tucked, PATH paths align,
Autoupdate watches the version line.
A rabbit claps softly — manifest, well-timed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'proto: Add version 0.54.1' clearly and concisely describes the main change: adding a new version of the proto package.
Description check ✅ Passed The PR description includes the required checklist items marked complete and references issue #7526, meeting the repository template requirements.
Linked Issues check ✅ Passed The PR adds proto version 0.54.1 manifest to the bucket as requested in #7526, fulfilling the primary objective of adding the Proto package.
Out of Scope Changes check ✅ Passed The only change is adding bucket/proto.json with version 0.54.1 metadata and installation scripts, which directly addresses the linked issue requirement to add the Proto package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

proto

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
bucket/proto.json (1)

34-34: Consider adding a trailing newline.

The file appears to be missing a trailing newline at the end. While not functionally impactful, adding a newline at EOF is a common convention that improves compatibility with various tools and diff outputs.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7ef468 and 48f239b.

📒 Files selected for processing (1)
  • bucket/proto.json
🔇 Additional comments (6)
bucket/proto.json (6)

1-5: LGTM!

Version 0.54.1 is confirmed as the latest release of Proto. The metadata (description, homepage, license) is accurate and complete.


12-15: LGTM!

The binary executables are correctly specified. Both proto.exe (main CLI) and proto-shim.exe (tool shim) are essential for Proto's functionality.


16-19: LGTM!

The environment configuration is well-designed:

  • PROTO_HOME set to $persist_dir ensures Proto's managed tools and configuration persist across Scoop updates.
  • Adding $persist_dir\bin to PATH makes proto-installed tools accessible system-wide.

20-22: LGTM!

The checkver configuration correctly uses the GitHub shorthand to detect new releases from the moonrepo/proto repository.


23-33: LGTM!

The autoupdate configuration is correct:

  • URL template properly uses $version placeholder
  • Hash extraction from $url.sha256 with regex for 64-character hex digest is appropriate
  • Note: If ARM64 support is added to the architecture section, it should also be added here for consistency.

6-11: No changes needed. The manifest correctly includes only the available Windows build for proto v0.54.1. The GitHub release does not provide an ARM64 Windows build (aarch64-pc-windows-msvc); ARM64 builds are limited to Linux and macOS. The SHA256 hash is verified as correct against the official release checksum.

Likely an incorrect or invalid review comment.

@lvyuemeng
Copy link
Contributor Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

proto

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@Lutra-Fs
Copy link
Member

Lutra-Fs commented Jan 15, 2026

@z-Fng

I will try to identify the persist, currently, only .prototools is needed.

The new workflow is shown below, please tell me any potential improvement. If it's the final one, I will refactor the manifest.

  • Extract and move the binaries into $dir/bin.
  • Remove env_add_path, add post script akin to proto.ps1 install script that executes /path/to/proto setup to generate automatically.
  • link .prototools configuration only.

Quote from proto.ps1:

irm https://moonrepo.dev/install/proto.ps1 | iex

  32$TempDir = "${HOME}\.proto\temp\proto\${Target}"
  33$DownloadFile = "${TempDir}.zip"
  3435$InstallDir = if ($env:PROTO_HOME) {
  36"$($env:PROTO_HOME)\bin"
  37 │ } else {
  38"${Home}\.proto\bin"
  39 │ }
  4041$BinPath = "${InstallDir}\proto.exe"
  42$ShimPath = "${InstallDir}\proto-shim.exe"

proto supports 3 locations in which a .prototools file can exist. These locations are used throughout the command line and proto's own settings.
local -> ./.prototools, ..prototools (current directory)
global -> ~/.proto/.prototools, %USERPROFILE%.proto.prototools
user -> ~/.prototools, %USERPROFILE%.prototools

A example of proto environment:

$ proto debug env

Store ─────────────────────────────────────────────────────────────────────

  Root: /Users/name/.proto
  Bins: /Users/name/.proto/bin
  Shims: /Users/name/.proto/shims
  Plugins: /Users/name/.proto/plugins
  Tools: /Users/name/.proto/tools
  Temp: /Users/name/.proto/temp
 
Environment ───────────────────────────────────────────────────────────────

  Proto version: 0.44.0
  Operating system: macos
  Architecture: arm64
  Config sources:
    - /Users/name/Projects/example/.prototools
    - /Users/name/.proto/.prototools
  Virtual paths:
    /userhome = /Users/name
    /proto = /Users/name/.proto
  Environment variables:
    PROTO_APP_LOG = proto=info,schematic=info,starbase=info,warpgate=info,extism::pdk=info
    PROTO_HOME = /Users/name/.proto
    PROTO_OFFLINE_TIMEOUT = 750
    PROTO_VERSION = 0.44.0

The current persist configuration has an issue: Scoop's persist creates directories by default, but proto expects configuration files. You can reference

Main/bucket/px.json

Lines 12 to 14 in 5e985e0

"pre_install": [
"if (Test-Path -PathType Container \"$persist_dir\\px.ini\") { Remove-Item \"$persist_dir\\px.ini\" } # removes folder px.ini if exists",
"if (!(Test-Path \"$persist_dir\\px.ini\")) { New-Item \"$dir\\px.ini\" | Out-Null } # creates config file px.ini if doesn't exist"

@lvyuemeng
Copy link
Contributor Author

lvyuemeng commented Jan 15, 2026

@Lutra-Fs

The current persist configuration has an issue: Scoop's persist creates directories by default, but proto expects configuration files. You can reference.

It doesn't seems a problem, where scoop should automatically detects file. Your example only check the existence of dir only, notice the backslash px.ini\.

@Lutra-Fs
Copy link
Member

I am against calling proto setup directly via CLI, since it will not only modify the PATH, but also the terminal profile. And I did not see a command to reverse the effect by the command, which will left unmanaged env var and scripts in PROFILE, in this case.

@Lutra-Fs
Copy link
Member

@Lutra-Fs

The current persist configuration has an issue: Scoop's persist creates directories by default, but proto expects configuration files. You can reference.

It doesn't seems a problem, where scoop should automatically detects file. Your example only check the existence of dir only, notice the backslash px.ini\.

From my memory, full file support in persist is still pending review, so this might not work reliably yet. If you have tested this, and it behaves correctly in your environment, that would be good to confirm.

@lvyuemeng
Copy link
Contributor Author

I am against calling proto setup directly via CLI, since it will not only modify the PATH, but also the terminal profile. And I did not see a command to reverse the effect by the command, which will left unmanaged env var and scripts in PROFILE, in this case.

It's the official installation procedure of install script, which is the workflow of proto itself canonically.

Quote from moonrepo

Uninstalling
To uninstall proto, delete the ~/.proto directory, and remove any PROTO_HOME references from your shell profile.

@Lutra-Fs
Copy link
Member

I am against calling proto setup directly via CLI, since it will not only modify the PATH, but also the terminal profile. And I did not see a command to reverse the effect by the command, which will left unmanaged env var and scripts in PROFILE, in this case.

It's the official installation procedure of install script, which is the workflow of proto itself canonically.

Quote from moonrepo

Uninstalling
To uninstall proto, delete the ~/.proto directory, and remove any PROTO_HOME references from your shell profile.

No, that uninstall note applies to the generic install flow, not to proto setup specifically, and setup is effectively invoking proto activate behind the scenes.

The proto setup command will setup proto in your current shell by modifying an applicable profile file and appending proto's bin directory to PATH.

which introduces additional, persistent side effects that are not reverted by the documented uninstall steps.

@lvyuemeng lvyuemeng force-pushed the proto branch 2 times, most recently from 4db780a to 63db674 Compare January 17, 2026 03:10
@lvyuemeng
Copy link
Contributor Author

lvyuemeng commented Jan 17, 2026

@z-Fng

Here the manifest updated, sadly, due to its special property, the script is necessary in following reasons.

Reasons:

  • Due to proto the role of package manager, exposing $PROTO_HOME/bin and $PROTO_HOME/shims for setup. I choose not to interfere any functionality by scoop own shims and apps management.
  • Due to proto detecting its location in a constraint of $PROTO_HOME/bin, I choose move proto into $PROTO_HOME/bin rather in $dir.
  • Due to persistency and tree structure maintaining of $PROTO_HOME subdirectories, any update will break the tree structure in $dir, so anything is located in default or custom $PROTO_HOME.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bucket/proto.json`:
- Around line 23-35: The uninstaller's Remove-Item call is too aggressive—don't
delete the entire $protoHome; instead modify the uninstaller script (in the
"uninstaller" block) to only remove the installed binary and any shim created by
the installer: target the proto executable under $binDir and any shim files
under $shimsDir (use $binDir and $shimsDir variables), remove those specific
files, and only remove $protoHome if it was created by this installer and is
empty; replace the current Remove-Item -Path $protoHome -Recurse -Force with
targeted removals of the binary/shims and a safe empty-directory removal check.
♻️ Duplicate comments (1)
bucket/proto.json (1)

12-21: proto may be unreachable after install (no shim/PATH addition).

proto.exe is moved out of $dir, and the manifest doesn’t define bin or env_add_path. With proto setup --no-modify-profile, PATH may remain unchanged, leaving no executable on PATH after install. Please verify that proto ends up discoverable on Windows; if it doesn’t, add explicit PATH/shim handling or adjust the install flow.

@lvyuemeng lvyuemeng requested a review from z-Fng January 23, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: Proto

3 participants