Skip to main content

Default environment variables for your codespace

sets default environment variables for each codespace.

About default environment variables

sets default environment variables for every codespace. Commands run in codespaces can create, read, and modify environment variables.

Note

Environment variables are case-sensitive.

List of default environment variables

Environment variableDescription
CODESPACE_NAMEThe name of the codespace For example, octocat-literate-space-parakeet-mld5
CODESPACESAlways true while in a codespace
GIT_COMMITTER_EMAILThe email for the "author" field of future git commits.
GIT_COMMITTER_NAMEThe name for the "committer" field of future git commits.
_CODESPACES_PORT_FORWARDING_DOMAINReturns the domain of the Codespaces forwarded port. For example, app..dev.
_API_URLReturns the API URL. For example, https://api..com.
_GRAPHQL_URLReturns the GraphQL API URL. For example, https://api..com/graphql.
_REPOSITORYThe owner and repository name. For example, octocat/Hello-World.
_SERVER_URLReturns the URL of the server. For example, https://.com.
_TOKENA signed auth token representing the user in the codespace. You can use this to make authenticated calls to the API. For more information, see Security in Codespaces.
_USERThe name of the user that initiated the codespace. For example, octocat.