Skip to content

Environment Variables

SCC can be configured via environment variables.

VariableDescriptionExample
SCC_ORG_TOKENSCC-specific auth token (checked before GITHUB_TOKEN)ghp_xxxxx
GITHUB_TOKENGitHub token for private repos and configsghp_xxxxx
Terminal window
export SCC_ORG_TOKEN="ghp_xxxxx"
VariableDescriptionValues
SCC_ALLOW_REMOTE_COMMANDSEnable command: auth from remote configs1, true, yes
Terminal window
# Enable command execution from remote configs (use with caution)
export SCC_ALLOW_REMOTE_COMMANDS=1

SCC follows the XDG Base Directory Specification for file locations:

VariableDescriptionDefault
XDG_CONFIG_HOMEConfiguration directory~/.config
XDG_DATA_HOMEData directory~/.local/share
XDG_CACHE_HOMECache directory~/.cache
Terminal window
# Customize XDG directories
export XDG_CONFIG_HOME="/opt/config"
export XDG_DATA_HOME="/opt/data"
export XDG_CACHE_HOME="/var/cache"

SCC uses these locations:

  • Config: $XDG_CONFIG_HOME/scc/ (default: ~/.config/scc/)
  • Data: $XDG_DATA_HOME/scc/ (default: ~/.local/share/scc/)
  • Cache: $XDG_CACHE_HOME/scc/ (default: ~/.cache/scc/)
VariableDescriptionValues
EDITORDefault text editorvim, nano, code
NO_COLORDisable colored output1, true
SCC_NO_DEPRECATION_WARNSuppress deprecation warnings1
Terminal window
export EDITOR="code --wait"
export NO_COLOR=1
export SCC_NO_DEPRECATION_WARN=1

MCP servers and auth can reference environment variables:

{
"auth": {
"type": "bearer",
"token": "env:MCP_TOKEN"
}
}

The env:VAR_NAME syntax reads from environment at runtime.

For dynamic tokens:

{
"auth": {
"type": "bearer",
"token": "command:vault read -field=token secret/mcp"
}
}

The command:CMD syntax executes the command and uses stdout.

Add to your shell profile (~/.bashrc, ~/.zshrc):

Terminal window
# SCC Configuration
export SCC_ORG_TOKEN="ghp_xxxxx"
export EDITOR="code --wait"
# Optional: Customize XDG directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
# Optional: Worktree helper
wt() {
local p
p="$(scc worktree switch "$@")" || return $?
cd "$p" || return 1
}

Configuration precedence (highest to lowest):

  1. Command-line flags
  2. Environment variables
  3. Project config (.scc.yaml)
  4. User config ($XDG_CONFIG_HOME/scc/config.yaml)
  5. System defaults