Skip to content

Bundle sprout CLI in DMG release + agent PATH discoverability#614

Merged
wpfleger96 merged 7 commits into
mainfrom
cli-distribution
May 20, 2026
Merged

Bundle sprout CLI in DMG release + agent PATH discoverability#614
wpfleger96 merged 7 commits into
mainfrom
cli-distribution

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

@wpfleger96 wpfleger96 commented May 18, 2026

The sprout CLI binary is not included in the DMG release — agents on end-user machines can't find it. Two problems blocked this: a Tauri sidecar name collision, and the sidecar directory not being on agents' PATH.

Tauri collision fix: Tauri rejects a sidecar with the same name as the Cargo [package] name. The desktop crate was sprout, colliding with the CLI's sprout binary. Renamed the desktop package to sprout-desktop — a 1-line change that eliminates the collision (everything else uses productName, --manifest-path, or the explicit [lib] name).

Sidecar bundling:

  • Adds -p sprout-cli to cargo build --release in release.yml
  • Registers binaries/sprout in tauri.conf.json externalBin
  • Adds sprout to the SIDECARS array in bundle-sidecars.sh (removes the RENAMES workaround from the earlier collision fix attempt)
  • Adds sprout stubs in both justfile sidecar recipes and ci.yml placeholder step
  • Adds -p sprout-cli to staging, goose, and goose-bg recipes so the CLI binary is built alongside other sidecars
  • staging recipe copies the real CLI binary into the sidecar directory (replacing the 0-byte stub) with execute permission, so agents can run it immediately in dev mode

Agent PATH discoverability:

  • Prepends ~/.local/bin and exe-parent (Contents/MacOS/) to spawned agent PATH in runtime.rs, so managed agents can find the CLI and all other sidecars
  • Creates ~/.local/bin/sprout symlink on app launch (idempotent, won't clobber non-Sprout binaries), giving Terminal users access via a standard PATH location

Companion to #612 (CLI parity fixes) and #613 (agent skill file).

Agents on end-user machines can't find the sprout binary because it's
not included in the release pipeline. Add sprout-cli to cargo build,
bundle-sidecars, externalBin, and justfile sidecar stubs so it ships
alongside the other sidecars in the DMG.
@wpfleger96 wpfleger96 requested a review from wesbillman as a code owner May 18, 2026 23:38
… collision

Tauri rejects a sidecar with the same name as the Cargo package
(both are "sprout"). The cargo binary stays named "sprout" for CLI
ergonomics; bundle-sidecars.sh maps it to "sprout-cli" via a RENAMES
array so Tauri sees a distinct name.
@wpfleger96 wpfleger96 marked this pull request as draft May 19, 2026 00:00
…lity

Tauri rejects a sidecar with the same name as the Cargo package name.
The desktop crate was `sprout`, colliding with the CLI's `sprout`
binary. Renaming the package to `sprout-desktop` (1-line change)
eliminates the collision so the CLI sidecar can be registered as
`binaries/sprout` — removing the RENAMES workaround from the bundle
script.

Also makes the CLI discoverable by managed agents:
- Prepend ~/.local/bin and exe-parent (Contents/MacOS/) to agent PATH
- Create ~/.local/bin/sprout symlink on app launch (won't clobber
  existing non-Sprout binaries)
@wpfleger96 wpfleger96 changed the title Bundle sprout-cli in DMG release Bundle sprout CLI in DMG release + agent PATH discoverability May 19, 2026
@wpfleger96 wpfleger96 marked this pull request as ready for review May 19, 2026 21:41
Agents need the `sprout` binary available. The `staging`, `goose`, and
`goose-bg` recipes explicitly list sidecar packages to build but were
missing `-p sprout-cli`.
tauri dev copies sidecars from desktop/src-tauri/binaries/ which
contains 0-byte stubs. The staging recipe builds the real CLI binary
but never copies it there, so agents get an empty file. Copy the
built binary after cargo build so tauri dev picks up the real thing.
cp overwrites the 0-byte stub's contents but preserves its 644
permissions (from touch). Add chmod +x so agents don't get
"permission denied" when running the CLI.
@wpfleger96 wpfleger96 merged commit 582cfc8 into main May 20, 2026
15 checks passed
@wpfleger96 wpfleger96 deleted the cli-distribution branch May 20, 2026 00:53
wpfleger96 added a commit that referenced this pull request May 20, 2026
Reformat code after rebasing onto main (which includes PR #614's
nest.rs additions). No logic changes.
wpfleger96 added a commit that referenced this pull request May 20, 2026
Reformat code after rebasing onto main (which includes PR #614's
nest.rs additions). No logic changes.
wpfleger96 added a commit that referenced this pull request May 20, 2026
Reformat code after rebasing onto main (which includes PR #614's
nest.rs additions). No logic changes.
wpfleger96 added a commit that referenced this pull request May 20, 2026
Reformat code after rebasing onto main (which includes PR #614's
nest.rs additions). No logic changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants