{"slug": "pin-your-relay-config-in-claude-settings-json-no-more-export-every-time", "title": "Pin your relay config in ~/.claude/settings.json (no more export every time)", "summary": "A developer shared a configuration tip for Claude Code: instead of exporting environment variables in every new terminal, users can pin their relay settings—ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN—under the env key in ~/.claude/settings.json, which Claude Code reads on launch. The post also recommends ccswitch for managing multiple relay configurations on separate git branches and notes that relay stations are free with signup and daily check-in credit.", "body_md": "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:\n\n```\n{\n  \"env\": {\n    \"ANTHROPIC_BASE_URL\": \"https://<station>\",\n    \"ANTHROPIC_AUTH_TOKEN\": \"sk-****your-key****\"\n  }\n}\n```\n\nTips:\n\n`ccswitch` to keep each one on its own git branch and `ccswitch switch` between them.`ANTHROPIC_MODEL` with the exact id copied from the station.\nRelay stations are free (signup + daily check-in credit) and plentiful — register a few. List with models and tested dates: [AI relay station list](https://jliushi.github.io/ai-relay/)\n\nSignup links carry my referral param; strip `?aff=` if you prefer.", "url": "https://wpnews.pro/news/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time", "canonical_source": "https://dev.to/_e69fe8657895dd4754bbf/pin-your-relay-config-in-claudesettingsjson-no-more-export-every-time-4fl7", "published_at": "2026-10-11 01:12:11+00:00", "updated_at": "2026-10-11 01:19:38.804055+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["Claude Code", "Anthropic", "ccswitch"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time", "markdown": "https://wpnews.pro/news/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time.md", "text": "https://wpnews.pro/news/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time.txt", "jsonld": "https://wpnews.pro/news/pin-your-relay-config-in-claude-settings-json-no-more-export-every-time.jsonld"}}