Problem
gh CLI has a nice command to get the current auth token via gh auth token, which can be useful for automation or scripts to retrieve the token on demand instead of preseeding the environment before the script starts.
Suggestion
Add a similar coder login token command to retrieve the currently used token for use in scripts. It can then be used as.
CODER_SESSION_TOKEN=$(coder login token)
# OR when using AI Bridge
ANTHROPIC_API_TOKEN=$(coder login token)
ANTHROPIC_BASE_URL="$(coder login url)/api/v2/aibridge/anthropic" # Additionally same can be done for acess url.
claude
Problem
ghCLI has a nice command to get the current auth token viagh auth token, which can be useful for automation or scripts to retrieve the token on demand instead of preseeding the environment before the script starts.Suggestion
Add a similar
coder login tokencommand to retrieve the currently used token for use in scripts. It can then be used as.