Skip to content

Instantly share code, notes, and snippets.

@jc00ke
Created December 13, 2025 20:03
Show Gist options
  • Select an option

  • Save jc00ke/6d8f6cbf3f1efb1eae4d67dfc5537a16 to your computer and use it in GitHub Desktop.

Select an option

Save jc00ke/6d8f6cbf3f1efb1eae4d67dfc5537a16 to your computer and use it in GitHub Desktop.
Claude Code API key auth via 1Password CLI
#!/usr/bin/env bash
# ~/.claude/settings.json
# ~/.local/bin.anthropic_key.sh
# chmod +x ~/.local/bin.anthropic_key.sh
op read --account "some-account.1password.com" "op://secret/reference/to/API/key"
{
"apikeyhelper": "~/.local/bin/anthropic_key.sh"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment