feat(cua-driver-rs): single shared post-install-hints.txt for all 4 Rust installers - #1664
Conversation
…ust installers
The 4 cua-driver-rs installer scripts (install.ps1, _install-rust.sh,
install-local.ps1, install-local.sh) each inlined their own
post-install hint block — with predictable drift: _install-rust.sh
had Try-it + skill + docs, install.ps1 had Try-it + autostart + docs,
install-local.* had almost nothing. Adding a new MCP client or
renaming a CLI flag meant grepping 4 files in 2 shells.
This adds `libs/cua-driver/scripts/post-install-hints.txt` as the
single source of truth for the OS-agnostic bulk (Try-it / agent skill
pack / MCP setup for 6 clients / docs link). Uses `{{BINARY}}` as the
placeholder. All 4 install scripts render it natively:
• _install-rust.sh — curl from raw.githubusercontent.com + sed
• install.ps1 — Invoke-WebRequest + PS -replace
• install-local.sh — direct read from ../cua-driver/scripts/ + sed
• install-local.ps1 — direct read + -replace
OS-specific bits (macOS TCC reminder, Windows Scheduled-Task autostart,
Linux systemd autostart) stay inline in each script — they're 4-6
lines, per-shell natural, and each script targets one OS anyway.
Each installer has a one-line essentials fallback if the .txt is
unreachable (network failure on remote installs, missing file on
local). So users always get enough to recover.
Why not a CLI subcommand: an earlier draft added `cua-driver
post-install` to the Rust binary and had all 4 installers delegate via
`& $installedBinary post-install`. Reverted — the chicken-and-egg risk
(failed binary install = no hints either) made the .txt approach
safer. The .txt has no runtime dependency; even a totally broken
binary install still prints hints.
Live verified on macOS: `bash libs/cua-driver-rs/scripts/install-local.sh`
runs end-to-end and prints the unified block with macOS-specific TCC +
LaunchAgent hints. Windows VM verification pending.
PARITY.md updated with the design rationale and renderer mapping.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAll four installer scripts (Rust driver local, Go driver remote, for both Windows and Unix) now load a unified post-install hints template instead of maintaining separate hardcoded messages. The shared template is substituted with the installed binary path and displayed; a fallback message appears when the template is unavailable. ChangesUnified post-install hints across installers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
The 4 cua-driver-rs installer scripts each inlined their own post-install hint block — with predictable drift:
_install-rust.sh(canonical Unix Rust path)install.ps1(canonical Windows Rust)install-local.sh(Rust dev Unix)install-local.ps1(Rust dev Windows)Same hint text would need to land in 4 files in 2 shells. Adding a new MCP client or renaming a CLI flag meant grepping 4 files.
The fix
Single text file
libs/cua-driver/scripts/post-install-hints.txtwith{{BINARY}}placeholder. Each installer renders it with shell-native substitution:_install-rust.shcurlfrom raw.githubusercontent.com +sedinstall.ps1Invoke-WebRequest+ PS-replaceinstall-local.sh../cua-driver/scripts/+sedinstall-local.ps1-replaceEach has a one-line essentials fallback if the .txt is unreachable (network failure on remote installs, missing file on local) so users always get enough to recover.
What stays inline per installer
OS-specific bits — 4–6 lines each, per-shell natural, each script targets one OS anyway:
open -n -g -a CuaDriver --args serve)Why not a CLI subcommand
An earlier draft of this work added
cua-driver post-installto the Rust binary and had all 4 installers delegate via& $installedBinary post-install. Reverted — the chicken-and-egg risk (failed binary install ⇒ no hints either) made the .txt approach safer. The .txt has no runtime dependency; even a totally broken binary install still prints hints.Files
libs/cua-driver/scripts/post-install-hints.txt— the shared text (~50 lines)libs/cua-driver/scripts/_install-rust.sh,install.ps1,libs/cua-driver-rs/scripts/install-local.sh,install-local.ps1— each replaces inline hints with.txtrender + keeps install-specific lines (Installed banner, PATH handling, BETA warning, OS-specific autostart)libs/cua-driver-rs/PARITY.md— new "Installer post-install hints" section documenting the designNet diff: +194 / −50 LOC across 6 files. Going forward, hint changes happen in one place.
Test plan
bash libs/cua-driver-rs/scripts/install-local.shon macOS — prints the unified block with{{BINARY}}correctly substituted + macOS TCC + LaunchAgent hint.\install-local.ps1on Windows VMirm https://.../install.ps1 | iexend-to-end (canonical Windows installer, remote fetch path)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation