Pin your relay config in ~/.claude/settings.json (no more export every time)

2026-10-11来源 dev.toEnglish

Tired of export-ing env vars in every new terminal? Put your relay config in ~/.claude/settings.json under env, and Claude Code picks it up on launch:

{ "env": { "ANTHROPIC_BASE_URL": "https://<station>", "ANTHROPIC_AUTH_TOKEN": "sk-****your-key****" } } 

Tips:

  • This file is local — don't commit it.
  • To juggle several stations, use ccswitch to keep each one on its own git branch and ccswitch switch between them.
  • If the model list won't load, add ANTHROPIC_MODEL with the exact id copied from the station.

Relay stations are free (signup + daily check-in credit) and plentiful — register a few. List with models and tested dates: AI relay station list

Signup links carry my referral param; strip ?aff= if you prefer.

原文:https://www.a8q9.cn/en/article/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time-0161e7.html

相关文章