Print actionable PATH setup commands after install#4028
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughInstaller scripts now print shell-specific PATH setup instructions. PowerShell guidance persists the user PATH and updates the current session, while the POSIX installer selects profiles by shell and provides fish-specific handling. ChangesInstaller PATH guidance
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
⏭️ Performance benchmarks were skippedPerf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to To run them on this PR, do any of the following, then push a commit (or re-run CI):
|
Binary size checks passed✅ 7 passed
Generated by |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/install.sh`:
- Around line 163-186: Update the shell instruction output in scripts/install.sh
to use the resolved BAML_HOME path instead of hardcoding $HOME/.baml, including
both fish_add_path and profile/env references. Preserve the literal $HOME-based
path in printed commands when BAML_HOME is unset, while ensuring custom
BAML_HOME values are injected correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a77f7db0-528a-43b0-b592-80d28ce164f0
📒 Files selected for processing (2)
scripts/install.ps1scripts/install.sh
| fish) | ||
| cat <<'NEXT' | ||
|
|
||
| Add BAML to your PATH by running this command in fish: | ||
|
|
||
| fish_add_path "$HOME/.baml/bin" | ||
| NEXT | ||
| exit 0 | ||
| ;; | ||
| *) | ||
| shell_label="${shell_name:-POSIX}" | ||
| profile_display="\$HOME/.profile" | ||
| ;; | ||
| esac | ||
|
|
||
| cat <<NEXT | ||
|
|
||
| Add BAML to your PATH by adding this to your shell profile: | ||
| Add BAML to your PATH for future $shell_label shells by running: | ||
|
|
||
| . "$HOME/.baml/env" | ||
| grep -Fqx '. "\$HOME/.baml/env"' "$profile_display" 2>/dev/null || printf '\n%s\n' '. "\$HOME/.baml/env"' >> "$profile_display" | ||
|
|
||
| Or run for this shell session: | ||
| Then load BAML in this shell: | ||
|
|
||
| export PATH="$HOME/.baml/bin:$PATH" | ||
| . "\$HOME/.baml/env" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Respect BAML_HOME in printed instructions.
These instructions hardcode $HOME/.baml, which will provide incorrect paths if the user installed BAML with a custom BAML_HOME. Unlike install.ps1 (which correctly uses the dynamically resolved $BinDir), this script does not account for BAML_HOME.
You can dynamically inject the correct path while preserving the literal $HOME variable in the command string for when BAML_HOME is unset.
♻️ Proposed fix
fish)
- cat <<'NEXT'
+ cat <<NEXT
Add BAML to your PATH by running this command in fish:
- fish_add_path "$HOME/.baml/bin"
+ fish_add_path "${BAML_HOME:-\$HOME/.baml}/bin"
NEXT
exit 0
;;
*)
shell_label="${shell_name:-POSIX}"
profile_display="\$HOME/.profile"
;;
esac
cat <<NEXT
Add BAML to your PATH for future $shell_label shells by running:
- grep -Fqx '. "\$HOME/.baml/env"' "$profile_display" 2>/dev/null || printf '\n%s\n' '. "\$HOME/.baml/env"' >> "$profile_display"
+ grep -Fqx '. "${BAML_HOME:-\$HOME/.baml}/env"' "$profile_display" 2>/dev/null || printf '\n%s\n' '. "${BAML_HOME:-\$HOME/.baml}/env"' >> "$profile_display"
Then load BAML in this shell:
- . "\$HOME/.baml/env"
+ . "${BAML_HOME:-\$HOME/.baml}/env"
NEXT📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fish) | |
| cat <<'NEXT' | |
| Add BAML to your PATH by running this command in fish: | |
| fish_add_path "$HOME/.baml/bin" | |
| NEXT | |
| exit 0 | |
| ;; | |
| *) | |
| shell_label="${shell_name:-POSIX}" | |
| profile_display="\$HOME/.profile" | |
| ;; | |
| esac | |
| cat <<NEXT | |
| Add BAML to your PATH by adding this to your shell profile: | |
| Add BAML to your PATH for future $shell_label shells by running: | |
| . "$HOME/.baml/env" | |
| grep -Fqx '. "\$HOME/.baml/env"' "$profile_display" 2>/dev/null || printf '\n%s\n' '. "\$HOME/.baml/env"' >> "$profile_display" | |
| Or run for this shell session: | |
| Then load BAML in this shell: | |
| export PATH="$HOME/.baml/bin:$PATH" | |
| . "\$HOME/.baml/env" | |
| fish) | |
| cat <<NEXT | |
| Add BAML to your PATH by running this command in fish: | |
| fish_add_path "${BAML_HOME:-\$HOME/.baml}/bin" | |
| NEXT | |
| exit 0 | |
| ;; | |
| *) | |
| shell_label="${shell_name:-POSIX}" | |
| profile_display="\$HOME/.profile" | |
| ;; | |
| esac | |
| cat <<NEXT | |
| Add BAML to your PATH for future $shell_label shells by running: | |
| grep -Fqx '. "${BAML_HOME:-\$HOME/.baml}/env"' "$profile_display" 2>/dev/null || printf '\n%s\n' '. "${BAML_HOME:-\$HOME/.baml}/env"' >> "$profile_display" | |
| Then load BAML in this shell: | |
| . "${BAML_HOME:-\$HOME/.baml}/env" | |
| NEXT |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/install.sh` around lines 163 - 186, Update the shell instruction
output in scripts/install.sh to use the resolved BAML_HOME path instead of
hardcoding $HOME/.baml, including both fish_add_path and profile/env references.
Preserve the literal $HOME-based path in printed commands when BAML_HOME is
unset, while ensuring custom BAML_HOME values are injected correctly.
Summary
.bash_profilefor macOS bash and.bashrcfor Linux bashWhy
The normal commands on https://boundaryml.com/quickstart do not pass
-Yesor--yes. The installers therefore leave PATH unchanged, but their completion output did not give new users a complete command to persist the BAML bin directory.Validation
bamlwithout duplicating the profile entrysh -n scripts/install.sh, ShellCheck,git diff --check, and the targeted pre-commit hooksSummary by CodeRabbit