Repository navigation
Claude Code Launcher: Load shell profiles in Ghostty and Alacritty adapters, update icon - #25693
jordiparra wants to merge 2 commits into
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 <[email protected]>
- 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 😊
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
1 similar comment
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
This pull request has been automatically closed due to inactivity. Feel free to comment in the thread when you're ready to continue working on it 🙂 You can also catch us in Slack if you want to discuss this. |
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