Skip to content

Instantly share code, notes, and snippets.

@sureshdsk
Created October 28, 2025 16:24
Show Gist options
  • Save sureshdsk/e9585cfc89521f98eb635e81df06cc76 to your computer and use it in GitHub Desktop.
Save sureshdsk/e9585cfc89521f98eb635e81df06cc76 to your computer and use it in GitHub Desktop.
Run Claudecode with Anthropic API Key

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment