Skip to content

ccswitch env / ccuse

ccswitch env <name>
ccswitch env --unset
ccuse <name>
ccuse --unset

Prints shell export statements that configure the current terminal to use a specific profile. Designed to be wrapped in eval "$(…)" — which is what the ccuse helper does.

Nothing global changes. Different terminals can use different profiles simultaneously.

Option Description
--unset Print unset statements to clear all managed env vars
Profile type Variables set
api-key ANTHROPIC_API_KEY
login CLAUDE_CODE_OAUTH_TOKEN
bedrock CLAUDE_CODE_USE_BEDROCK, AWS_PROFILE, AWS_REGION
bedrock-key CLAUDE_CODE_USE_BEDROCK, AWS_BEARER_TOKEN_BEDROCK, AWS_REGION
custom ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, any model overrides

If the profile has an isolated config dir, CLAUDE_CONFIG_DIR is also set.

Terminal window
eval "$(ccswitch env work)" # activate 'work' in this shell
eval "$(ccswitch env --unset)" # clear overrides
ccuse work # same as the eval line above
ccuse --unset # same as the unset line above

This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.