Environment variables
Reference for environment variables that control Claude Code behavior.
Environment variables can control Claude Code behavior such as model selection, authentication, request routing, and feature toggles. Many of the same behaviors can also be configured through a settings file field, a CLI flag, or an in-session command like /model.
This page covers how to:
- Set environment variables in your shell or in a settings file
- Check which value applies when a behavior can be set more than one way
- Look up the variables Claude Code reads
- See which features stop working when a variable turns feature-flag fetching off