Claude Code Launcher: Load shell profiles in Ghostty and Alacritty adapters, update icon#25693
Claude Code Launcher: Load shell profiles in Ghostty and Alacritty adapters, update icon#25693jordiparra wants to merge 2 commits intoraycast:mainfrom
Conversation
…apters, update icon - Source shell profiles (~/.zprofile, ~/.zshrc, ~/.bash_profile, ~/.bashrc, ~/.profile) in Ghostty and Alacritty adapters before launching Claude Code - Update extension icon to match Claude Code branding When Ghostty or Alacritty are launched via macOS 'open' command with '-c' (command mode), the shell runs non-interactively and skips loading profile files like ~/.zshrc. This causes environment variables (e.g. ANTHROPIC_API_KEY) to be unavailable, resulting in "Missing API key" errors. The fix sources all common profile files with error suppression (2>/dev/null) so missing files are silently ignored. Terminal.app and Warp are not affected as they handle shell initialization differently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Resize icon to 512x512 pixels (required by Raycast) - Add changelog entries for shell profile loading fix and icon update
|
Thank you for your contribution! 🎉 🔔 @stephendolan @ridemountainpig you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="fix/load-shell-profiles"
FORK_URL="https://github.com/jordiparra/extensions.git"
EXTENSION_NAME="claude-code-launcher"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR fixes environment variable loading (specifically
The implementation is sound - error suppression with Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 0f1b7f0 |
Additional Comments (1)
Context Used: Rule from 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! |
0xdhrv
left a comment
There was a problem hiding this comment.
Hi @jordiparra 👋
Thanks for the contribution 🔥
Could you look into the suggestions from Greptile
I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊
Summary
opencommand, shell profiles (~/.zshrc,~/.zprofile, etc.) are not automatically sourced. This causes environment variables likeANTHROPIC_API_KEYto be missing, resulting in "Missing API key" errors when launching Claude Code. The fix explicitly sources common shell profile files before running Claude.Details
The Ghostty and Alacritty adapters both use
open -na <App> --args -e $SHELL -l -c <command>to launch. While-lrequests a login shell, the-cflag causes the shell to run in non-interactive mode, skipping~/.zshrcand similar interactive profile files where users commonly set environment variables.Terminal.app and Warp are not affected — Terminal.app opens a full login+interactive shell via AppleScript, and Warp manages its own shell environment through launch configurations.
The fix sources all common profile files with error suppression (
2>/dev/null) so missing files are silently ignored:Test plan
~/.zshrc— verify it loads without "Missing API key" error🤖 Generated with Claude Code