Add/edit ~/.claude/settings.json to add "apiKeyHelper":
~/.claude/settings.json
{
"apiKeyHelper": "~/.claude/anthropic_key.sh"
}
create ~/.claude/anthropic_key.sh with your api key:
~/.claude/anthropic_key.sh
echo "sk-........."
and make it executable with:
chmod +x ~/.claude/anthropic_key.sh
now launch claudecode, it should work.